|
|
@ -365,7 +365,7 @@ void ooGkClientFillVendor
|
|
|
|
|
|
|
|
|
|
|
|
int ooGkClientReceive(ooGkClient *pGkClient)
|
|
|
|
int ooGkClientReceive(ooGkClient *pGkClient)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ASN1OCTET recvBuf[1024];
|
|
|
|
ASN1OCTET recvBuf[ASN_K_ENCBUFSIZ];
|
|
|
|
int recvLen;
|
|
|
|
int recvLen;
|
|
|
|
char remoteHost[32];
|
|
|
|
char remoteHost[32];
|
|
|
|
int iFromPort=0;
|
|
|
|
int iFromPort=0;
|
|
|
@ -376,7 +376,7 @@ int ooGkClientReceive(ooGkClient *pGkClient)
|
|
|
|
ast_mutex_lock(&pGkClient->Lock);
|
|
|
|
ast_mutex_lock(&pGkClient->Lock);
|
|
|
|
pctxt = &pGkClient->msgCtxt;
|
|
|
|
pctxt = &pGkClient->msgCtxt;
|
|
|
|
|
|
|
|
|
|
|
|
recvLen = ooSocketRecvFrom(pGkClient->rasSocket, recvBuf, 1024, remoteHost,
|
|
|
|
recvLen = ooSocketRecvFrom(pGkClient->rasSocket, recvBuf, 2048, remoteHost,
|
|
|
|
32, &iFromPort);
|
|
|
|
32, &iFromPort);
|
|
|
|
if(recvLen <0)
|
|
|
|
if(recvLen <0)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -859,7 +859,6 @@ int ooGkClientHandleGatekeeperConfirm
|
|
|
|
memFreePtr(&pGkClient->ctxt, pTimer->cbData);
|
|
|
|
memFreePtr(&pGkClient->ctxt, pTimer->cbData);
|
|
|
|
ooTimerDelete(&pGkClient->ctxt, &pGkClient->timerList, pTimer);
|
|
|
|
ooTimerDelete(&pGkClient->ctxt, &pGkClient->timerList, pTimer);
|
|
|
|
OOTRACEDBGA1("Deleted GRQ Timer.\n");
|
|
|
|
OOTRACEDBGA1("Deleted GRQ Timer.\n");
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1064,7 +1063,7 @@ int ooGkClientSendRRQ(ooGkClient *pGkClient, ASN1BOOL keepAlive)
|
|
|
|
allocate storage for endpoint-identifier, and populate it from what the
|
|
|
|
allocate storage for endpoint-identifier, and populate it from what the
|
|
|
|
GK told us from the previous RCF. Only allocate on the first pass thru here */
|
|
|
|
GK told us from the previous RCF. Only allocate on the first pass thru here */
|
|
|
|
pRegReq->endpointIdentifier.data =
|
|
|
|
pRegReq->endpointIdentifier.data =
|
|
|
|
(ASN116BITCHAR*)memAlloc(pctxt, pGkClient->gkId.nchars*sizeof(ASN116BITCHAR));
|
|
|
|
(ASN116BITCHAR*)memAlloc(pctxt, pGkClient->endpointId.nchars*sizeof(ASN116BITCHAR));
|
|
|
|
if (pRegReq->endpointIdentifier.data) {
|
|
|
|
if (pRegReq->endpointIdentifier.data) {
|
|
|
|
pRegReq->endpointIdentifier.nchars = pGkClient->endpointId.nchars;
|
|
|
|
pRegReq->endpointIdentifier.nchars = pGkClient->endpointId.nchars;
|
|
|
|
pRegReq->m.endpointIdentifierPresent = TRUE;
|
|
|
|
pRegReq->m.endpointIdentifierPresent = TRUE;
|
|
|
@ -1137,6 +1136,8 @@ int ooGkClientHandleRegistrationConfirm
|
|
|
|
ooGkClientTimerCb *cbData;
|
|
|
|
ooGkClientTimerCb *cbData;
|
|
|
|
ASN1UINT regTTL=0;
|
|
|
|
ASN1UINT regTTL=0;
|
|
|
|
/* Extract Endpoint Id */
|
|
|
|
/* Extract Endpoint Id */
|
|
|
|
|
|
|
|
if (pGkClient->endpointId.data)
|
|
|
|
|
|
|
|
memFreePtr(&pGkClient->ctxt, pGkClient->endpointId.data);
|
|
|
|
pGkClient->endpointId.nchars =
|
|
|
|
pGkClient->endpointId.nchars =
|
|
|
|
pRegistrationConfirm->endpointIdentifier.nchars;
|
|
|
|
pRegistrationConfirm->endpointIdentifier.nchars;
|
|
|
|
pGkClient->endpointId.data = (ASN116BITCHAR*)memAlloc(&pGkClient->ctxt,
|
|
|
|
pGkClient->endpointId.data = (ASN116BITCHAR*)memAlloc(&pGkClient->ctxt,
|
|
|
@ -1289,7 +1290,6 @@ int ooGkClientHandleRegistrationReject
|
|
|
|
memFreePtr(&pGkClient->ctxt, pTimer->cbData);
|
|
|
|
memFreePtr(&pGkClient->ctxt, pTimer->cbData);
|
|
|
|
ooTimerDelete(&pGkClient->ctxt, &pGkClient->timerList, pTimer);
|
|
|
|
ooTimerDelete(&pGkClient->ctxt, &pGkClient->timerList, pTimer);
|
|
|
|
OOTRACEDBGA1("Deleted RRQ Timer.\n");
|
|
|
|
OOTRACEDBGA1("Deleted RRQ Timer.\n");
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|