Commit 9c9c5873 authored by Simon Morlat's avatar Simon Morlat

fix bug in tport selection: as said in RFC3263 (locating sip servers) if an...

fix bug in tport selection: as said in RFC3263 (locating sip servers) if an uri contains a numeric ip or numeric port and no transport is specified, then udp should be used.
parent a96cf7e4
......@@ -11,7 +11,7 @@ dnl information on the package
dnl ---------------------------
dnl update both the version for AC_INIT and the LIBSOFIA_SIP_UA_MAJOR_MINOR
AC_INIT([sofia-sip], [1.13.5bc])
AC_INIT([sofia-sip], [1.13.6bc])
AC_CONFIG_SRCDIR([libsofia-sip-ua/sip/sofia-sip/sip.h])
AC_CONFIG_MACRO_DIR([m4])
AC_SUBST(VER_LIBSOFIA_SIP_UA_MAJOR_MINOR, [1.13])
......
......@@ -4639,6 +4639,12 @@ tport_t *tport_by_name(tport_t const *tp, tp_name_t const *tpn)
else
family = 0;
if ((family != 0 || tpn->tpn_port != 0) && proto == NULL){
/*according to https://tools.ietf.org/html/rfc3263#page-6 4. Selecting a transport protocol
* When no transport is specified, if ip address is numeric or port number is specified, then use UDP*/
proto = "udp";
}
if (proto && strcmp(proto, tpn_any) == 0)
proto = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment