[asterisk-commits] qwell: branch 1.4 r70494 - /branches/1.4/channels/chan_skinny.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jun 20 15:53:17 CDT 2007


Author: qwell
Date: Wed Jun 20 15:53:16 2007
New Revision: 70494

URL: http://svn.digium.com/view/asterisk?view=rev&rev=70494
Log:
Make sure we clear the previously dialed number if it did not exist.

Issue 9958.

Modified:
    branches/1.4/channels/chan_skinny.c

Modified: branches/1.4/channels/chan_skinny.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_skinny.c?view=diff&rev=70494&r1=70493&r2=70494
==============================================================================
--- branches/1.4/channels/chan_skinny.c (original)
+++ branches/1.4/channels/chan_skinny.c Wed Jun 20 15:53:16 2007
@@ -2358,6 +2358,7 @@
 			}
 		} else if (res == 0) {
 			ast_log(LOG_DEBUG, "Not enough digits (and no ambiguous match)...\n");
+			memset(d->exten, 0, sizeof(d->exten));
 			transmit_tone(s, SKINNY_REORDER);
 			if (sub->owner && sub->owner->_state != AST_STATE_UP) {
 				ast_indicate(c, -1);
@@ -2367,6 +2368,7 @@
 		} else if (!ast_canmatch_extension(c, c->context, d->exten, 1, c->cid.cid_num) &&
 			   ((d->exten[0] != '*') || (!ast_strlen_zero(d->exten) > 2))) {
 			ast_log(LOG_WARNING, "Can't match [%s] from '%s' in context %s\n", d->exten, c->cid.cid_num ? c->cid.cid_num : "<Unknown Caller>", c->context);
+			memset(d->exten, 0, sizeof(d->exten));
 			transmit_tone(s, SKINNY_REORDER);
 			/* hang out for 3 seconds to let congestion play */
 			ast_safe_sleep(c, 3000);
@@ -2382,6 +2384,7 @@
 	if (c)
 		ast_hangup(c);
 
+	memset(d->exten, 0, sizeof(d->exten));
 	return NULL;
 }
 




More information about the asterisk-commits mailing list