Fix lookup cidname (bug #2609)
authorMark Spencer <markster@digium.com>
Fri, 8 Oct 2004 15:44:28 +0000 (15:44 +0000)
committerMark Spencer <markster@digium.com>
Fri, 8 Oct 2004 15:44:28 +0000 (15:44 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3950 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_lookupcidname.c

index aac3191..52d9670 100755 (executable)
@@ -47,12 +47,11 @@ static int
 lookupcidname_exec (struct ast_channel *chan, void *data)
 {
   char dbname[64];
-  char shrunknum[64] = "";
   struct localuser *u;
 
   LOCAL_USER_ADD (u);
   if (chan->cid.cid_num) {
-       if (!ast_db_get ("cidname", shrunknum, dbname, sizeof (dbname))) {
+       if (!ast_db_get ("cidname", chan->cid.cid_num, dbname, sizeof (dbname))) {
                ast_set_callerid (chan, NULL, dbname, NULL);
                  if (option_verbose > 2)
                    ast_verbose (VERBOSE_PREFIX_3 "Changed Caller*ID name to %s\n",