Bug 1521879 - Part 4: Better logging for candidate gathering (was necessary to figure out parts of bug 1513059). r=mjf
authorByron Campen [:bwc] <docfaraday@gmail.com>
Mon, 25 Feb 2019 21:51:36 +0000
changeset 518884 9ab737c1a29a9fd4f043069c22413fc4f7c977e8
parent 518883 1f06f1722fb4ad1198e8e5fb888126a852bfb7a9
child 518885 5c091f2ad086fbe0baf1a8cb6e13754ced45e387
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmjf
bugs1521879, 1513059
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1521879 - Part 4: Better logging for candidate gathering (was necessary to figure out parts of bug 1513059). r=mjf Differential Revision: https://phabricator.services.mozilla.com/D17276
media/mtransport/third_party/nICEr/src/ice/ice_ctx.c
--- a/media/mtransport/third_party/nICEr/src/ice/ice_ctx.c
+++ b/media/mtransport/third_party/nICEr/src/ice/ice_ctx.c
@@ -514,17 +514,24 @@ void nr_ice_gather_finished_cb(NR_SOCKET
 
 
     assert(cb_arg);
     if (!cb_arg)
       return;
     ctx = cand->ctx;
 
     ctx->uninitialized_candidates--;
-    r_log(LOG_ICE,LOG_DEBUG,"ICE(%s)/CAND(%s): initialized, %d remaining",ctx->label,cand->codeword,ctx->uninitialized_candidates);
+    if (cand->state == NR_ICE_CAND_STATE_FAILED) {
+      r_log(LOG_ICE, LOG_WARNING,
+            "ICE(%s)/CAND(%s): failed to initialize, %d remaining", ctx->label,
+            cand->label, ctx->uninitialized_candidates);
+    } else {
+      r_log(LOG_ICE, LOG_DEBUG, "ICE(%s)/CAND(%s): initialized, %d remaining",
+            ctx->label, cand->label, ctx->uninitialized_candidates);
+    }
 
     /* Avoid the need for yet another initialization function */
     if (cand->state == NR_ICE_CAND_STATE_INITIALIZING && cand->type == HOST)
       cand->state = NR_ICE_CAND_STATE_INITIALIZED;
 
     if (cand->state == NR_ICE_CAND_STATE_INITIALIZED) {
       int was_pruned = 0;
 
@@ -542,22 +549,24 @@ void nr_ice_gather_finished_cb(NR_SOCKET
         if (nr_ice_ctx_pair_new_trickle_candidates(ctx, cand)) {
           r_log(LOG_ICE,LOG_ERR, "ICE(%s): All could not pair new trickle candidate",ctx->label);
           /* But continue */
         }
       }
     }
 
     if(ctx->uninitialized_candidates==0){
-      r_log(LOG_ICE,LOG_DEBUG,"ICE(%s): All candidates initialized",ctx->label);
+      r_log(LOG_ICE, LOG_INFO, "ICE(%s): All candidates initialized",
+            ctx->label);
       if (ctx->done_cb) {
         ctx->done_cb(0,0,ctx->cb_arg);
       }
       else {
-        r_log(LOG_ICE,LOG_DEBUG,"ICE(%s): No done_cb. We were probably destroyed.",ctx->label);
+        r_log(LOG_ICE, LOG_INFO,
+              "ICE(%s): No done_cb. We were probably destroyed.", ctx->label);
       }
     }
     else {
       r_log(LOG_ICE,LOG_DEBUG,"ICE(%s): Waiting for %d candidates to be initialized",ctx->label, ctx->uninitialized_candidates);
     }
   }
 
 static int nr_ice_ctx_pair_new_trickle_candidates(nr_ice_ctx *ctx, nr_ice_candidate *cand)