[Freeswitch-svn] [commit] r4201 - in freeswitch/trunk/libs/sofia-sip: libsofia-sip-ua/iptsec libsofia-sip-ua/nta libsofia-sip-ua/nua libsofia-sip-ua/su libsofia-sip-ua/url libsofia-sip-ua/url/sofia-sip packages

Freeswitch SVN mikej at freeswitch.org
Mon Feb 12 11:01:22 EST 2007


Author: mikej
Date: Mon Feb 12 11:01:22 2007
New Revision: 4201

Modified:
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/Makefile.am
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/Makefile.in
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_session.c
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_osx_runloop.c
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/sofia-sip/url.h
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/torture_url.c
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/url.c
   freeswitch/trunk/libs/sofia-sip/packages/sofia-sip.spec.in

Log:
merge fixes to sofia-sip including double free causing segfault or assert in sres

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/Makefile.am	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/Makefile.am	Mon Feb 12 11:01:22 2007
@@ -31,40 +31,22 @@
 
 BUILT_SOURCES = 	auth_tag_ref.c
 
-HTTP_SRC =		auth_module_http.c
-if HAVE_NTH
-USE_HTTP_SRC = 		$(HTTP_SRC)
-OPT_LDDD =		../http/libhttp.la
-endif
-
 nobase_include_sofia_HEADERS = \
 			sofia-sip/auth_common.h \
 			sofia-sip/auth_client.h sofia-sip/auth_digest.h \
 			sofia-sip/auth_module.h sofia-sip/auth_plugin.h \
-			sofia-sip/auth_client_plugin.h \
-			$(NTLM_HEADER)
+			sofia-sip/auth_client_plugin.h
 
 libiptsec_la_SOURCES = 	iptsec_debug.h \
 			auth_client.c auth_common.c auth_digest.c \
 			auth_module.c auth_tag.c auth_tag_ref.c \
 			auth_plugin.c auth_plugin_delayed.c \
 			auth_module_sip.c \
-			$(NTLM_SOURCE) \
-			$(USE_HTTP_SOURCE) \
 			iptsec_debug.c
 
-NTLM_HEADER = 		sofia-sip/auth_ntlm.h
-if HAVE_NTLM
-NTLM_SOURCE = 		auth_ntlm.c auth_client_ntlm.c auth_plugin_ntlm.c
-endif
-
-EXTRA_libiptsec_la_SOURCES = \
-			auth_ntlm.c auth_client_ntlm.c auth_plugin_ntlm.c
-
 COVERAGE_INPUT = 	$(libiptsec_la_SOURCES) $(include_sofia_HEADERS)
 
 LDADD = 		libiptsec.la \
-			$(OPT_LDADD) \
 			../nta/libnta.la \
 			../sip/libsip.la \
 			../msg/libmsg.la \
@@ -75,11 +57,28 @@
 
 test_auth_digest_LDFLAGS = -static
 
+if HAVE_NTLM
+nobase_include_sofia_HEADERS += $(NTLM_HEADER)
+libiptsec_la_SOURCES += $(NTLM_SOURCE)
+endif
+
+if HAVE_NTH
+libiptsec_la_SOURCES += $(HTTP_SOURCE)
+LDADD +=		../http/libhttp.la
+endif
+
+HTTP_SOURCE =		auth_module_http.c
+
+NTLM_HEADER = 		sofia-sip/auth_ntlm.h
+NTLM_SOURCE = 		auth_ntlm.c auth_client_ntlm.c auth_plugin_ntlm.c
+
+EXTRA_libiptsec_la_SOURCES = \
+			$(NTLM_HEADER) $(NTLM_SOURCE) $(HTTP_SOURCE)
+
 # ----------------------------------------------------------------------
 # Install and distribution rules
 
