-only trigger check config if we actually need it
[oweals/gnunet.git] / src / ats / gnunet-service-ats_performance.c
index f0fe1927cb18642745ca1f0f4abcb087f40ba66a..1b22039db15e33a369d5fdde025cdc8f2bc3b825 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     Copyright (C) 2011-2015 Christian Grothoff (and other contributing authors)
+     Copyright (C) 2011-2015 GNUnet e.V.
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -85,6 +85,8 @@ notify_client (struct GNUNET_SERVER_Client *client,
   struct GNUNET_SERVER_NotificationContext *nc;
   char *addrp;
 
+  if (NULL != prop)
+    GNUNET_break (GNUNET_ATS_NET_UNSPECIFIED != prop->scope);
   GNUNET_assert (msize < GNUNET_SERVER_MAX_MESSAGE_SIZE);
   msg = (struct PeerInformationMessage *) buf;
   msg->header.size = htons (msize);
@@ -159,6 +161,8 @@ GAS_performance_notify_all_clients (const struct GNUNET_PeerIdentity *peer,
                                     struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out,
                                     struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in)
 {
+  GNUNET_break ( (NULL == prop) ||
+                 (GNUNET_ATS_NET_UNSPECIFIED != prop->scope) );
   notify_client (NULL,
                  peer,
                  plugin_name,
@@ -212,6 +216,7 @@ peerinfo_it (void *cls,
               plugin_name,
               (unsigned int) ntohl (bandwidth_out.value__),
               (unsigned int) ntohl (bandwidth_in.value__));
+  GNUNET_break (GNUNET_ATS_NET_UNSPECIFIED != prop->scope);
   notify_client (client,
                  id,
                  plugin_name,