[asterisk-commits] may: branch 1.8 r371060 - /branches/1.8/addons/ooh323c/src/ooGkClient.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Aug 10 10:10:23 CDT 2012
Author: may
Date: Fri Aug 10 10:10:20 2012
New Revision: 371060
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=371060
Log:
Send re-register packets by GRQ (gatekeeper request) interval
(close issue ASTERISK-20094)
Patches:
ASTERISK-20094-2.patch
Modified:
branches/1.8/addons/ooh323c/src/ooGkClient.c
Modified: branches/1.8/addons/ooh323c/src/ooGkClient.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/addons/ooh323c/src/ooGkClient.c?view=diff&rev=371060&r1=371059&r2=371060
==============================================================================
--- branches/1.8/addons/ooh323c/src/ooGkClient.c (original)
+++ branches/1.8/addons/ooh323c/src/ooGkClient.c Fri Aug 10 10:10:20 2012
@@ -1282,6 +1282,8 @@
unsigned int x=0;
DListNode *pNode = NULL;
OOTimer *pTimer = NULL;
+ ooGkClientTimerCb *cbData=NULL;
+
/* First delete the corresponding RRQ timer */
for(x=0; x<pGkClient->timerList.count; x++)
{
@@ -1378,14 +1380,33 @@
pGkClient->rrqRetries = 0;
pGkClient->grqRetries = 0;
pGkClient->discoveryComplete = FALSE;
+
+ cbData = (ooGkClientTimerCb*) memAlloc
+ (&pGkClient->ctxt, sizeof(ooGkClientTimerCb));
+ if(!cbData)
+ {
+ OOTRACEERR1("Error:Failed to allocate memory to GRQ timer callback\n");
+ pGkClient->state = GkClientFailed;
+ ast_mutex_unlock(&pGkClient->Lock);
+ return OO_FAILED;
+ }
+ cbData->timerType = OO_GRQ_TIMER;
+ cbData->pGkClient = pGkClient;
+ if(!ooTimerCreate(&pGkClient->ctxt, &pGkClient->timerList,
+ &ooGkClientGRQTimerExpired, pGkClient->grqTimeout,
+ cbData, FALSE))
+ {
+ OOTRACEERR1("Error:Unable to create GRQ timer.\n ");
+ memFreePtr(&pGkClient->ctxt, cbData);
+ pGkClient->state = GkClientFailed;
+ ast_mutex_unlock(&pGkClient->Lock);
+ return OO_FAILED;
+ }
+
ast_mutex_unlock(&pGkClient->Lock);
- iRet = ooGkClientSendGRQ(pGkClient);
- if(iRet != OO_OK){
- OOTRACEERR1("\nError: Transmission of rediscovery of GK failed\n");
- return OO_FAILED;
- }
return OO_OK;
+
}
More information about the asterisk-commits
mailing list