[Asterisk-cvs] asterisk/channels chan_iax2.c, 1.268, 1.269 chan_sip.c, 1.702, 1.703

kpfleming at lists.digium.com kpfleming at lists.digium.com
Wed Apr 6 16:19:55 CDT 2005


Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv17189/channels

Modified Files:
	chan_iax2.c chan_sip.c 
Log Message:


Index: chan_iax2.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_iax2.c,v
retrieving revision 1.268
retrieving revision 1.269
diff -u -d -r1.268 -r1.269
--- chan_iax2.c	4 Apr 2005 23:41:34 -0000	1.268
+++ chan_iax2.c	6 Apr 2005 21:12:32 -0000	1.269
@@ -37,6 +37,7 @@
 #include <asterisk/causes.h>
 #include <asterisk/localtime.h>
 #include <asterisk/aes.h>
+#include <asterisk/dnsmgr.h>
 #include <sys/mman.h>
 #include <arpa/inet.h>
 #include <dirent.h>
@@ -265,6 +266,7 @@
 	char peercontext[AST_MAX_EXTENSION];		/* Context to pass to peer */
 	char mailbox[AST_MAX_EXTENSION];		/* Mailbox */
 	struct ast_codec_pref prefs;
+	struct ast_dnsmgr_entry *dnsmgr;		/* DNS refresh manager */
 	struct sockaddr_in addr;
 	int formats;
 	int sockfd;					/* Socket to use for transmission */
@@ -7872,8 +7874,8 @@
 					if (peer->expire > -1)
 						ast_sched_del(sched, peer->expire);
 					peer->expire = -1;
-					ast_clear_flag(peer, IAX_DYNAMIC);	
-					if (ast_get_ip(&peer->addr, v->value)) {
+					ast_clear_flag(peer, IAX_DYNAMIC);
+					if (ast_dnsmgr_lookup(v->value, &peer->addr.sin_addr, &peer->dnsmgr)) {
 						free(peer);
 						return NULL;
 					}
@@ -8193,6 +8195,8 @@
 	if (peer->callno > 0)
 		iax2_destroy(peer->callno);
 	register_peer_exten(peer, 0);
+	if (peer->dnsmgr)
+		ast_dnsmgr_release(peer->dnsmgr);
 	free(peer);
 }
 

Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.702
retrieving revision 1.703
diff -u -d -r1.702 -r1.703
--- chan_sip.c	6 Apr 2005 17:03:50 -0000	1.702
+++ chan_sip.c	6 Apr 2005 21:12:32 -0000	1.703
@@ -41,6 +41,7 @@
 #include <asterisk/utils.h>
 #include <asterisk/file.h>
 #include <asterisk/astobj.h>
+#include <asterisk/dnsmgr.h>
 #ifdef OSP_SUPPORT
 #include <asterisk/astosp.h>
 #endif
@@ -549,6 +550,7 @@
 	int rtpkeepalive;		/* Send RTP packets for keepalive */
 	ast_group_t callgroup;		/* Call group */
 	ast_group_t pickupgroup;	/* Pickup group */
+	struct ast_dnsmgr_entry *dnsmgr;/* DNS refresh manager for peer */
 	struct sockaddr_in addr;	/* IP address of peer */
 	struct in_addr mask;
 
@@ -1253,6 +1255,8 @@
 		speerobjs--;
 	clear_realm_authentication(peer->auth);
 	peer->auth = (struct sip_auth *) NULL;
+	if (peer->dnsmgr)
+		ast_dnsmgr_release(peer->dnsmgr);
 	free(peer);
 }
 




More information about the svn-commits mailing list