[asterisk-addons-commits] objsys: branch 1.2 r346 -
/branches/1.2/asterisk-ooh323c/ooh323c/src/
asterisk-addons-commits at lists.digium.com
asterisk-addons-commits at lists.digium.com
Mon Mar 5 15:41:12 MST 2007
Author: objsys
Date: Mon Mar 5 16:41:12 2007
New Revision: 346
URL: http://svn.digium.com/view/asterisk-addons?view=rev&rev=346
Log:
keepalive Regstration Message for ep value
Modified:
branches/1.2/asterisk-ooh323c/ooh323c/src/ooGkClient.c
Modified: branches/1.2/asterisk-ooh323c/ooh323c/src/ooGkClient.c
URL: http://svn.digium.com/view/asterisk-addons/branches/1.2/asterisk-ooh323c/ooh323c/src/ooGkClient.c?view=diff&rev=346&r1=345&r2=346
==============================================================================
--- branches/1.2/asterisk-ooh323c/ooh323c/src/ooGkClient.c (original)
+++ branches/1.2/asterisk-ooh323c/ooh323c/src/ooGkClient.c Mon Mar 5 16:41:12 2007
@@ -981,6 +981,37 @@
pRegReq->discoveryComplete= pGkClient->discoveryComplete;
pRegReq->m.keepAlivePresent=TRUE;
pRegReq->keepAlive= keepAlive;
+
+ /*
+ * Cisco Gatekeeper re-registration fix. Thanks to Mike Tubby (mike at tubby.org) 28feb2007
+ * Without this patch initial registration works, but re-registration fails!
+ *
+ * For light-weight re-registration, keepalive is set true
+ * GK needs rasAddress, keepAlive, endpointIdentifier, gatekeeperIdentifier,
+ * tokens, and timeToLive
+ * GK will ignore all other params if KeepAlive is set.
+ *
+ */
+ if(keepAlive) {
+ /* KeepAlive, re-registration message...
+ 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 */
+ pRegReq->endpointIdentifier.data =
+ (ASN116BITCHAR*)memAlloc(pctxt, pGkClient->gkId.nchars*sizeof(ASN116BITCHAR));
+ if (pRegReq->endpointIdentifier.data) {
+ pRegReq->endpointIdentifier.nchars = pGkClient->endpointId.nchars;
+ pRegReq->m.endpointIdentifierPresent = TRUE;
+ memcpy(pRegReq->endpointIdentifier.data, pGkClient->endpointId.data, pGkClient->endpointId.nchars*sizeof(ASN116BITCHAR));
+ OOTRACEINFO1("Sending RRQ for re-registration (with EndpointID)\n");
+ }
+ else {
+ OOTRACEERR1("Error: Failed to allocate memory for EndpointIdentifier in RRQ \n");
+ memReset(pctxt);
+ pGkClient->state = GkClientFailed;
+ return OO_FAILED;
+ }
+ }
+
pRegReq->m.timeToLivePresent = TRUE;
pRegReq->timeToLive = pGkClient->regTimeout;
More information about the asterisk-addons-commits
mailing list