Changeset 9437 for trunk/libtransmission/port-forwarding.c
- Timestamp:
- Oct 29, 2009, 5:25:03 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/port-forwarding.c
r9387 r9437 90 90 91 91 static void 92 onTimer( int fd UNUSED, short what UNUSED, void * vshared)92 set_evtimer_from_status( tr_shared * s ) 93 93 { 94 94 int sec=0, msec=0; 95 tr_shared * s = vshared;96 97 assert( s );98 assert( s->timer );99 100 /* do something */101 natPulse( s, s->doPortCheck );102 s->doPortCheck = FALSE;103 95 104 96 /* when to wake up again */ … … 124 116 125 117 tr_timerAdd( s->timer, sec, msec ); 118 } 119 120 static void 121 onTimer( int fd UNUSED, short what UNUSED, void * vshared ) 122 { 123 tr_shared * s = vshared; 124 125 assert( s ); 126 assert( s->timer ); 127 128 /* do something */ 129 natPulse( s, s->doPortCheck ); 130 s->doPortCheck = FALSE; 131 132 /* set up the timer for the next pulse */ 133 set_evtimer_from_status( s ); 126 134 } 127 135 … … 191 199 s->timer = tr_new0( struct event, 1 ); 192 200 evtimer_set( s->timer, onTimer, s ); 193 onTimer( 0, 0,s );201 set_evtimer_from_status( s ); 194 202 } 195 203
Note: See TracChangeset
for help on using the changeset viewer.