]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
fix restrictcid with mysql users (bug #3442)
authorRussell Bryant <russell@russellbryant.com>
Sat, 29 Jan 2005 07:06:57 +0000 (07:06 +0000)
committerRussell Bryant <russell@russellbryant.com>
Sat, 29 Jan 2005 07:06:57 +0000 (07:06 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@4915 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 0a670384816452c924a0e6059ed97470abdda909..5b63817963fd155c5ea9f4f900d5cc8019f885b5 100755 (executable)
@@ -1072,7 +1072,7 @@ static struct sip_user *mysql_user(char *user)
                                                        if (sscanf(rowval[x], "%li", &regseconds) != 1)
                                                                regseconds = 0;
                                                } else if (!strcasecmp(fields[x].name, "restrictcid")) {
-                                                       u->restrictcid = 1;
+                                                       u->restrictcid = *(rowval[x])-'0';
                                                } else if (!strcasecmp(fields[x].name, "callerid")) {
                                                        strncpy(u->callerid, rowval[x], sizeof(u->callerid) - 1);
                                                        u->hascallerid=1;