[Asterisk-cvs] asterisk/channels chan_iax2.c, 1.246,
1.247 chan_sip.c, 1.650, 1.651
markster at lists.digium.com
markster at lists.digium.com
Thu Feb 10 15:14:05 CST 2005
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv1210/channels
Modified Files:
chan_iax2.c chan_sip.c
Log Message:
Separate IAX and SIP tables for users/peers
Index: chan_iax2.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_iax2.c,v
retrieving revision 1.246
retrieving revision 1.247
diff -u -d -r1.246 -r1.247
--- chan_iax2.c 10 Feb 2005 20:04:42 -0000 1.246
+++ chan_iax2.c 10 Feb 2005 21:14:11 -0000 1.247
@@ -2197,7 +2197,7 @@
struct iax2_peer *peer=NULL;
time_t regseconds, nowtime;
int dynamic=0;
- var = ast_load_realtime("iaxfriends", "name", peername, NULL);
+ var = ast_load_realtime("iaxpeers", "name", peername, NULL);
if (var) {
/* Make sure it's not a user only... */
peer = build_peer(peername, var, ast_test_flag((&globalflags), IAX_RTCACHEFRIENDS) ? 0 : 1);
@@ -2259,7 +2259,7 @@
struct ast_variable *var;
struct ast_variable *tmp;
struct iax2_user *user=NULL;
- var = ast_load_realtime("iaxfriends", "name", username, NULL);
+ var = ast_load_realtime("iaxusers", "name", username, NULL);
if (var) {
/* Make sure it's not a user only... */
user = build_user(username, var, !ast_test_flag((&globalflags), IAX_RTCACHEFRIENDS));
@@ -2304,7 +2304,7 @@
snprintf(regseconds, sizeof(regseconds), "%ld", nowtime);
ast_inet_ntoa(ipaddr, sizeof(ipaddr), sin->sin_addr);
snprintf(port, sizeof(port), "%d", ntohs(sin->sin_port));
- ast_update_realtime("iaxfriends", "name", peername, "ipaddr", ipaddr, "port", port, "regseconds", regseconds, NULL);
+ ast_update_realtime("iaxpeers", "name", peername, "ipaddr", ipaddr, "port", port, "regseconds", regseconds, NULL);
}
Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.650
retrieving revision 1.651
diff -u -d -r1.650 -r1.651
--- chan_sip.c 10 Feb 2005 20:04:42 -0000 1.650
+++ chan_sip.c 10 Feb 2005 21:14:11 -0000 1.651
@@ -1076,7 +1076,7 @@
snprintf(regseconds, sizeof(regseconds), "%ld", nowtime);
ast_inet_ntoa(ipaddr, sizeof(ipaddr), sin->sin_addr);
snprintf(port, sizeof(port), "%d", ntohs(sin->sin_port));
- ast_update_realtime("sipfriends", "name", peername, "ipaddr", ipaddr, "port", port, "regseconds", regseconds, "username", username, NULL);
+ ast_update_realtime("sippeers", "name", peername, "ipaddr", ipaddr, "port", port, "regseconds", regseconds, "username", username, NULL);
}
static void register_peer_exten(struct sip_peer *peer, int onoff)
@@ -1133,12 +1133,12 @@
struct ast_variable *tmp;
if (peername)
- var = ast_load_realtime("sipfriends", "name", peername, NULL);
+ var = ast_load_realtime("sippeers", "name", peername, NULL);
else if (sin) {
char iabuf[80];
ast_inet_ntoa(iabuf, sizeof(iabuf), sin->sin_addr);
- var = ast_load_realtime("sipfriends", "ipaddr", iabuf, NULL);
+ var = ast_load_realtime("sippeers", "ipaddr", iabuf, NULL);
} else
return NULL;
@@ -1218,7 +1218,7 @@
struct ast_variable *tmp;
struct sip_user *user = NULL;
- var = ast_load_realtime("sipfriends", "name", username, NULL);
+ var = ast_load_realtime("sipusers", "name", username, NULL);
if (!var)
return NULL;
More information about the svn-commits
mailing list