Send re-register packets by GRQ (gatekeeper request) interval

(close issue ASTERISK-20094)

Patches:
   ASTERISK-20094-2.patch 


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@371060 65c4cc65-6c06-0410-ace0-fbb531ad65f3
changes/98/198/1
Alexandr Anikin 14 years ago
parent af738476ca
commit c6d75bc2f5

@ -1282,6 +1282,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++)
{
@ -1378,14 +1380,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;
}

Loading…
Cancel
Save