From: Mathieu Rene Date: Tue, 9 Mar 2010 19:16:10 +0000 (+0000) Subject: MODAPP-407 X-Git-Tag: v1.0.6~191 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ba5ad3d2670cdf2e54d8eeb5cca7135aea6bb05;p=thirdparty%2Ffreeswitch.git MODAPP-407 git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16957 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/mod/applications/mod_limit/mod_limit.c b/src/mod/applications/mod_limit/mod_limit.c index 95c8b750a7..44d900c8bf 100644 --- a/src/mod/applications/mod_limit/mod_limit.c +++ b/src/mod/applications/mod_limit/mod_limit.c @@ -637,8 +637,11 @@ SWITCH_STANDARD_API(group_api_function) limit_execute_sql_callback(NULL, sql, group_callback, &cbt); switch_safe_free(sql); - - *(buf + (strlen(buf) - 1)) = '\0'; + + if (!zstr(buf)) { + *(buf + (strlen(buf) - 1)) = '\0'; + } + stream->write_function(stream, "%s", buf); goto done; @@ -1163,7 +1166,7 @@ SWITCH_STANDARD_APP(limit_hash_execute_function) switch_core_session_execute_application(session, app, app_arg); /* Only release the resource if we are still in CS_EXECUTE */ if (switch_channel_get_state(switch_core_session_get_channel(session)) == CS_EXECUTE) { - limit_hash_release(session, realm, id); + limit_hash_release(session, realm, id); } } }