mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-23 14:44:28 +00:00
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:
@@ -17,6 +17,7 @@
|
|||||||
#include "asterisk.h"
|
#include "asterisk.h"
|
||||||
#include "asterisk/lock.h"
|
#include "asterisk/lock.h"
|
||||||
|
|
||||||
|
#include "ootypes.h"
|
||||||
#include "ooDateTime.h"
|
#include "ooDateTime.h"
|
||||||
#include "ooTimer.h"
|
#include "ooTimer.h"
|
||||||
#include "ootrace.h"
|
#include "ootrace.h"
|
||||||
@@ -101,6 +102,7 @@ OOBOOL ooTimerExpired (OOTimer* pTimer)
|
|||||||
void ooTimerFireExpired (OOCTXT* pctxt, DList *pList)
|
void ooTimerFireExpired (OOCTXT* pctxt, DList *pList)
|
||||||
{
|
{
|
||||||
OOTimer* pTimer;
|
OOTimer* pTimer;
|
||||||
|
int ret = OO_OK;
|
||||||
|
|
||||||
while (pList->count > 0) {
|
while (pList->count > 0) {
|
||||||
pTimer = (OOTimer*) pList->head->data;
|
pTimer = (OOTimer*) pList->head->data;
|
||||||
@@ -112,12 +114,16 @@ void ooTimerFireExpired (OOCTXT* pctxt, DList *pList)
|
|||||||
*/
|
*/
|
||||||
if (pTimer->reRegister) ooTimerReset (pctxt, pList, pTimer);
|
if (pTimer->reRegister) ooTimerReset (pctxt, pList, pTimer);
|
||||||
|
|
||||||
|
ret = (*pTimer->timeoutCB)(pTimer->cbData);
|
||||||
|
|
||||||
if (!pTimer->reRegister) {
|
if (!pTimer->reRegister) {
|
||||||
ooTimerDelete (pctxt, pList, pTimer);
|
ooTimerDelete (pctxt, pList, pTimer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else break;
|
else break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return (void)ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ooTimerInsertEntry (OOCTXT* pctxt, DList *pList, OOTimer* pTimer)
|
int ooTimerInsertEntry (OOCTXT* pctxt, DList *pList, OOTimer* pTimer)
|
||||||
|
Reference in New Issue
Block a user