restore calling cb functions by timer expire

this was broken in rev 369602


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371059 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Alexandr Anikin
2012-08-10 14:45:33 +00:00
parent ca481359b9
commit c7b2858322

View 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)