[Asterisk-cvs] asterisk/channels chan_iax2.c,1.298,1.299
kpfleming at lists.digium.com
kpfleming at lists.digium.com
Fri Jun 3 16:59:54 CDT 2005
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv10505/channels
Modified Files:
chan_iax2.c
Log Message:
use ast_strip_quoted to strip brackets from key secrets
Index: chan_iax2.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_iax2.c,v
retrieving revision 1.298
retrieving revision 1.299
diff -u -d -r1.298 -r1.299
--- chan_iax2.c 3 Jun 2005 18:46:58 -0000 1.298
+++ chan_iax2.c 3 Jun 2005 21:02:51 -0000 1.299
@@ -2877,13 +2877,8 @@
move it to the key field instead
*/
if (pds->password && (pds->password[0] == '[')) {
- int len = strlen(pds->password);
-
- if ((len > 2) && (pds->password[len - 1] == ']')) {
- pds->key = ++(pds->password);
- pds->password[len - 1] = '\0';
- pds->password = NULL;
- }
+ pds->key = ast_strip_quoted(pds->password, "[", "]");
+ pds->password = NULL;
}
}
More information about the svn-commits
mailing list