Update 2005-12-29

This commit is contained in:
Eric Petit 2006-01-12 19:01:41 +00:00
parent 943df43518
commit f32ca66210
2 changed files with 8 additions and 4 deletions

View File

@ -807,10 +807,7 @@ actionclick(GtkWidget *widget, gpointer gdata) {
switch(act) {
case ACT_START:
if(TR_STATUS_STOPPING & sb[index].status)
fprintf(stderr, "XXX still running\n");
else
tr_torrentStart(data->tr, index);
tr_torrentStart(data->tr, index);
updatesave = TRUE;
break;
case ACT_STOP:

View File

@ -25,6 +25,7 @@
/***********************************************************************
* Local prototypes
**********************************************************************/
static void torrentReallyStop( tr_handle_t * h, int t );
static void downloadLoop( void * );
static float rateDownload( tr_torrent_t * );
static float rateUpload( tr_torrent_t * );
@ -232,6 +233,12 @@ void tr_torrentStart( tr_handle_t * h, int t )
uint64_t now;
int i;
if( tor->status & ( TR_STATUS_STOPPING | TR_STATUS_STOPPED ) )
{
/* Join the thread first */
torrentReallyStop( h, t );
}
tor->status = TR_STATUS_CHECK;
tor->tracker = tr_trackerInit( h, tor );
tor->bindPort = h->bindPort;