From 06044b05536627372503bb7288140cdcc897a9f4 Mon Sep 17 00:00:00 2001 From: Richard Aas Date: Mon, 25 Nov 2013 05:18:22 +0000 Subject: [PATCH] ice: only print ICE nominated flag once --- src/ice/stunsrv.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ice/stunsrv.c b/src/ice/stunsrv.c index 276a411..dc31803 100644 --- a/src/ice/stunsrv.c +++ b/src/ice/stunsrv.c @@ -147,14 +147,16 @@ static int handle_stun(struct ice *ice, struct icem *icem, /* 7.2.1.5. Updating the Nominated Flag */ if (use_cand) { - if (ice->lrole == ROLE_CONTROLLED) { - if (cp->state == CANDPAIR_SUCCEEDED) { - cp->nominated = true; + if (ice->lrole == ROLE_CONTROLLED && + cp->state == CANDPAIR_SUCCEEDED) { + if (!cp->nominated) { icecomp_printf(comp, "setting NOMINATED" " flag on candpair [%H]\n", icem_candpair_debug, cp); } + + cp->nominated = true; } /* Cancel conncheck. Choose Selected Pair */