mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-16 09:52:24 +00:00
Fix compiler warnings.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7706 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2599,7 +2599,7 @@ static struct iax2_peer *realtime_peer(const char *peername, struct sockaddr_in
|
||||
break;
|
||||
}
|
||||
} else if (!strcasecmp(tmp->name, "regseconds")) {
|
||||
if (sscanf(tmp->value, "%i", (int *)®seconds) != 1)
|
||||
if (sscanf(tmp->value, "%ld", (time_t *)®seconds) != 1)
|
||||
regseconds = 0;
|
||||
} else if (!strcasecmp(tmp->name, "ipaddr")) {
|
||||
inet_aton(tmp->value, &(peer->addr.sin_addr));
|
||||
|
@@ -12066,7 +12066,7 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, int
|
||||
}
|
||||
|
||||
if (realtime && !strcasecmp(v->name, "regseconds")) {
|
||||
if (sscanf(v->value, "%i", (int *)®seconds) != 1)
|
||||
if (sscanf(v->value, "%ld", (time_t *)®seconds) != 1)
|
||||
regseconds = 0;
|
||||
} else if (realtime && !strcasecmp(v->name, "ipaddr") && !ast_strlen_zero(v->value) ) {
|
||||
inet_aton(v->value, &(peer->addr.sin_addr));
|
||||
|
Reference in New Issue
Block a user