Commit 0d2cd2042b941397ae242ce48c43e9abbc0e6b5c

Authored by Georg Hopp
1 parent 205ead25

don't use TR_queueEmpty anymore.

Showing 1 changed file with 8 additions and 6 deletions
@@ -47,14 +47,16 @@ TR_eventDispatcherStart(TR_EventDispatcher this) @@ -47,14 +47,16 @@ TR_eventDispatcherStart(TR_EventDispatcher this)
47 (TR_EventSubject)this, 47 (TR_EventSubject)this,
48 TR_DISPATCHER_EVENT_HEARTBEAT, 48 TR_DISPATCHER_EVENT_HEARTBEAT,
49 NULL); 49 NULL);
50 - } else if (TR_queueEmpty(this->events)) {  
51 - int evtid = TR_EVD_CLIENT == this->mode  
52 - ? TR_DISPATCHER_EVENT_USER_WAIT  
53 - : TR_DISPATCHER_EVENT_DATA_WAIT;  
54 -  
55 - event = TR_eventSubjectEmit((TR_EventSubject)this, evtid, NULL);  
56 } else { 50 } else {
57 event = TR_queueGet(this->events); 51 event = TR_queueGet(this->events);
  52 +
  53 + if (! event) {
  54 + int evtid = TR_EVD_CLIENT == this->mode
  55 + ? TR_DISPATCHER_EVENT_USER_WAIT
  56 + : TR_DISPATCHER_EVENT_DATA_WAIT;
  57 +
  58 + event = TR_eventSubjectEmit((TR_EventSubject)this, evtid, NULL);
  59 + }
58 } 60 }
59 61
60 handler_queue_hv = TR_hashGetByVal( 62 handler_queue_hv = TR_hashGetByVal(
Please register or login to post a comment