Commit 0592f9d5 authored by Guillaume Roguez's avatar Guillaume Roguez

sip: fix pjsip crash if transport send_msg fails

As PJSIP documentation said, pjsip_transport::send_msg must
not call the user callback if PJ_EPENDING is not returned,
like in case of immediate completion or when an error happens.
Was not the case in re-factoring on SipsTransportIce class.
This patch fixes this problem.

Change-Id: I6b8ea8efb6aa61191914d7794f5484612095598a
Tuleap: #106
parent d056bd7d
......@@ -647,8 +647,6 @@ SipsIceTransport::send(pjsip_tx_data *tdata, const pj_sockaddr_t *rem_addr,
// Shutdown on fatal errors
if (gnutls_error_is_fatal(ret)) {
tdata->op_key.tdata = nullptr;
if (callback)
callback(&trData_.base, token, -PJ_RETURN_OS_ERROR(OSERR_ENOTCONN));
RING_ERR("[TLS] send failed: %s", gnutls_strerror(ret));
return tls_status_from_err(ret);
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