[svn-commits] may: branch 10 r371022 - in /branches/10: ./ addons/ooh323c/src/ooGkClient.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Aug 9 14:20:12 CDT 2012


Author: may
Date: Thu Aug  9 14:20:09 2012
New Revision: 371022

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=371022
Log:
Fix to resend GRQ/RRQ if RRJ (registration reject) is received

(close issue ASTERISK-20094)

Patches:
   ASTERISK-20094.patch
........

Merged revisions 371011 from http://svn.asterisk.org/svn/asterisk/branches/1.8

Modified:
    branches/10/   (props changed)
    branches/10/addons/ooh323c/src/ooGkClient.c

Propchange: branches/10/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: branches/10/addons/ooh323c/src/ooGkClient.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/addons/ooh323c/src/ooGkClient.c?view=diff&rev=371022&r1=371021&r2=371022
==============================================================================
--- branches/10/addons/ooh323c/src/ooGkClient.c (original)
+++ branches/10/addons/ooh323c/src/ooGkClient.c Thu Aug  9 14:20:09 2012
@@ -810,6 +810,9 @@
    if(pGatekeeperConfirm->m.gatekeeperIdentifierPresent) 
    {
       pGkClient->gkId.nchars = pGatekeeperConfirm->gatekeeperIdentifier.nchars;
+      if (pGkClient->gkId.data) {
+         memFreePtr(&pGkClient->ctxt, pGkClient->gkId.data);
+      }
       pGkClient->gkId.data = (ASN116BITCHAR*)memAlloc(&pGkClient->ctxt,
                               sizeof(ASN116BITCHAR)*pGkClient->gkId.nchars);
       if(!pGkClient->gkId.data)
@@ -1369,7 +1372,20 @@
    default:
       OOTRACEINFO1("RRQ Rejected - Invalid Reason\n");
    }
-   pGkClient->state = GkClientGkErr;
+
+   /* send again GRQ/RRQ's */
+   ast_mutex_lock(&pGkClient->Lock);
+   pGkClient->state = GkClientUnregistered;
+   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");
+      return OO_FAILED;
+   }
    return OO_OK;
 }
 




More information about the svn-commits mailing list