2005-11-21 Russell Bryant <russell@digium.com>
+ * apps/app_osplookup.c: Properly populate the number of results. (issue #5789)
+
* Makefile: Don't hard-code that poll functionality needs to be provided on Darwin.
* apps/Makefile: Fix incorrect portion of the patch to fix 'make install' on Solaris.
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);