REST: nothing triggers rest
[oweals/gnunet.git] / src / ats / ats_api_scheduling.c
index ea9ca6d55c80847f54e8b40076603b4a3539fcde..532426e91371423b668cd1c3777bb125285742d9 100644 (file)
      WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      Affero General Public License for more details.
+    
+     You should have received a copy of the GNU Affero General Public License
+     along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+     SPDX-License-Identifier: AGPL3.0-or-later
 */
 /**
  * @file ats/ats_api_scheduling.c
@@ -225,9 +230,8 @@ find_session (struct GNUNET_ATS_SchedulingHandle *sh,
        as we communicate asynchronously with the ATS service. */
     return NULL;
   }
-  if (0 != memcmp (peer,
-                   &ar->address->peer,
-                   sizeof (struct GNUNET_PeerIdentity)))
+  if (0 != GNUNET_memcmp (peer,
+                   &ar->address->peer))
   {
     GNUNET_break (0);
     return NULL;
@@ -293,9 +297,8 @@ find_session_id (struct GNUNET_ATS_SchedulingHandle *sh,
          (GNUNET_NO == sh->session_array[i]->in_destroy) &&
          ( (session == sh->session_array[i]->session) ||
            (NULL == sh->session_array[i]->session) ) &&
-         (0 == memcmp (&address->peer,
-                       &sh->session_array[i]->address->peer,
-                       sizeof (struct GNUNET_PeerIdentity))) &&
+         (0 == GNUNET_memcmp (&address->peer,
+                       &sh->session_array[i]->address->peer)) &&
          (0 == GNUNET_HELLO_address_cmp (address,
                                          sh->session_array[i]->address)) )
       return i;
@@ -473,7 +476,7 @@ send_add_address_message (struct GNUNET_ATS_SchedulingHandle *sh,
 
   if (NULL == sh->mq)
     return; /* disconnected, skip for now */
-  GNUNET_break (GNUNET_ATS_NET_UNSPECIFIED != ar->properties.scope);
+  GNUNET_break (GNUNET_NT_UNSPECIFIED != ar->properties.scope);
   namelen = strlen (ar->address->transport_name) + 1;
   msize = ar->address->address_length + namelen;
   ev = GNUNET_MQ_msg_extra (m, msize, GNUNET_MESSAGE_TYPE_ATS_ADDRESS_ADD);
@@ -649,7 +652,7 @@ GNUNET_ATS_address_add (struct GNUNET_ATS_SchedulingHandle *sh,
     GNUNET_break (0);
     return NULL;
   }
-  GNUNET_break (GNUNET_ATS_NET_UNSPECIFIED != prop->scope);
+  GNUNET_break (GNUNET_NT_UNSPECIFIED != prop->scope);
   namelen = strlen (address->transport_name) + 1;
   msize = address->address_length + namelen;
   if ((msize + sizeof (struct AddressUpdateMessage) >= GNUNET_MAX_MESSAGE_SIZE) ||
@@ -752,7 +755,7 @@ GNUNET_ATS_address_update (struct GNUNET_ATS_AddressRecord *ar,
        ar->address->transport_name,
        ar->session,
        ar->slot);
-  GNUNET_break (GNUNET_ATS_NET_UNSPECIFIED != prop->scope);
+  GNUNET_break (GNUNET_NT_UNSPECIFIED != prop->scope);
   GNUNET_ATS_properties_hton (&ar->properties,
                               prop);
   if (NULL == sh->mq)