summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
Diffstat (limited to 'res')
-rw-r--r--res/res_odbc.c16
-rw-r--r--res/res_pjsip/config_transport.c3
-rw-r--r--res/res_pjsip_t38.c4
3 files changed, 21 insertions, 2 deletions
diff --git a/res/res_odbc.c b/res/res_odbc.c
index b2204ff09..31ea29b03 100644
--- a/res/res_odbc.c
+++ b/res/res_odbc.c
@@ -744,6 +744,22 @@ static int aoro2_class_cb(void *obj, void *arg, int flags)
return 0;
}
+unsigned int ast_odbc_get_max_connections(const char *name)
+{
+ struct odbc_class *class;
+ unsigned int max_connections;
+
+ class = ao2_callback(class_container, 0, aoro2_class_cb, (char *) name);
+ if (!class) {
+ return 0;
+ }
+
+ max_connections = class->maxconnections;
+ ao2_ref(class, -1);
+
+ return max_connections;
+}
+
/*
* \brief Determine if the connection has died.
*
diff --git a/res/res_pjsip/config_transport.c b/res/res_pjsip/config_transport.c
index b9208976f..60b4507cd 100644
--- a/res/res_pjsip/config_transport.c
+++ b/res/res_pjsip/config_transport.c
@@ -562,12 +562,13 @@ static int transport_apply(const struct ast_sorcery *sorcery, void *obj)
}
} else if (transport->type == AST_TRANSPORT_TCP) {
pjsip_tcp_transport_cfg cfg;
- int option = 1;
+ static int option = 1;
pjsip_tcp_transport_cfg_default(&cfg, temp_state->state->host.addr.sa_family);
cfg.bind_addr = temp_state->state->host;
cfg.async_cnt = transport->async_operations;
set_qos(transport, &cfg.qos_params);
+ /* sockopt_params.options is copied to each newly connected socket */
cfg.sockopt_params.options[0].level = pj_SOL_TCP();
cfg.sockopt_params.options[0].optname = pj_TCP_NODELAY();
cfg.sockopt_params.options[0].optval = &option;
diff --git a/res/res_pjsip_t38.c b/res/res_pjsip_t38.c
index 14207d9c0..992902af2 100644
--- a/res/res_pjsip_t38.c
+++ b/res/res_pjsip_t38.c
@@ -361,7 +361,9 @@ static int t38_interpret_parameters(void *obj)
ast_udptl_set_local_max_ifp(session_media->udptl, state->our_parms.max_ifp);
t38_change_state(data->session, session_media, state, T38_ENABLED);
ast_sip_session_resume_reinvite(data->session);
- } else if (data->session->t38state != T38_ENABLED) {
+ } else if ((data->session->t38state != T38_ENABLED) ||
+ ((data->session->t38state == T38_ENABLED) &&
+ (parameters->request_response == AST_T38_REQUEST_NEGOTIATE))) {
if (t38_initialize_session(data->session, session_media)) {
break;
}