]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
doh
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 7 May 2008 14:52:34 +0000 (14:52 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 7 May 2008 14:52:34 +0000 (14:52 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8291 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/languages/mod_perl/mod_perl.c

index 8b5c19252dae1dcc8187bbc28f2c68778280d5bc..62769d122623fee5ce8074676b86b4cc9c4e1feb 100644 (file)
@@ -311,6 +311,12 @@ int perl_thread(const char *text)
 }
 
 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(perlrun_api_function) {
 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;