[Freeswitch-svn] [commit] r8676 - in freeswitch/trunk/libs/sofia-sip: . libsofia-sip-ua/nth
Freeswitch SVN
mikej at freeswitch.org
Mon May 26 20:18:31 EDT 2008
Author: mikej
Date: Mon May 26 20:18:31 2008
New Revision: 8676
Modified:
freeswitch/trunk/libs/sofia-sip/.update
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/nth_client.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/nth_server.c
Log:
Mon May 26 14:57:28 EDT 2008 Pekka Pessi <first.last at nokia.com>
* nth: gracefully downgrade to tcp only if no tls certificates are available
Modified: freeswitch/trunk/libs/sofia-sip/.update
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/.update (original)
+++ freeswitch/trunk/libs/sofia-sip/.update Mon May 26 20:18:31 2008
@@ -1 +1 @@
-Mon May 26 20:18:02 EDT 2008
+Mon May 26 20:18:27 EDT 2008
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/nth_client.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/nth_client.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/nth_client.c Mon May 26 20:18:31 2008
@@ -440,6 +440,8 @@
"tcp", "tls", NULL
};
+static char const *const he_no_tls_tports[] = { "tcp", NULL };
+
static tp_stack_class_t http_client_class[1] = { {
sizeof(http_client_class),
he_recv_message,
@@ -456,7 +458,11 @@
if (!he->he_tports)
return -1;
- return tport_tbind(he->he_tports, he_name, he_tports,
+ if (tport_tbind(he->he_tports, he_name, he_tports,
+ TPTAG_SERVER(0), TAG_NEXT(tags)) >= 0)
+ return 0;
+
+ return tport_tbind(he->he_tports, he_name, he_no_tls_tports,
TPTAG_SERVER(0), TAG_NEXT(tags));
}
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/nth_server.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/nth_server.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/nth_server.c Mon May 26 20:18:31 2008
@@ -688,6 +688,8 @@
"tcp", "tls", NULL
};
+static char const * const http_no_tls_tports[] = { "tcp", NULL };
+
static tp_stack_class_t nth_server_class[1] =
{{
sizeof(nth_server_class),
@@ -738,6 +740,8 @@
srv->srv_max_bodylen = 1 << 30; /* 1 GB */
if (tport_tbind(srv->srv_tports, tpn, http_tports,
+ TAG_END()) >= 0 ||
+ tport_tbind(srv->srv_tports, tpn, http_no_tls_tports,
TAG_END()) >= 0) {
srv->srv_root = root;
srv->srv_mclass = mclass ? mclass : http_default_mclass();
More information about the Freeswitch-svn
mailing list