- fix
[oweals/gnunet.git] / src / transport / plugin_transport_udp.c
index 30fe1f1ea46246ca1e105e1c3f605a60ed8a4275..885a26b190e330cadb55b038bba753d4949565e2 100644 (file)
@@ -1150,7 +1150,7 @@ free_session (struct Session *s)
 static void
 dequeue (struct Plugin *plugin, struct UDP_MessageWrapper * udpw)
 {
-  if (plugin->bytes_in_buffer - udpw->msg_size < 0)
+  if (plugin->bytes_in_buffer < udpw->msg_size)
       GNUNET_break (0);
   else
   {
@@ -1907,10 +1907,17 @@ process_inbound_tokenized_messages (void *cls, void *client,
   delay = plugin->env->receive (plugin->env->cls,
                                &si->sender,
                                hdr,
-                               (const struct GNUNET_ATS_Information *) &ats, 2,
                                si->session,
                                si->arg,
                                si->args);
+
+  plugin->env->update_address_metrics (plugin->env->cls,
+               &si->sender,
+               si->arg,
+               si->args,
+      si->session,
+                       (struct GNUNET_ATS_Information *) &ats, 2);
+
   si->session->flow_delay_for_other_peer = delay;
   reschedule_session_timeout(si->session);
   return GNUNET_OK;