Changeset 3936


Ignore:
Timestamp:
Nov 23, 2007, 2:49:07 AM (15 years ago)
Author:
charles
Message:

fix another 0.94 prerelease crash report... this one from when finishing verifying a torrent that's running.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/0.9x/libtransmission/tracker.c

    r3899 r3936  
    987987}
    988988
     989struct request_data
     990{
     991    tr_tracker * t;
     992    const char * command;
     993};
     994
     995static void
     996sendRequestFromEventThreadImpl( void * vdata )
     997{
     998    struct request_data * data = vdata;
     999    sendTrackerRequest( data->t, data->command );
     1000    tr_free( data );
     1001}
     1002
     1003static void
     1004sendRequestFromEventThread( tr_tracker * t, const char * command )
     1005{
     1006    struct request_data * data = tr_new( struct request_data, 1 );
     1007    data->t = t;
     1008    data->command = command;
     1009    tr_runInEventThread( t->handle, sendRequestFromEventThreadImpl, t );
     1010}
     1011
    9891012void
    9901013tr_trackerStart( tr_tracker * t )
     
    9951018    {
    9961019        t->isRunning = 1;
    997         sendTrackerRequest( t, "started" );
     1020        sendRequestFromEventThread( t, "started" );
    9981021    }
    9991022}
     
    10021025tr_trackerReannounce( tr_tracker * t )
    10031026{
    1004     sendTrackerRequest( t, "started" );
     1027    sendRequestFromEventThread( t, "started" );
    10051028}
    10061029
     
    10081031tr_trackerCompleted( tr_tracker * t )
    10091032{
    1010     sendTrackerRequest( t, "completed" );
     1033    sendRequestFromEventThread( t, "completed" );
    10111034}
    10121035
     
    10171040    {
    10181041        t->isRunning = 0;
    1019         sendTrackerRequest( t, "stopped" );
     1042        sendRequestFromEventThread( t, "stopped" );
    10201043    }
    10211044}
Note: See TracChangeset for help on using the changeset viewer.