[Asterisk-cvs] asterisk/apps app_chanspy.c,1.2,1.3

anthm at lists.digium.com anthm at lists.digium.com
Wed Mar 23 21:30:27 CST 2005


Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv26533/apps

Modified Files:
	app_chanspy.c 
Log Message:
forgot to fix this


Index: app_chanspy.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_chanspy.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- app_chanspy.c	24 Mar 2005 02:47:19 -0000	1.2
+++ app_chanspy.c	24 Mar 2005 03:24:51 -0000	1.3
@@ -19,6 +19,7 @@
 #include <asterisk/app.h>
 #include <asterisk/utils.h>
 #include <asterisk/say.h>
+#include <asterisk/channel_pvt.h>
 #include <asterisk/pbx.h>
 #include <asterisk/translate.h>
 #include <asterisk/module.h>
@@ -184,7 +185,6 @@
 	f1 = spy_queue_shift(csth->spy, 1);
 	ast_mutex_unlock(&csth->spy->lock);
 
-
 	if (f0 && f1) {
 		if (!csth->trans0) {
 			if (f0->subclass != AST_FORMAT_SLINEAR && (csth->trans0 = ast_translator_build_path(AST_FORMAT_SLINEAR, f0->subclass)) == NULL) {
@@ -507,11 +507,18 @@
 						
 					if (peer && (!bronly || ast_bridged_channel(peer)) &&
 						!ast_check_hangup(peer) && !ast_test_flag(peer, AST_FLAG_SPYING)) {
+						int x = 0;
+
 						strncpy(peer_name, peer->name, AST_NAME_STRLEN);
 						ptr = strchr(peer_name, '/');
 						*ptr = '\0';
 						ptr++;
-						peer_name[0] = tolower(peer_name[0]);
+						for (x = 0 ; x < strlen(peer_name) ; x++) {
+							if(peer_name[x] == '/') {
+								break;
+							}
+							peer_name[x] = tolower(peer_name[x]);
+						}
 
 						if (!silent) {
 							if (ast_fileexists(peer_name, NULL, NULL) != -1) {




More information about the svn-commits mailing list