[asterisk-commits] branch jcollie/bug7160 r27766 - /team/jcollie/bug7160/channel.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed May 17 06:28:49 MST 2006


Author: jcollie
Date: Wed May 17 08:28:49 2006
New Revision: 27766

URL: http://svn.digium.com/view/asterisk?rev=27766&view=rev
Log:
Fix a couple of bugs that were pointed out by kmilitzer on IRC.

Modified:
    team/jcollie/bug7160/channel.c

Modified: team/jcollie/bug7160/channel.c
URL: http://svn.digium.com/view/asterisk/team/jcollie/bug7160/channel.c?rev=27766&r1=27765&r2=27766&view=diff
==============================================================================
--- team/jcollie/bug7160/channel.c (original)
+++ team/jcollie/bug7160/channel.c Wed May 17 08:28:49 2006
@@ -479,12 +479,12 @@
 }
 
 /*! \brief Convert a symbolic hangup cause to number */
-int ast_str2cause(char *name)
+int ast_str2cause(const char *name)
 {
 	int x;
 
 	for (x = 0; x < sizeof(causes) / sizeof(causes[0]); x++)
-		if (strcasecmp(causes[x].name, name, strlen(causes[x].name)) == 0)
+		if (strncasecmp(causes[x].name, name, strlen(causes[x].name)) == 0)
 			return causes[x].cause;
 
 	return -1;



More information about the asterisk-commits mailing list