Re: [Sofia-sip-devel] NUTAG_DETECT_NETWORK_UPDATES still unimplemented under linux?
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.0 +0200 +++ sofia-sip-1.12.11/libsofia-sip-ua/nua/nua_register.c2011-04-20 20:03:28.0 +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
Re: [Sofia-sip-devel] NUTAG_DETECT_NETWORK_UPDATES still unimplemented under linux?
Al 17/04/11 19:35, En/na Luca Olivetti ha escrit: A2 = MD5(REGISTER:sip:ekiga.net) auth_response: db79b8a5046c76654b742311b7d4a33d = MD5(53060310bbad90036d54e1954983ae4e:4dab21dbe3306f1513e34e9e24eedc00a7827bd9394f:14bd7ed1967527d3770ab1f7c12901c5) (qop=NONE) svd: nta.c: 7785: outgoing_create: Assertion `tport_name_is_resolved(orq-orq_tpn)' failed. It seems the same as this one: http://www.mail-archive.com/sofia-sip-devel@lists.sourceforge.net/msg03243.html outgoing_create is using a bogus override_tport, here, around line 7770 of nua.c, causing the crash /* select the tport to use for the outgoing message */ if (override_tport) { /* note: no ref taken to the tport as its only used once here */ if (tport_is_secondary(override_tport)) { tpn = tport_name(override_tport); orq-orq_user_tport = 1; } } if (tpn) { /* CANCEL or ACK to [3456]XX */ invalid = tport_name_dup(home, orq-orq_tpn, tpn); #if HAVE_SOFIA_SRESOLV /* We send ACK or CANCEL only if original request was really sent */ assert(tport_name_is_resolved(orq-orq_tpn)); #endif resolved = tport_name_is_resolved(orq-orq_tpn); orq-orq_url = url_hdup(home, sip-sip_request-rq_url); In the line marked with tpn is assigned an empty (not NULL) string, hence the failed assert. Where does it come from, I don't know. Checking that tpn is not empty just makes the stack crash later on: nta.c: 2541: outgoing_insert_via: Assertion `via' failed. Bye -- Luca -- 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
Re: [Sofia-sip-devel] NUTAG_DETECT_NETWORK_UPDATES still unimplemented under linux?
Hi Luca, 2011/4/18 Luca Olivetti l...@ventoso.org: A2 = MD5(REGISTER:sip:ekiga.net) auth_response: db79b8a5046c76654b742311b7d4a33d = MD5(53060310bbad90036d54e1954983ae4e:4dab21dbe3306f1513e34e9e24eedc00a7827bd9394f:14bd7ed1967527d3770ab1f7c12901c5) (qop=NONE) svd: nta.c: 7785: outgoing_create: Assertion `tport_name_is_resolved(orq-orq_tpn)' failed. It seems the same as this one: http://www.mail-archive.com/sofia-sip-devel@lists.sourceforge.net/msg03243.html outgoing_create is using a bogus override_tport, here, around line 7770 of nua.c, causing the crash The network change is probably suffering from bit-rot. 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 -- Pekka.Pessi mail at nokia.com -- 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
Re: [Sofia-sip-devel] NUTAG_DETECT_NETWORK_UPDATES still unimplemented under linux?
Al 18/04/11 23:52, En/na Pekka Pessi ha escrit: Hi Luca, 2011/4/18 Luca Olivetti l...@ventoso.org: A2 = MD5(REGISTER:sip:ekiga.net) auth_response: db79b8a5046c76654b742311b7d4a33d = MD5(53060310bbad90036d54e1954983ae4e:4dab21dbe3306f1513e34e9e24eedc00a7827bd9394f:14bd7ed1967527d3770ab1f7c12901c5) (qop=NONE) svd: nta.c: 7785: outgoing_create: Assertion `tport_name_is_resolved(orq-orq_tpn)' failed. It seems the same as this one: http://www.mail-archive.com/sofia-sip-devel@lists.sourceforge.net/msg03243.html outgoing_create is using a bogus override_tport, here, around line 7770 of nua.c, causing the crash The network change is probably suffering from bit-rot. 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. Bye -- Luca -- 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
[Sofia-sip-devel] NUTAG_DETECT_NETWORK_UPDATES still unimplemented under linux?
Hello, I tried NUTAG_DETECT_NETWORK_UPDATES(NUA_NW_DETECT_TRY_FULL) both with nua_set_params and with nua_register, but it doesn't seem to be working: if I change the ip address of the interface I always get 503 service unavailable afterwards. I found these messages http://www.mail-archive.com/sofia-sip-devel@lists.sourceforge.net/msg01680.html http://permalink.gmane.org/gmane.comp.telephony.sofia-sip.devel/4143 that say that the option is only implemented under OS X. Is that still the case? I'm using 1.12.11 with this patch: http://gitorious.org/sofia-sip/sofia-sip/commit/bcd0f17fd83f2dfe570a3ab17249a5c7290b27f2/ Bye -- Luca -- 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
Re: [Sofia-sip-devel] NUTAG_DETECT_NETWORK_UPDATES still unimplemented under linux?
Al 17/04/11 15:05, En/na Luca Olivetti ha escrit: Hello, I tried NUTAG_DETECT_NETWORK_UPDATES(NUA_NW_DETECT_TRY_FULL) both with nua_set_params and with nua_register, but it doesn't seem to be working: if I change the ip address of the interface I always get 503 service unavailable afterwards. I found these messages http://www.mail-archive.com/sofia-sip-devel@lists.sourceforge.net/msg01680.html http://permalink.gmane.org/gmane.comp.telephony.sofia-sip.devel/4143 that say that the option is only implemented under OS X. Is that still the case? Well, looking at su/su_os_nw.c (which I could have done before asking, duh) it appears it is still so :-( Any plan to add Linux support? I can have a go at it myself, I'm not really good with C, but I can start from here: http://stackoverflow.com/questions/579783/how-to-detect-ip-address-change-programmatically-in-linux (the rely using socket(PF_NETLINK, SOCK_RAW, NETLINK_ROUTE)). Bye -- Luca -- 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