[Freeswitch-svn] [commit] r8291 - freeswitch/trunk/src/mod/languages/mod_perl

Freeswitch SVN anthm at freeswitch.org
Wed May 7 10:52:35 EDT 2008


Author: anthm
Date: Wed May  7 10:52:34 2008
New Revision: 8291

Modified:
   freeswitch/trunk/src/mod/languages/mod_perl/mod_perl.c

Log:
doh

Modified: freeswitch/trunk/src/mod/languages/mod_perl/mod_perl.c
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_perl/mod_perl.c	(original)
+++ freeswitch/trunk/src/mod/languages/mod_perl/mod_perl.c	Wed May  7 10:52:34 2008
@@ -311,6 +311,12 @@
 }
 
 SWITCH_STANDARD_API(perlrun_api_function) {
+
+	if (switch_strlen_zero(cmd)) {
+		stream->write_function(stream, "-ERR Missing args.\n");
+		return SWITCH_STATUS_SUCCESS;
+	}
+
 	perl_thread(cmd);
 	stream->write_function(stream, "+OK\n");
 	return SWITCH_STATUS_SUCCESS;
@@ -319,6 +325,12 @@
 SWITCH_STANDARD_API(perl_api_function) {
 
 	struct perl_o po = { 0 };
+
+	if (switch_strlen_zero(cmd)) {
+		stream->write_function(stream, "-ERR Missing args.\n");
+		return SWITCH_STATUS_SUCCESS;
+	}
+
 	po.cmd = strdup(cmd);
 	po.stream = stream;
 	po.session = session;



More information about the Freeswitch-svn mailing list