[asterisk-commits] may: trunk r371081 - in /trunk: ./ addons/ooh323c/src/ooGkClient.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Aug 10 10:24:06 CDT 2012
Author: may
Date: Fri Aug 10 10:24:03 2012
New Revision: 371081
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=371081
Log:
Send re-register packets by GRQ (gatekeeper request) interval
(close issue ASTERISK-20094)
Patches:
ASTERISK-20094-2.patch
........
Merged revisions 371060 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 371061 from http://svn.asterisk.org/svn/asterisk/branches/10
Modified:
trunk/ (props changed)
trunk/addons/ooh323c/src/ooGkClient.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-10-merged' - no diff available.
Modified: trunk/addons/ooh323c/src/ooGkClient.c
URL: http://svnview.digium.com/svn/asterisk/trunk/addons/ooh323c/src/ooGkClient.c?view=diff&rev=371081&r1=371080&r2=371081
==============================================================================
--- trunk/addons/ooh323c/src/ooGkClient.c (original)
+++ trunk/addons/ooh323c/src/ooGkClient.c Fri Aug 10 10:24:03 2012
@@ -1285,6 +1285,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++)
{
@@ -1381,14 +1383,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