[asterisk-commits] rmudgett: branch rmudgett/external_mwi r403575 - /team/rmudgett/external_mwi/...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Dec 9 16:05:57 CST 2013


Author: rmudgett
Date: Mon Dec  9 16:05:55 2013
New Revision: 403575

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=403575
Log:
Simplify a regex pattern since the pattern matching assumes the pattern could be matched anywhere in a string.

Modified:
    team/rmudgett/external_mwi/res/res_mwi_external.c

Modified: team/rmudgett/external_mwi/res/res_mwi_external.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/external_mwi/res/res_mwi_external.c?view=diff&rev=403575&r1=403574&r2=403575
==============================================================================
--- team/rmudgett/external_mwi/res/res_mwi_external.c (original)
+++ team/rmudgett/external_mwi/res/res_mwi_external.c Mon Dec  9 16:05:55 2013
@@ -626,8 +626,8 @@
 	const struct ast_mwi_mailbox_object *mailbox;
 	RAII_VAR(struct ao2_container *, mailboxes, NULL, ao2_cleanup);
 
-	regex = ast_alloca(4 + wordlen);
-	sprintf(regex, "^%s.*", word);/* Safe */
+	regex = ast_alloca(2 + wordlen);
+	sprintf(regex, "^%s", word);/* Safe */
 
 	mailboxes = ast_mwi_mailbox_get_by_regex(regex);
 	if (!mailboxes) {




More information about the asterisk-commits mailing list