Commit 0ad15100 authored by Pekka Pessi's avatar Pekka Pessi
Browse files

nta: not retrying after an transport error if application provided the transport

darcs-hash:20070601191643-65a35-2a23f600ef76d6ed2cae9a107c6aa51b3541dc19.gz
parent a13e6fd3
......@@ -2196,7 +2196,8 @@ void agent_recv_request(nta_agent_t *agent,
TPTAG_SDWN_AFTER(stream),
TAG_END());
}
} else {
}
else {
msg_destroy(msg);
if (stream) /* Send FIN */
tport_shutdown(tport, 1);
......@@ -6170,13 +6171,6 @@ size_t incoming_mass_destroy(nta_agent_t *sa, incoming_queue_t *q)
HTABLE_BODIES_WITH(outgoing_htable, oht, nta_outgoing_t, HTABLE_HASH_ORQ,
size_t, hash_value_t);
static nta_outgoing_t *outgoing_create(nta_agent_t *agent,
nta_response_f *callback,
nta_outgoing_magic_t *magic,
url_string_t const *route_url,
tp_name_t const *tpn,
msg_t *msg,
tag_type_t tag, tag_value_t value, ...);
static int outgoing_features(nta_agent_t *agent, nta_outgoing_t *orq,
msg_t *msg, sip_t *sip,
tagi_t *tags);
......@@ -6813,7 +6807,11 @@ nta_outgoing_t *outgoing_create(nta_agent_t *agent,
/* 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 */
tpn = tport_name(override_tport);
if (tport_is_secondary(override_tport)) {
tpn = tport_name(override_tport);
orq->orq_user_tport = 1;
}
}
if (route_url) {
......@@ -7093,8 +7091,10 @@ outgoing_send(nta_outgoing_t *orq, int retransmit)
if (cc)
nta_compartment_decref(&cc);
if (orq->orq_user_tport)
/* No retries */;
/* RFC3261, 18.1.1 */
if (err == EMSGSIZE && !orq->orq_try_tcp_instead) {
else if (err == EMSGSIZE && !orq->orq_try_tcp_instead) {
if (strcasecmp(tpn->tpn_proto, "udp") == 0 ||
strcasecmp(tpn->tpn_proto, "*") == 0) {
outgoing_try_tcp_instead(orq);
......@@ -10215,6 +10215,10 @@ nta_transport_(nta_agent_t *agent,
}
/** Return a new reference to the transaction transport.
*
* @note The referenced transport must be unreferenced with tport_unref()
*/
tport_t *
nta_incoming_transport(nta_agent_t *agent,
nta_incoming_t *irq,
......
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