mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-24 06:53:41 +00:00
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 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371081 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1285,6 +1285,8 @@ int ooGkClientHandleRegistrationReject
|
||||
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 @@ int ooGkClientHandleRegistrationReject
|
||||
pGkClient->rrqRetries = 0;
|
||||
pGkClient->grqRetries = 0;
|
||||
pGkClient->discoveryComplete = FALSE;
|
||||
ast_mutex_unlock(&pGkClient->Lock);
|
||||
|
||||
iRet = ooGkClientSendGRQ(pGkClient);
|
||||
if(iRet != OO_OK){
|
||||
OOTRACEERR1("\nError: Transmission of rediscovery of GK failed\n");
|
||||
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);
|
||||
|
||||
return OO_OK;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user