-EXTRA_DIST = 		Doxyfile iptsec.docs testpasswd \
-			auth_module_sip.c $(HTTP_SRC) $(BUILT_SOURCES)
+EXTRA_DIST = 		Doxyfile iptsec.docs testpasswd $(BUILT_SOURCES)
 
 # ----------------------------------------------------------------------
 # Sofia specific rules

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/Makefile.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/Makefile.in	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/Makefile.in	Mon Feb 12 11:01:22 2007
@@ -79,12 +79,17 @@
 host_triplet = @host@
 target_triplet = @target@
 check_PROGRAMS = test_auth_digest$(EXEEXT)
-DIST_COMMON = $(nobase_include_sofia_HEADERS) $(srcdir)/Makefile.am \
-	$(srcdir)/Makefile.in $(top_srcdir)/rules/sofia.am \
-	$(top_srcdir)/rules/valcheck.am ChangeLog
+ at HAVE_NTLM_TRUE@am__append_1 = $(NTLM_HEADER)
+ at HAVE_NTLM_TRUE@am__append_2 = $(NTLM_SOURCE)
+ at HAVE_NTH_TRUE@am__append_3 = $(HTTP_SOURCE)
+ at HAVE_NTH_TRUE@am__append_4 = ../http/libhttp.la
+DIST_COMMON = $(am__nobase_include_sofia_HEADERS_DIST) \
+	$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+	$(top_srcdir)/rules/sofia.am $(top_srcdir)/rules/valcheck.am \
+	ChangeLog
 
 # Use with --enable-ndebug
- at NDEBUG_TRUE@am__append_1 = -DNDEBUG
+ at NDEBUG_TRUE@am__append_5 = -DNDEBUG
 subdir = libsofia-sip-ua/iptsec
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/sac-general.m4 \
@@ -102,21 +107,25 @@
 am__libiptsec_la_SOURCES_DIST = iptsec_debug.h auth_client.c \
 	auth_common.c auth_digest.c auth_module.c auth_tag.c \
 	auth_tag_ref.c auth_plugin.c auth_plugin_delayed.c \
-	auth_module_sip.c auth_ntlm.c auth_client_ntlm.c \
-	auth_plugin_ntlm.c iptsec_debug.c
- at HAVE_NTLM_TRUE@am__objects_1 = auth_ntlm.lo auth_client_ntlm.lo \
- at HAVE_NTLM_TRUE@	auth_plugin_ntlm.lo
+	auth_module_sip.c iptsec_debug.c auth_ntlm.c \
+	auth_client_ntlm.c auth_plugin_ntlm.c auth_module_http.c
+am__objects_1 = auth_ntlm.lo auth_client_ntlm.lo auth_plugin_ntlm.lo
+ at HAVE_NTLM_TRUE@am__objects_2 = $(am__objects_1)
+am__objects_3 = auth_module_http.lo
+ at HAVE_NTH_TRUE@am__objects_4 = $(am__objects_3)
 am_libiptsec_la_OBJECTS = auth_client.lo auth_common.lo auth_digest.lo \
 	auth_module.lo auth_tag.lo auth_tag_ref.lo auth_plugin.lo \
-	auth_plugin_delayed.lo auth_module_sip.lo $(am__objects_1) \
-	iptsec_debug.lo
+	auth_plugin_delayed.lo auth_module_sip.lo iptsec_debug.lo \
+	$(am__objects_2) $(am__objects_4)
 libiptsec_la_OBJECTS = $(am_libiptsec_la_OBJECTS)
 test_auth_digest_SOURCES = test_auth_digest.c
 test_auth_digest_OBJECTS = test_auth_digest.$(OBJEXT)
 test_auth_digest_LDADD = $(LDADD)
+ at HAVE_NTH_TRUE@am__DEPENDENCIES_1 = ../http/libhttp.la
 test_auth_digest_DEPENDENCIES = libiptsec.la ../nta/libnta.la \
 	../sip/libsip.la ../msg/libmsg.la ../url/liburl.la \
