-skeletons for transport-ng
[oweals/gnunet.git] / src / ats / gnunet-service-ats_performance.c
index 831afb418642e3c60b71163283070322508a7116..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,7 +85,8 @@ notify_client (struct GNUNET_SERVER_Client *client,
   struct GNUNET_SERVER_NotificationContext *nc;
   char *addrp;
 
-  GNUNET_break (GNUNET_ATS_NET_UNSPECIFIED != prop->scope);
+  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);
@@ -160,7 +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 (GNUNET_ATS_NET_UNSPECIFIED != prop->scope);
+  GNUNET_break ( (NULL == prop) ||
+                 (GNUNET_ATS_NET_UNSPECIFIED != prop->scope) );
   notify_client (NULL,
                  peer,
                  plugin_name,