From 593e9d2dc57c9a70c95d5301244ffb9c6e6b7951 Mon Sep 17 00:00:00 2001 From: "Nils Ohlmeier [:drno]" Date: Fri, 5 Feb 2016 22:56:14 -0800 Subject: [PATCH] Bug 1246363: add logging to detect if relay only option is set. r=mjf --HG-- extra : rebase_source : b5c62327575846c894ce8e8b252bb7397ea913ac --- .../mtransport/third_party/nICEr/src/ice/ice_component.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/media/mtransport/third_party/nICEr/src/ice/ice_component.c b/media/mtransport/third_party/nICEr/src/ice/ice_component.c index 115d61172ccb..d99ef4cf3e78 100644 --- a/media/mtransport/third_party/nICEr/src/ice/ice_component.c +++ b/media/mtransport/third_party/nICEr/src/ice/ice_component.c @@ -252,8 +252,15 @@ static int nr_ice_component_initialize_udp(struct nr_ice_ctx_ *ctx,nr_ice_compon cand=0; } } + else{ + r_log(LOG_ICE,LOG_WARNING,"ICE(%s): relay only option results in no host candidate for %s",ctx->label,addrs[i].addr.as_string); + } #ifdef USE_TURN + if ((ctx->flags & NR_ICE_CTX_FLAGS_RELAY_ONLY) && + (ctx->turn_server_ct == 0)) { + r_log(LOG_ICE,LOG_ERR,"ICE(%s): relay only option is set without any TURN server configured",ctx->label); + } /* And both a srvrflx and relayed candidate for each TURN server (unless we're in relay-only mode, in which case just the relayed one) */ for(j=0;jturn_server_ct;j++){ @@ -418,6 +425,7 @@ static int nr_ice_component_initialize_tcp(struct nr_ice_ctx_ *ctx,nr_ice_compon ABORT(r); } if (ctx->flags & NR_ICE_CTX_FLAGS_RELAY_ONLY) { + r_log(LOG_ICE,LOG_WARNING,"ICE(%s): relay only option results in ICE TCP being disabled",ctx->label); ice_tcp_disabled = 1; }