-	../bnf/libbnf.la ../ipt/libipt.la ../su/libsu.la
+	../bnf/libbnf.la ../ipt/libipt.la ../su/libsu.la \
+	$(am__DEPENDENCIES_1)
 DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -I$(top_builddir)/libsofia-sip-ua/su/sofia-sip
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
@@ -132,6 +141,10 @@
 	test_auth_digest.c
 DIST_SOURCES = $(am__libiptsec_la_SOURCES_DIST) \
 	$(EXTRA_libiptsec_la_SOURCES) test_auth_digest.c
+am__nobase_include_sofia_HEADERS_DIST = sofia-sip/auth_common.h \
+	sofia-sip/auth_client.h sofia-sip/auth_digest.h \
+	sofia-sip/auth_module.h sofia-sip/auth_plugin.h \
+	sofia-sip/auth_client_plugin.h sofia-sip/auth_ntlm.h
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -314,50 +327,31 @@
 # ----------------------------------------------------------------------
 # Rules for building the targets
 BUILT_SOURCES = auth_tag_ref.c
-HTTP_SRC = auth_module_http.c
- at HAVE_NTH_TRUE@USE_HTTP_SRC = $(HTTP_SRC)
- at HAVE_NTH_TRUE@OPT_LDDD = ../http/libhttp.la
-nobase_include_sofia_HEADERS = \
-			sofia-sip/auth_common.h \
-			sofia-sip/auth_client.h sofia-sip/auth_digest.h \
-			sofia-sip/auth_module.h sofia-sip/auth_plugin.h \
-			sofia-sip/auth_client_plugin.h \
-			$(NTLM_HEADER)
-
-libiptsec_la_SOURCES = iptsec_debug.h \
-			auth_client.c auth_common.c auth_digest.c \
-			auth_module.c auth_tag.c auth_tag_ref.c \
-			auth_plugin.c auth_plugin_delayed.c \
-			auth_module_sip.c \
-			$(NTLM_SOURCE) \
-			$(USE_HTTP_SOURCE) \
-			iptsec_debug.c
-
+nobase_include_sofia_HEADERS = sofia-sip/auth_common.h \
+	sofia-sip/auth_client.h sofia-sip/auth_digest.h \
+	sofia-sip/auth_module.h sofia-sip/auth_plugin.h \
+	sofia-sip/auth_client_plugin.h $(am__append_1)
+libiptsec_la_SOURCES = iptsec_debug.h auth_client.c auth_common.c \
+	auth_digest.c auth_module.c auth_tag.c auth_tag_ref.c \
+	auth_plugin.c auth_plugin_delayed.c auth_module_sip.c \
+	iptsec_debug.c $(am__append_2) $(am__append_3)
+COVERAGE_INPUT = $(libiptsec_la_SOURCES) $(include_sofia_HEADERS)
+LDADD = libiptsec.la ../nta/libnta.la ../sip/libsip.la \
+	../msg/libmsg.la ../url/liburl.la ../bnf/libbnf.la \
+	../ipt/libipt.la ../su/libsu.la $(am__append_4)
+test_auth_digest_LDFLAGS = -static
+HTTP_SOURCE = auth_module_http.c
 NTLM_HEADER = sofia-sip/auth_ntlm.h
- at HAVE_NTLM_TRUE@NTLM_SOURCE = auth_ntlm.c auth_client_ntlm.c auth_plugin_ntlm.c
+NTLM_SOURCE = auth_ntlm.c auth_client_ntlm.c auth_plugin_ntlm.c
 EXTRA_libiptsec_la_SOURCES = \
-			auth_ntlm.c auth_client_ntlm.c auth_plugin_ntlm.c
+			$(NTLM_HEADER) $(NTLM_SOURCE) $(HTTP_SOURCE)
 
-COVERAGE_INPUT = $(libiptsec_la_SOURCES) $(include_sofia_HEADERS)
-LDADD = libiptsec.la \
-			$(OPT_LDADD) \
-			../nta/libnta.la \
-			../sip/libsip.la \
-			../msg/libmsg.la \
-			../url/liburl.la \
-			../bnf/libbnf.la \
-			../ipt/libipt.la \
-			../su/libsu.la
-
-test_auth_digest_LDFLAGS = -static
 
 # ----------------------------------------------------------------------
 # Install and distribution rules
