[Freeswitch-trunk] [commit] r12419 - in freeswitch/trunk/libs/sofia-sip: . s2check

FreeSWITCH SVN mikej at freeswitch.org
Wed Mar 4 12:37:56 PST 2009


Author: mikej
Date: Wed Mar  4 14:37:55 2009
New Revision: 12419

Log:
Wed Mar  4 12:31:05 CST 2009  Pekka Pessi <first.last at nokia.com>
  * s2_dns_domain(): more flexible selection of transports by URI parameters


Modified:
   freeswitch/trunk/libs/sofia-sip/.update
   freeswitch/trunk/libs/sofia-sip/s2check/s2dns.c

Modified: freeswitch/trunk/libs/sofia-sip/.update
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/.update	(original)
+++ freeswitch/trunk/libs/sofia-sip/.update	Wed Mar  4 14:37:55 2009
@@ -1 +1 @@
-Wed Mar  4 14:36:40 CST 2009
+Wed Mar  4 14:37:34 CST 2009

Modified: freeswitch/trunk/libs/sofia-sip/s2check/s2dns.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/s2check/s2dns.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/s2check/s2dns.c	Wed Mar  4 14:37:55 2009
@@ -97,14 +97,16 @@
 }
 
 /* Set filter function */
-void s2_dns_set_filter(int (*filter)(void *data, size_t len, void *userdata),
+void
+s2_dns_set_filter(int (*filter)(void *data, size_t len, void *userdata),
 		       void *userdata)
 {
   s2dns.filter = filter;
   s2dns.userdata = userdata;
 }
 
-void s2_dns_teardown(void)
+void
+s2_dns_teardown(void)
 {
   struct s2_dns_response *r, *next;
   su_root_deregister(s2dns.root, s2dns.reg), s2dns.reg = -1;
@@ -442,7 +444,7 @@
   }
 }
 
-/** Set up DNS domain */
+/** Set up records for SIP server */
 void s2_dns_domain(char const *domain, int use_naptr,
 		   /* char *prefix, int priority, url_t const *uri, */
 		   ...)
@@ -471,7 +473,9 @@
       char *services = NULL;
 
       priority = va_arg(va, int);
-      uri = va_arg(va, url_t *); assert(uri);
+      uri = va_arg(va, url_t *);
+      if (uri == NULL)
+	continue;
 
       if (uri->url_type == url_sips) {
 	services = "SIPS+D2T";
@@ -499,7 +503,9 @@
 
     for (;(prefix = va_arg(va, char *));) {
       priority = va_arg(va, int);
-      uri = va_arg(va, url_t *); assert(uri);
+      uri = va_arg(va, url_t *);
+      if (uri == NULL)
+	continue;
 
       make_server(server, prefix, domain);
 
@@ -518,7 +524,9 @@
   va_copy(va, va0);
   for (;(prefix = va_arg(va, char *));) {
     priority = va_arg(va, int);
-    uri = va_arg(va, url_t *); assert(uri);
+    uri = va_arg(va, url_t *);
+    if (uri == NULL)
+      continue;
 
     make_server(server, prefix, domain);
 
@@ -539,7 +547,8 @@
   va_copy(va, va0);
   for (;(prefix = va_arg(va, char *));) {
     (void)va_arg(va, int);
-    (void)va_arg(va, url_t *);
+    if (va_arg(va, url_t *) == NULL)
+      continue;
 
     memset(m, 0, sizeof m);
     make_server(server, prefix, domain);



More information about the Freeswitch-trunk mailing list