]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
MODSOFIA-39
authorBrian West <brian@freeswitch.org>
Mon, 23 Nov 2009 14:57:56 +0000 (14:57 +0000)
committerBrian West <brian@freeswitch.org>
Mon, 23 Nov 2009 14:57:56 +0000 (14:57 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15609 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/sofia_reg.c

index 909fa7b94716bfda6c09f261bb7173c556ec6402..25a3ffcd517b4f5484275f57fa47620037af25df 100644 (file)
@@ -1588,7 +1588,11 @@ static int sofia_reg_nonce_callback(void *pArg, int argc, char **argv, char **co
 {
        nonce_cb_t *cb = (nonce_cb_t *) pArg;
        switch_copy_string(cb->nonce, argv[0], cb->nplen);
-       cb->last_nc = zstr(argv[1]) ? 0 : atoi(argv[1]);
+       if (argc == 2) {
+               cb->last_nc = zstr(argv[1]) ? 0 : atoi(argv[1]);
+       } else {
+               cb->last_nc = 0;
+       }
        return 0;
 }