summaryrefslogtreecommitdiff
path: root/main/enum.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/enum.c')
-rw-r--r--main/enum.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/main/enum.c b/main/enum.c
index 92f185c60..aace1fce0 100644
--- a/main/enum.c
+++ b/main/enum.c
@@ -856,6 +856,7 @@ int ast_get_enum(struct ast_channel *chan, const char *number, char *dst, int ds
if (ret < 0) {
ast_debug(1, "No such number found: %s (%s)\n", tmp, strerror(errno));
+ context->naptr_rrs_count = -1;
strcpy(dst, "0");
ret = 0;
}
@@ -896,7 +897,7 @@ int ast_get_enum(struct ast_channel *chan, const char *number, char *dst, int ds
} else if (!(context->options & ENUMLOOKUP_OPTIONS_COUNT)) {
context->dst[0] = 0;
} else if ((context->options & ENUMLOOKUP_OPTIONS_COUNT)) {
- snprintf(context->dst, context->dstlen, "%d", context->count);
+ snprintf(context->dst, context->dstlen, "%d", context->naptr_rrs_count + context->count);
}
if (chan) {