[Freeswitch-svn] [commit] r10952 - in freeswitch/trunk/libs/esl: . src

FreeSWITCH SVN mikej at freeswitch.org
Fri Dec 26 10:11:31 PST 2008


Author: mikej
Date: Fri Dec 26 13:11:31 2008
New Revision: 10952

Log:
fix /log

Modified:
   freeswitch/trunk/libs/esl/fs_cli.c
   freeswitch/trunk/libs/esl/src/esl.c

Modified: freeswitch/trunk/libs/esl/fs_cli.c
==============================================================================
--- freeswitch/trunk/libs/esl/fs_cli.c	(original)
+++ freeswitch/trunk/libs/esl/fs_cli.c	Fri Dec 26 13:11:31 2008
@@ -121,8 +121,6 @@
 
 static int process_command(esl_handle_t *handle, const char *cmd) 
 {
-	char cmd_str[1024];
-
 	if (
 		!strcasecmp(cmd, "exit") ||
 		!strcasecmp(cmd, "quit") ||
@@ -140,8 +138,7 @@
 		!strncasecmp(cmd, "filter", 6)
 		) {
 
-		snprintf(cmd_str, sizeof(cmd_str), "%s\n\n", cmd);
-		esl_send_recv(handle, cmd_str);	
+		esl_send_recv(handle, cmd);	
 
 		printf("%s\n", handle->last_sr_reply);
 

Modified: freeswitch/trunk/libs/esl/src/esl.c
==============================================================================
--- freeswitch/trunk/libs/esl/src/esl.c	(original)
+++ freeswitch/trunk/libs/esl/src/esl.c	Fri Dec 26 13:11:31 2008
@@ -867,7 +867,7 @@
 	}
 	
 	if (!(*e == '\n' && *(e-1) == '\n')) {
-		if (send(handle->sock, "\n\n", 2, 0)) {
+		if (send(handle->sock, "\n\n", 2, 0) != 2) {
 			strerror_r(handle->errnum, handle->err, sizeof(handle->err));
 			return ESL_FAIL;
 		}



More information about the Freeswitch-svn mailing list