restore calling cb functions by timer expire
authorAlexandr Anikin <may@telecom-service.ru>
Fri, 10 Aug 2012 14:45:33 +0000 (14:45 +0000)
committerAlexandr Anikin <may@telecom-service.ru>
Fri, 10 Aug 2012 14:45:33 +0000 (14:45 +0000)
this was broken in rev 369602

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371059 65c4cc65-6c06-0410-ace0-fbb531ad65f3

addons/ooh323c/src/ooTimer.c

index 56d76f3..a15421a 100644 (file)
@@ -17,6 +17,7 @@
 #include "asterisk.h"
 #include "asterisk/lock.h"
 
+#include "ootypes.h"
 #include "ooDateTime.h"
 #include "ooTimer.h"
 #include "ootrace.h"
@@ -101,6 +102,7 @@ OOBOOL ooTimerExpired (OOTimer* pTimer)
 void ooTimerFireExpired (OOCTXT* pctxt, DList *pList)
 {
    OOTimer* pTimer;
+   int ret = OO_OK;
 
    while (pList->count > 0) {
       pTimer = (OOTimer*) pList->head->data;
@@ -112,12 +114,16 @@ void ooTimerFireExpired (OOCTXT* pctxt, DList *pList)
           */
          if (pTimer->reRegister) ooTimerReset (pctxt, pList, pTimer);
 
+        ret = (*pTimer->timeoutCB)(pTimer->cbData);
+
          if (!pTimer->reRegister) {
             ooTimerDelete (pctxt, pList, pTimer);
          }
       }
       else break;
    }
+
+   return (void)ret;
 }
 
 int ooTimerInsertEntry (OOCTXT* pctxt, DList *pList, OOTimer* pTimer)