Changeset 12029


Ignore:
Timestamp:
Feb 24, 2011, 3:17:43 PM (11 years ago)
Author:
jordan
Message:

(2.2x) backport r12000, r12001 to silence a couple of valgrind issues

Location:
branches/2.2x
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2x/daemon/daemon.c

    r11709 r12029  
    555555    }
    556556
    557     /* shutdown */
    558 #if HAVE_SYSLOG
    559     if( !foreground )
    560     {
    561         syslog( LOG_INFO, "%s", "Closing session" );
    562         closelog( );
    563     }
    564 #endif
    565 
    566557    printf( "Closing transmission session..." );
    567558    tr_sessionSaveSettings( mySession, configDir, &settings );
    568559    dtr_watchdir_free( watchdir );
    569560    tr_sessionClose( mySession );
     561    pumpLogMessages( logfile );
    570562    printf( " done.\n" );
     563
     564    /* shutdown */
     565#if HAVE_SYSLOG
     566    if( !foreground )
     567    {
     568        syslog( LOG_INFO, "%s", "Closing session" );
     569        closelog( );
     570    }
     571#endif
    571572
    572573    /* cleanup */
  • branches/2.2x/libtransmission/web.c

    r11709 r12029  
    286286tr_webThreadFunc( void * vsession )
    287287{
    288     int unused;
    289288    CURLM * multi;
    290289    struct tr_web * web;
    291290    int taskCount = 0;
     291    struct tr_web_task * task;
    292292    tr_session * session = vsession;
    293293
     
    307307    {
    308308        long msec;
     309        int unused;
    309310        CURLMsg * msg;
    310311        CURLMcode mcode;
    311         struct tr_web_task * task;
    312312
    313313        if( web->close_mode == TR_WEB_CLOSE_NOW )
     
    376376            }
    377377        }
     378    }
     379
     380    /* Discard any remaining tasks.
     381     * This is rare, but can happen on shutdown with unresponsive trackers. */
     382    while(( task = tr_list_pop_front( &web->tasks ))) {
     383        dbgmsg( "Discarding task \"%s\"", task->url );
     384        task_free( task );
    378385    }
    379386
Note: See TracChangeset for help on using the changeset viewer.