Commit 801fac1f authored by Youness Alaoui's avatar Youness Alaoui

Correctly show the priority as a guint64

parent 4dc7fab1
...@@ -1557,7 +1557,14 @@ static gboolean priv_add_remote_candidate ( ...@@ -1557,7 +1557,14 @@ static gboolean priv_add_remote_candidate (
/* step: check whether the candidate already exists */ /* step: check whether the candidate already exists */
candidate = component_find_remote_candidate(component, addr, transport); candidate = component_find_remote_candidate(component, addr, transport);
if (candidate) { if (candidate) {
nice_debug ("Agent %p : Update existing remote candidate %p.", agent, candidate); {
gchar tmpbuf[INET6_ADDRSTRLEN];
nice_address_to_string (addr, tmpbuf);
nice_debug ("Agent %p : Updating existing remote candidate with addr [%s]:%u"
" for s%d/c%d. U/P '%s'/'%s' prio: %u", agent, tmpbuf,
nice_address_get_port (addr), stream_id, component_id,
username, password, priority);
}
/* case 1: an existing candidate, update the attributes */ /* case 1: an existing candidate, update the attributes */
candidate->type = type; candidate->type = type;
if (base_addr) if (base_addr)
...@@ -1605,9 +1612,9 @@ static gboolean priv_add_remote_candidate ( ...@@ -1605,9 +1612,9 @@ static gboolean priv_add_remote_candidate (
gchar tmpbuf[INET6_ADDRSTRLEN]; gchar tmpbuf[INET6_ADDRSTRLEN];
nice_address_to_string (addr, tmpbuf); nice_address_to_string (addr, tmpbuf);
nice_debug ("Agent %p : Adding remote candidate with addr [%s]:%u" nice_debug ("Agent %p : Adding remote candidate with addr [%s]:%u"
" for s%d/c%d. U/P '%s'/'%s'", agent, tmpbuf, " for s%d/c%d. U/P '%s'/'%s' prio: %u", agent, tmpbuf,
nice_address_get_port (addr), stream_id, component_id, nice_address_get_port (addr), stream_id, component_id,
username, password); username, password, priority);
} }
if (base_addr) if (base_addr)
......
...@@ -1100,8 +1100,8 @@ static gboolean priv_update_selected_pair (NiceAgent *agent, Component *componen ...@@ -1100,8 +1100,8 @@ static gboolean priv_update_selected_pair (NiceAgent *agent, Component *componen
g_assert (pair); g_assert (pair);
if (pair->priority > component->selected_pair.priority) { if (pair->priority > component->selected_pair.priority) {
nice_debug ("Agent %p : changing SELECTED PAIR for component %u: %s:%s " nice_debug ("Agent %p : changing SELECTED PAIR for component %u: %s:%s "
"(prio:%lu).", agent, component->id, pair->local->foundation, "(prio:%" G_GUINT64_FORMAT ").", agent, component->id, pair->local->foundation,
pair->remote->foundation, (long unsigned)pair->priority); pair->remote->foundation, pair->priority);
if (component->selected_pair.keepalive.tick_source != NULL) { if (component->selected_pair.keepalive.tick_source != NULL) {
g_source_destroy (component->selected_pair.keepalive.tick_source); g_source_destroy (component->selected_pair.keepalive.tick_source);
...@@ -1701,6 +1701,8 @@ static guint priv_prune_pending_checks (Stream *stream, guint component_id) ...@@ -1701,6 +1701,8 @@ static guint priv_prune_pending_checks (Stream *stream, guint component_id)
guint64 highest_nominated_priority = 0; guint64 highest_nominated_priority = 0;
guint in_progress = 0; guint in_progress = 0;
nice_debug ("Finding highest priority for component %d", component_id);
for (i = stream->conncheck_list; i; i = i->next) { for (i = stream->conncheck_list; i; i = i->next) {
CandidateCheckPair *p = i->data; CandidateCheckPair *p = i->data;
if (p->component_id == component_id && if (p->component_id == component_id &&
...@@ -1714,7 +1716,7 @@ static guint priv_prune_pending_checks (Stream *stream, guint component_id) ...@@ -1714,7 +1716,7 @@ static guint priv_prune_pending_checks (Stream *stream, guint component_id)
} }
nice_debug ("Agent XXX: Pruning pending checks. Highest nominated priority " nice_debug ("Agent XXX: Pruning pending checks. Highest nominated priority "
"is %lu", highest_nominated_priority); "is %" G_GUINT64_FORMAT, highest_nominated_priority);
/* step: cancel all FROZEN and WAITING pairs for the component */ /* step: cancel all FROZEN and WAITING pairs for the component */
for (i = stream->conncheck_list; i; i = i->next) { for (i = stream->conncheck_list; i; i = i->next) {
...@@ -1737,9 +1739,9 @@ static guint priv_prune_pending_checks (Stream *stream, guint component_id) ...@@ -1737,9 +1739,9 @@ static guint priv_prune_pending_checks (Stream *stream, guint component_id)
} else { } else {
/* We must keep the higher priority pairs running because if a udp /* We must keep the higher priority pairs running because if a udp
* packet was lost, we might end up using a bad candidate */ * packet was lost, we might end up using a bad candidate */
nice_debug ("Agent XXX : pair %p kept IN_PROGRESS because priority %d" nice_debug ("Agent XXX : pair %p kept IN_PROGRESS because priority %"
" is higher than currently nominated pair %d", p, p->priority, G_GUINT64_FORMAT " is higher than currently nominated pair %"
highest_nominated_priority); G_GUINT64_FORMAT, p, p->priority, highest_nominated_priority);
in_progress++; in_progress++;
} }
} }
......
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