Fix compiler warnings.
authorBJ Weschke <bweschke@btwtech.com>
Mon, 2 Jan 2006 01:53:26 +0000 (01:53 +0000)
committerBJ Weschke <bweschke@btwtech.com>
Mon, 2 Jan 2006 01:53:26 +0000 (01:53 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7705 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_iax2.c
channels/chan_sip.c

index fafb708..3cb14c4 100644 (file)
@@ -2602,7 +2602,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 *)&regseconds) != 1)
+                       if (sscanf(tmp->value, "%ld", (time_t *)&regseconds) != 1)
                                regseconds = 0;
                } else if (!strcasecmp(tmp->name, "ipaddr")) {
                        inet_aton(tmp->value, &(peer->addr.sin_addr));
index d8d2507..0cdbc4b 100644 (file)
@@ -12048,7 +12048,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 *)&regseconds) != 1)
+                       if (sscanf(v->value, "%ld", (time_t *)&regseconds) != 1)
                                regseconds = 0;
                } else if (realtime && !strcasecmp(v->name, "ipaddr") && !ast_strlen_zero(v->value) ) {
                        inet_aton(v->value, &(peer->addr.sin_addr));