Changeset 7759


Ignore:
Timestamp:
Jan 20, 2009, 2:03:09 AM (12 years ago)
Author:
charles
Message:

(trunk libT) fix crash-on-add-torrent-from-clutch reported by anf6

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/rpcimpl.c

    r7752 r7759  
    3030#define TR_N_ELEMENTS( ary ) ( sizeof( ary ) / sizeof( *ary ) )
    3131
     32#if 0
     33#define dbgmsg(fmt, ...) \
     34    do { \
     35        fprintf( stderr, "%s:%d"#fmt, __FILE__, __LINE__, __VA_ARGS__ ); \
     36        fprintf( stderr, "\n" ); \
     37    } while( 0 )
     38#else
    3239#define dbgmsg( ... ) \
    3340    do { \
     
    3542            tr_deepLog( __FILE__, __LINE__, "RPC", __VA_ARGS__ ); \
    3643    } while( 0 )
     44#endif
    3745
    3846
     
    923931
    924932static void
     933noop_response_callback( tr_session * session UNUSED,
     934                        const char * response UNUSED,
     935                        size_t       response_len UNUSED,
     936                        void       * user_data UNUSED )
     937{
     938}
     939
     940static void
    925941request_exec( tr_session             * session,
    926942              tr_benc                * request,
     
    932948    tr_benc * args_in = tr_bencDictFind( request, "arguments" );
    933949    const char * result = NULL;
     950
     951    if( callback == NULL )
     952        callback = noop_response_callback;
    934953
    935954    /* parse the request */
Note: See TracChangeset for help on using the changeset viewer.