Al 19/04/11 01:15, En/na Luca Olivetti ha escrit: >> The transport is cached in nua/outbound.c, I suppose it should drop >> its reference to tport_t, too, when network change is detected. See: >> https://gitorious.org/~ppessi/sofia-sip/pessi-sofia-sip/commits/network-change > > Thank you, it doesn't crash anymore. > What about the other issues? > I'm referring to the fact that su_root_add_network_changed is called 3 > times, 3 threads are activated and for each address change 3 (or 6, if > monitoring for RTM_DELADDR) network changes will be triggered. > Now it doesn't crash, but it isn't pretty. > Probably for the RTM_NEWADDR/RTM_DELADDR it's my fault (I should somehow > coalesce them into one event). > I could also keep the workaround to start just one thread, i.e. > > static void *su_start_nw_os_thread(void *ptr) > { > static int already = 0; > > if (already) > return NULL; > > already=1; > su_network_changed_t *snc = (su_network_changed_t *) ptr; > .... > > > > but it's ugly and the OS X code isn't doing it.
I suggest this patch (I tried it and it seems to be working fine): diff --unified --recursive sofia-sip-1.12.11.orig/libsofia-sip-ua/nua/nua_register.c sofia-sip-1.12.11/libsofia-sip-ua/nua/nua_register.c --- sofia-sip-1.12.11.orig/libsofia-sip-ua/nua/nua_register.c 2011-04-20 20:02:12.000000000 +0200 +++ sofia-sip-1.12.11/libsofia-sip-ua/nua/nua_register.c 2011-04-20 20:03:28.000000000 +0200 @@ -1288,6 +1288,9 @@ { su_network_changed_t *snc = NULL; + if (nua->nua_nw_changed) + return 0; + snc = su_root_add_network_changed(nua->nua_home, nua->nua_root, nua_network_changed_cb, ------------------------------------------------------------------------------ Benefiting from Server Virtualization: Beyond Initial Workload Consolidation -- Increasing the use of server virtualization is a top priority.Virtualization can reduce costs, simplify management, and improve application availability and disaster protection. Learn more about boosting the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev _______________________________________________ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel