mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
fix restrictcid with mysql users (bug #3442)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@4915 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1072,7 +1072,7 @@ static struct sip_user *mysql_user(char *user)
|
|||||||
if (sscanf(rowval[x], "%li", ®seconds) != 1)
|
if (sscanf(rowval[x], "%li", ®seconds) != 1)
|
||||||
regseconds = 0;
|
regseconds = 0;
|
||||||
} else if (!strcasecmp(fields[x].name, "restrictcid")) {
|
} else if (!strcasecmp(fields[x].name, "restrictcid")) {
|
||||||
u->restrictcid = 1;
|
u->restrictcid = *(rowval[x])-'0';
|
||||||
} else if (!strcasecmp(fields[x].name, "callerid")) {
|
} else if (!strcasecmp(fields[x].name, "callerid")) {
|
||||||
strncpy(u->callerid, rowval[x], sizeof(u->callerid) - 1);
|
strncpy(u->callerid, rowval[x], sizeof(u->callerid) - 1);
|
||||||
u->hascallerid=1;
|
u->hascallerid=1;
|
||||||
|
Reference in New Issue
Block a user