Bug 1246925 - log filtering_type and mapping_type only if they are valid pointers. r?ekr draft
authorBogdan Postelnicu <bogdan.postelnicu@softvision.ro>
Tue, 09 Feb 2016 15:38:00 +0200
changeset 329783 dd65ceadbaa493f5966b76de56d2685aa1311050
parent 329566 815d689a6e1e7187b10238f2f840d49201d67c2b
child 514036 f47b32a9b60fa20948e6afb1acbafe64802ed6b1
push id10609
push userBogdan.Postelnicu@softvision.ro
push dateTue, 09 Feb 2016 13:39:41 +0000
reviewersekr
bugs1246925
milestone47.0a1
Bug 1246925 - log filtering_type and mapping_type only if they are valid pointers. r?ekr
media/mtransport/nricectx.cpp
--- a/media/mtransport/nricectx.cpp
+++ b/media/mtransport/nricectx.cpp
@@ -537,20 +537,19 @@ RefPtr<NrIceCtx> NrIceCtx::Create(const 
           "media.peerconnection.nat_simulator.filtering_type",
           &filtering_type);
       rv = pref_branch->GetBoolPref(
           "media.peerconnection.nat_simulator.block_udp",
           &block_udp);
     }
   }
 
-  MOZ_MTLOG(ML_DEBUG, "NAT filtering type: " << filtering_type);
-  MOZ_MTLOG(ML_DEBUG, "NAT mapping type: " << mapping_type);
-
   if (mapping_type && filtering_type) {
+    MOZ_MTLOG(ML_DEBUG, "NAT filtering type: " << filtering_type);
+    MOZ_MTLOG(ML_DEBUG, "NAT mapping type: " << mapping_type);
     TestNat* test_nat = new TestNat;
     test_nat->filtering_type_ = TestNat::ToNatBehavior(filtering_type);
     test_nat->mapping_type_ = TestNat::ToNatBehavior(mapping_type);
     test_nat->block_udp_ = block_udp;
     test_nat->enabled_ = true;
     ctx->SetNat(test_nat);
   }