Commit 23621412 authored by Youness Alaoui's avatar Youness Alaoui

Remove some NDEBUGs and add some to let NDEBUG be used for the outputting of...

Remove some NDEBUGs and add some to let NDEBUG be used for the outputting of sending/inbound messages... this is temporary until I implement a correct debugging system with categories
parent 4d5a5fec
......@@ -1047,14 +1047,12 @@ static gboolean priv_add_remote_candidate (
candidate->type = type;
if (addr)
candidate->addr = *addr;
#ifndef NDEBUG
{
gchar tmpbuf[INET6_ADDRSTRLEN];
nice_address_to_string (addr, tmpbuf);
nice_debug ("Agent %p : Adding remote candidate with addr [%s]:%u.", agent, tmpbuf,
nice_address_get_port (addr));
}
#endif
if (base_addr)
candidate->base_addr = *base_addr;
......@@ -1330,7 +1328,9 @@ _nice_agent_recv (
if (nice_address_equal (&from, &component->turn_server)) {
GSList * i = NULL;
#ifndef NDEBUG
nice_debug ("Agent %p : Packet received from TURN server candidate.", agent);
#endif
for (i = component->local_candidates; i; i = i->next) {
NiceCandidate *cand = i->data;
if (cand->type == NICE_CANDIDATE_TYPE_RELAYED) {
......
......@@ -354,15 +354,12 @@ static gboolean priv_conn_check_tick_stream (Stream *stream, NiceAgent *agent, G
}
}
}
#ifndef NDEBUG
{
{
static int tick_counter = 0;
if (tick_counter++ % 50 == 0 || keep_timer_going != TRUE)
nice_debug ("Agent %p : timer(%p) tick #%u: %u frozen, %u in-progress, %u waiting, %u succeeded, %u nominated, %u waiting-for-nom.", agent,
agent, tick_counter, frozen, s_inprogress, waiting, s_succeeded, s_nominated, s_waiting_for_nomination);
}
#endif
return keep_timer_going;
......@@ -1189,7 +1186,6 @@ int conn_check_send (NiceAgent *agent, CandidateCheckPair *pair)
nice_address_copy_to_sockaddr (&pair->remote->addr, &sockaddr);
#ifndef NDEBUG
{
gchar tmpbuf[INET6_ADDRSTRLEN];
nice_address_to_string (&pair->remote->addr, tmpbuf);
......@@ -1202,7 +1198,6 @@ int conn_check_send (NiceAgent *agent, CandidateCheckPair *pair)
uname, password, priority);
}
#endif
if (cand_use)
pair->nominated = controlling;
......@@ -1358,7 +1353,6 @@ static void priv_reply_to_conn_check (NiceAgent *agent, Stream *stream, Componen
{
g_assert (rcand == NULL || nice_address_equal(&rcand->addr, toaddr) == TRUE);
#ifndef NDEBUG
{
gchar tmpbuf[INET6_ADDRSTRLEN];
nice_address_to_string (toaddr, tmpbuf);
......@@ -1370,7 +1364,6 @@ static void priv_reply_to_conn_check (NiceAgent *agent, Stream *stream, Componen
rcand, component->id,
(int)use_candidate);
}
#endif
nice_socket_send (socket, toaddr, rbuf_len, (const gchar*)rbuf);
......
......@@ -685,13 +685,11 @@ static gboolean priv_discovery_tick_unlocked (gpointer pointer)
int not_done = 0; /* note: track whether to continue timer */
size_t buffer_len = 0;
#ifndef NDEBUG
{
static int tick_counter = 0;
if (tick_counter++ % 50 == 0)
nice_debug ("Agent %p : discovery tick #%d with list %p (1)", agent, tick_counter, agent->discovery_list);
}
#endif
for (i = agent->discovery_list; i ; i = i->next) {
cand = i->data;
......
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