aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_osplookup.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-11-21 13:41:28 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-11-21 13:41:28 +0000
commit4c7ca73ebaea2a28748983a6f3f5f1f8bbbe5660 (patch)
treefa4d4e67cf68a0341fdc868bc1e0acd4d3821493 /apps/app_osplookup.c
parent473d194b6edc1eaf9d70d01893e19730399bc873 (diff)
issue #5789
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7171 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_osplookup.c')
-rwxr-xr-xapps/app_osplookup.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/app_osplookup.c b/apps/app_osplookup.c
index d4f2c5352..2fe2d016a 100755
--- a/apps/app_osplookup.c
+++ b/apps/app_osplookup.c
@@ -217,6 +217,10 @@ static int ospnext_exec(struct ast_channel *chan, void *data)
temp = pbx_builtin_getvar_helper(chan, "OSPHANDLE");
result.handle = -1;
if (!ast_strlen_zero(temp) && (sscanf(temp, "%d", &result.handle) == 1) && (result.handle > -1)) {
+ temp = pbx_builtin_getvar_helper(chan, "OSPRESULTS");
+ if (ast_strlen_zero(temp) || (sscanf(temp, "%d", &result.numresults) != 1)) {
+ result.numresults = 0;
+ }
if ((res = ast_osp_next(&result, cause)) > 0) {
char tmp[80];
snprintf(tmp, sizeof(tmp), "%d", result.handle);