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:
Russell Bryant
2005-01-29 07:06:57 +00:00
parent 081e28667e
commit bdcbd76e13

View File

@@ -1072,7 +1072,7 @@ static struct sip_user *mysql_user(char *user)
if (sscanf(rowval[x], "%li", &regseconds) != 1) if (sscanf(rowval[x], "%li", &regseconds) != 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;