diff --git a/core/plug-in/sipctrl/sip_trans.cpp b/core/plug-in/sipctrl/sip_trans.cpp index b80f0545..03ba46cd 100644 --- a/core/plug-in/sipctrl/sip_trans.cpp +++ b/core/plug-in/sipctrl/sip_trans.cpp @@ -117,7 +117,8 @@ void trans_timer_cb(timer* t, unsigned int bucket_id, sip_trans* tr) if(bucket){ bucket->lock(); if(bucket->exist(tr)){ - DBG("Transaction timer expired: type=0x%x, trans=%p\n",t->type,tr); + DBG("Transaction timer expired: type=0x%x, trans=%p, eta=%i, t=%i\n", + t->type,tr,t->expires,wheeltimer::instance()->wall_clock); trans_layer::instance()->timer_expired(t,bucket,tr); } else { diff --git a/core/plug-in/sipctrl/wheeltimer.cpp b/core/plug-in/sipctrl/wheeltimer.cpp index 9d0d3936..5ddc6d32 100644 --- a/core/plug-in/sipctrl/wheeltimer.cpp +++ b/core/plug-in/sipctrl/wheeltimer.cpp @@ -101,7 +101,7 @@ void wheeltimer::run() sdiff.tv_sec = diff.tv_sec; sdiff.tv_nsec = diff.tv_usec * 1000; - if(sdiff.tv_nsec > 2000) // 2 ms + if(sdiff.tv_nsec > 2000000) // 2 ms nanosleep(&sdiff,&rem); } //else { diff --git a/core/plug-in/sipctrl/wheeltimer.h b/core/plug-in/sipctrl/wheeltimer.h index a6e6e986..36943a0f 100644 --- a/core/plug-in/sipctrl/wheeltimer.h +++ b/core/plug-in/sipctrl/wheeltimer.h @@ -123,7 +123,7 @@ public: static wheeltimer* instance(); //clock reference - u_int32_t wall_clock; // 32 bits + volatile u_int32_t wall_clock; // 32 bits void clock_work(); void insert_timer(timer* t);