Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c (15608 => 15609)
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c 2009-11-23 14:55:09 UTC (rev 15608)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c 2009-11-23 14:57:56 UTC (rev 15609)
@@ -1588,7 +1588,11 @@
{
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;
}