Commit f16f8bda authored by Chi Liu's avatar Chi Liu Committed by Olivier Crête

conncheck: add stun transaction id of stun ping response in debugging logs

parent 9b41f888
...@@ -3196,7 +3196,7 @@ static gboolean priv_schedule_triggered_check (NiceAgent *agent, NiceStream *str ...@@ -3196,7 +3196,7 @@ static gboolean priv_schedule_triggered_check (NiceAgent *agent, NiceStream *str
/* /*
* Sends a reply to an successfully received STUN connectivity * Sends a reply to a successfully received STUN connectivity
* check request. Implements parts of the ICE spec section 7.2 (STUN * check request. Implements parts of the ICE spec section 7.2 (STUN
* Server Procedures). * Server Procedures).
* *
...@@ -3210,7 +3210,7 @@ static gboolean priv_schedule_triggered_check (NiceAgent *agent, NiceStream *str ...@@ -3210,7 +3210,7 @@ static gboolean priv_schedule_triggered_check (NiceAgent *agent, NiceStream *str
* @param rbuf_len length of STUN message to send * @param rbuf_len length of STUN message to send
* @param msg the STUN message to send * @param msg the STUN message to send
* @param use_candidate whether the request had USE_CANDIDATE attribute * @param use_candidate whether the request had USE_CANDIDATE attribute
* *
* @pre (rcand == NULL || nice_address_equal(rcand->addr, toaddr) == TRUE) * @pre (rcand == NULL || nice_address_equal(rcand->addr, toaddr) == TRUE)
*/ */
static void priv_reply_to_conn_check (NiceAgent *agent, NiceStream *stream, static void priv_reply_to_conn_check (NiceAgent *agent, NiceStream *stream,
...@@ -3222,14 +3222,23 @@ static void priv_reply_to_conn_check (NiceAgent *agent, NiceStream *stream, ...@@ -3222,14 +3222,23 @@ static void priv_reply_to_conn_check (NiceAgent *agent, NiceStream *stream,
if (nice_debug_is_enabled ()) { if (nice_debug_is_enabled ()) {
gchar tmpbuf[INET6_ADDRSTRLEN]; gchar tmpbuf[INET6_ADDRSTRLEN];
StunTransactionId id;
nice_address_to_string (toaddr, tmpbuf); nice_address_to_string (toaddr, tmpbuf);
nice_debug ("Agent %p : STUN-CC RESP to '%s:%u', socket=%u, len=%u, cand=%p (c-id:%u), use-cand=%d.", agent,
tmpbuf, /* get stun message transaction id and convert it to hex. */
nice_address_get_port (toaddr), stun_message_id(msg, id);
sockptr->fileno ? g_socket_get_fd(sockptr->fileno) : -1, nice_debug ("Agent %p : STUN-CC RESP to '%s:%u', socket=%u, len=%u, cand=%p (c-id:%u),"
(unsigned)rbuf_len, " use-cand=%d, "
rcand, component->id, "transactionId=%hhx%hhx%hhx%hhx%hhx%hhx%hhx%hhx%hhx%hhx%hhx%hhx%hhx%hhx%hhx%hhx",
(int)use_candidate); agent,
tmpbuf,
nice_address_get_port (toaddr),
sockptr->fileno ? g_socket_get_fd(sockptr->fileno) : -1,
(unsigned)rbuf_len,
rcand, component->id,
(int)use_candidate,
id[0], id[1], id[2], id[3], id[4], id[5], id[6], id[7], id[8], id[9], id[10],
id[11], id[12], id[13], id[14], id[15]);
} }
agent_socket_send (sockptr, toaddr, rbuf_len, (const gchar*)msg->buffer); agent_socket_send (sockptr, toaddr, rbuf_len, (const gchar*)msg->buffer);
......
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