ensure that ENUM count requests that are invalid return zero, not blank (issue #6371)
authorKevin P. Fleming <kpfleming@digium.com>
Tue, 14 Feb 2006 22:18:13 +0000 (22:18 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Tue, 14 Feb 2006 22:18:13 +0000 (22:18 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10064 65c4cc65-6c06-0410-ace0-fbb531ad65f3

enum.c

diff --git a/enum.c b/enum.c
index 86b269f..24514af 100644 (file)
--- a/enum.c
+++ b/enum.c
@@ -1,7 +1,7 @@
 /*
  * Asterisk -- An open source telephony toolkit.
  *
- * Copyright (C) 1999 - 2005, Digium, Inc.
+ * Copyright (C) 1999 - 2006, Digium, Inc.
  *
  * Mark Spencer <markster@digium.com>
  *
@@ -491,6 +491,7 @@ int ast_get_enum(struct ast_channel *chan, const char *number, char *dst, int ds
        }
        if (ret < 0) {
                ast_log(LOG_DEBUG, "No such number found: %s (%s)\n", tmp, strerror(errno));
+               strcpy(dst, "0");
                ret = 0;
        }