-skeletons for transport-ng
[oweals/gnunet.git] / src / ats / gnunet-service-ats_performance.c
index d08a2d2decd7cf607a32420a98310942de49a390..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
@@ -14,8 +14,8 @@
 
      You should have received a copy of the GNU General Public License
      along with GNUnet; see the file COPYING.  If not, write to the
-     Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-     Boston, MA 02111-1307, USA.
+     Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+     Boston, MA 02110-1301, USA.
 */
 /**
  * @file ats/gnunet-service-ats_performance.c
@@ -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,