-EXTRA_DIST = Doxyfile iptsec.docs testpasswd \
-			auth_module_sip.c $(HTTP_SRC) $(BUILT_SOURCES)
-
+EXTRA_DIST = Doxyfile iptsec.docs testpasswd $(BUILT_SOURCES)
 AM_CFLAGS = $(CWFLAG) $(SOFIA_COVERAGE) $(SOFIA_CFLAGS) \
-	$(am__append_1)
+	$(am__append_5)
 DISTCLEANFILES = $(BUILT_SOURCES)
 
 # rules for building tag files
@@ -452,6 +446,7 @@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/auth_common.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/auth_digest.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/auth_module.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/auth_module_http.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/auth_module_sip.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/auth_ntlm.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/auth_plugin.Plo at am__quote@

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c	Mon Feb 12 11:01:22 2007
@@ -9651,8 +9651,9 @@
   status = rel->rel_callback(rel->rel_magic, rel, pr_irq, sip); rel = NULL;
   irq->irq_in_callback = pr_irq->irq_in_callback = 0;
 
-  if (pr_irq->irq_destroyed && pr_irq->irq_terminated) {
-    incoming_free(pr_irq);
+  if (pr_irq->irq_completed) {	/* Already sent final response */
+    if (pr_irq->irq_terminated && pr_irq->irq_destroyed)
+      incoming_free(pr_irq);
   }
   else if (status != 0) {
     if (status < 200 || status > 299) {
@@ -9915,6 +9916,9 @@
 
   tagged->orq_prev = NULL, tagged->orq_next = NULL, tagged->orq_queue = NULL;
   tagged->orq_rprev = NULL, tagged->orq_rnext = NULL;
+#if HAVE_SOFIA_SRESOLV
+  tagged->orq_resolver = NULL;
+#endif
 
   if (tagged->orq_cc)
     nta_compartment_ref(tagged->orq_cc);

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_session.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_session.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_session.c	Mon Feb 12 11:01:22 2007
@@ -2465,7 +2465,7 @@
 	break;
 
     if (sri) {
-      SR_STATUS1(sr, SIP_180_RINGING);
+      SR_STATUS1(sri, SIP_180_RINGING);
       nua_server_respond(sri, NULL);
       nua_server_report(sri);
     }

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_osx_runloop.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_osx_runloop.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_osx_runloop.c	Mon Feb 12 11:01:22 2007
@@ -284,10 +284,11 @@
       CFRunLoopObserverCreate(NULL, 
 			      kCFRunLoopAfterWaiting | kCFRunLoopBeforeWaiting,
 			      TRUE, 0, cf_observer_cb, self->sup_observer_cntx);
-    
+#if 0
     CFRunLoopAddObserver(CFRunLoopGetCurrent(),
 			 self->sup_observer,
 			 kCFRunLoopDefaultMode);
+#endif
   }
   else
     return su_home_unref(su_port_home(self)), NULL;
@@ -1234,8 +1235,6 @@
   CFAbsoluteTime start;
   int ret, timeout = tout > INT32_MAX ? INT32_MAX : tout;
 
-  // XXX - mela assert(SU_OSX_PORT_OWN_THREAD(self));
-
   rl = CFRunLoopGetCurrent();
 
   if (!rl)
@@ -1259,27 +1258,12 @@
   if (self->sup_base->sup_head)
     tout = 0;
 
-  start = CFAbsoluteTimeGetCurrent();
-  for (;;) {
-    /* Run loop with only one pass, indicate if a source was processed */
-    ret = CFRunLoopRunInMode(kCFRunLoopDefaultMode,
-			     0,
-			     TRUE);
-
-    /* Ok, one of our sources was fired */
-    if (self->sup_source_fired == 1) {
-      self->sup_source_fired = 0;
-      break;
-    }
+  ret = CFRunLoopRunInMode(kCFRunLoopDefaultMode,
+			   tout/1000000.0,
+			   true);
+
+  CFRunLoopWakeUp(rl);
 
-#if 0
-    /* Check how long to run this loop */
-    if (CFAbsoluteTimeGetCurrent() >= start + timeout / 10000)
-#else
-      break;
-#endif
-  }
-  
   if (self->sup_base->sup_head)
     su_base_port_getmsgs(self);
 

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/sofia-sip/url.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/sofia-sip/url.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/sofia-sip/url.h	Mon Feb 12 11:01:22 2007
@@ -34,29 +34,32 @@
 #ifndef URL_H_TYPES
 #define URL_H_TYPES
 
-/** Recognized URL schemes (value of url_t.url_type). */
+/** Recognized URL schemes (value of url_t.url_type). 
+ *
+ * @sa &lt;<a href="http://www.iana.org/assignments/uri-schemes.html">http://www.iana.org/assignments/uri-schemes.html</a>&gt;
+ */
 enum url_type_e {
-  url_invalid = -2,		/**< Invalid url. */
-  url_unknown = -1,		/**< Unknown scheme. */
-  url_any = 0,			/**< @c "*" */
-  url_sip,			/**< @c "sip:" */
-  url_sips,			/**< @c "sips:" */
-  url_tel,			/**< @c "tel:" */
-  url_fax,			/**< @c "fax:" */
-  url_modem,			/**< @c "modem:" */
-  url_http,			/**< @c "http:" */
-  url_https,			/**< @c "https:" */
-  url_ftp,			/**< @c "ftp:" */
-  url_file,			/**< @c "file:" */
-  url_rtsp,			/**< @c "rtsp:" */
-  url_rtspu,			/**< @c "rtspu:" */
-  url_mailto,			/**< @c "mailto:" */
-  url_im,			/**< @c "im:" (simple instant messaging) */
-  url_pres,			/**< @c "pres:" (simple presence) */
-  url_cid,			/**< @c "cid:" (Content-ID) */
-  url_msrp,			/**< @c "msrp:" (message session relay)  */
-  url_msrps,			/**< @c "msrps:" (new in @VERSION_1_12_2) */
-  url_wv,			/**< @c "wv:" (Wireless village) */
+  url_invalid = -2,	/**< Invalid url. */
+  url_unknown = -1,	/**< Unknown scheme. */
+  url_any = 0,		/**< "*" */
+  url_sip,		/**< "sip:". @sa @RFC3261 */
+  url_sips,		/**< "sips:". @sa @RFC3261 */
+  url_tel,		/**< "tel:" @sa RFC3966 */
+  url_fax,		/**< "fax:". @note Obsolete. @sa @RFC2806 */
+  url_modem,		/**< "modem:". @note Obsolete. @sa @RFC2806  */
+  url_http,		/**< "http:". @sa @RFC2616, @RFC3986 */
+  url_https,		/**< "https:". @sa @RFC2618, @RFC3986 */
+  url_ftp,		/**< "ftp:". @sa @RFC1738 */
+  url_file,		/**< "file:" @sa @RFC1738 */
+  url_rtsp,		/**< "rtsp:" @sa @RFC2326 */
+  url_rtspu,		/**< "rtspu:" @sa @RFC2326 */
+  url_mailto,		/**< "mailto:" @sa @RFC2368 */
+  url_im,		/**< "im:" (simple instant messaging). @sa @RFC3860 */
+  url_pres,		/**< "pres:" (simple presence). @sa @RFC3859  */
+  url_cid,		/**< "cid:" (Content-ID). @sa @RFC2392 */
+  url_msrp,		/**< "msrp:" (message session relay)  */
+  url_msrps,		/**< "msrps:" (new in @VERSION_1_12_2) */
+  url_wv,		/**< "wv:" (Wireless village) */
   _url_none
 };
 

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/torture_url.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/torture_url.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/torture_url.c	Mon Feb 12 11:01:22 2007
@@ -639,7 +639,7 @@
 int test_file(void)
 {
   /* Test a url with path like file:/foo/bar  */
-  char fileurl[] = "file:/foo/bar";
+  char fileurl[] = "file:///foo/bar";
   url_t file[1] = { URL_INIT_AS(file) };
   su_home_t home[1] = { SU_HOME_INIT(home) };
   char *tst;
@@ -653,7 +653,9 @@
 
   TEST_1(tst = su_strdup(home, fileurl));
   TEST(url_d(url, tst), 0);
+  TEST_S(url->url_host, "");
   file->url_root = '/';
+  file->url_host = "";
   file->url_path = "foo/bar";
   TEST(url_cmp(file, url), 0);
   TEST(url->url_type, url_file);

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/url.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/url.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/url.c	Mon Feb 12 11:01:22 2007
@@ -669,10 +669,18 @@
     else {
       n = strcspn(host, ":");
     }
-    
-    if (n == 0 && url->url_type != url_unknown)
-      return -1;
 
+    /* We allow empty host by default */
+    if (n == 0) switch (url->url_type) {
+    case url_sip:
+    case url_sips:
+    case url_im:
+    case url_pres:
+      return -1;
+    default:
+      break;
+    }
+    
     if (host[n] == ':') {
       char *port = host + n + 1;
       url->url_port = port;

Modified: freeswitch/trunk/libs/sofia-sip/packages/sofia-sip.spec.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/packages/sofia-sip.spec.in	(original)
+++ freeswitch/trunk/libs/sofia-sip/packages/sofia-sip.spec.in	Mon Feb 12 11:01:22 2007
@@ -12,15 +12,15 @@
 
 BuildRequires: pkgconfig
 
-%{!?bcond_with:%define bcond_with() %{expand:%%{?_with_%{1}:%%global with_%{1} 1}}}
-%{!?bcond_without:%define bcond_without() %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}}}
+%define opt_with() %{expand:%%global with_%{1} %%{?_with_%{1}:1}%%{?!_with_%{1}:0}}
+%define opt_without() %{expand:%%global with_%{1} %%{!?_without_%{1}:1}%%{?_without_%{1}:0}}
 
 # Options: 
-%bcond_with doxygen	- Generate documents using doxygen and dot
-%bcond_with check	- Run tests
-%bcond_with openssl	- Always use OpenSSL (TLS)
-%bcond_with glib	- Always use glib-2.0 (>= 2.2)
-%bcond_with sctp	- Include SCTP transport
+%opt_with doxygen	- Generate documents using doxygen and dot
+%opt_with check		- Run tests
+%opt_with openssl	- Always use OpenSSL (TLS)
+%opt_with glib		- Always use glib-2.0 (>= 2.2)
+%opt_with sctp		- Include SCTP transport
 
 %define have_doxygen %{?_with_doxygen:1}%{!?_with_doxygen:0}
 %define have_openssl %(%{?!_with_openssl:pkg-config 'openssl >= 0.9.7'&&}echo 1||echo 0)
@@ -49,7 +49,7 @@
 %if !%{have_glib}
 options="$options --without-glib"
 %endif
-%if %{with sctp}
+%if %{with_sctp}
 options="$options --enable-sctp"
 %endif
 
@@ -62,7 +62,7 @@
 
 # XXX comment next line to build with non-check aware rpmbuild.
 %check
-%if %{with check}
+%if %{with_check}
 make check
 %endif
 
@@ -126,7 +126,7 @@
 Development package for Sofia SIP UA library. This package includes 
 static libraries and include files.
 
-%if %{without doxygen}
+%if !%{with_doxygen}
 The reference documentation for Sofia SIP UA library is available at 
 <http://sofia-sip.sourceforge.net/development.html>
 %endif



More information about the Freeswitch-svn mailing list