refactor DHT for new service API
[oweals/gnunet.git] / src / arm / arm_monitor_api.c
index 1f23c1dc5e5091d30d27d6e22885dbca2e42e41e..471393c7e13274dc52be228ff137960c556a1efe 100644 (file)
@@ -131,10 +131,10 @@ reconnect_arm_monitor_later (struct GNUNET_ARM_MonitorHandle *h)
  */
 static int
 check_monitor_notify (void *cls,
-                       const struct GNUNET_ARM_StatusMessage *res)
+                       const struct GNUNET_ARM_StatusMessage *msg)
 {
-  size_t sl = ntohs (res->header.size) - sizeof (struct GNUNET_ARM_StatusMessage);
-  const char *name = (const char *) &res[1];
+  size_t sl = ntohs (msg->header.size) - sizeof (struct GNUNET_ARM_StatusMessage);
+  const char *name = (const char *) &msg[1];
 
   if ( (0 == sl) ||
        ('\0' != name[sl-1]) )
@@ -150,7 +150,7 @@ check_monitor_notify (void *cls,
  * Handler for notification messages received from ARM.
  *
  * @param cls our `struct GNUNET_ARM_MonitorHandle`
- * @param msg the message received from the arm service
+ * @param res the message received from the arm service
  */
 static void
 handle_monitor_notify (void *cls,
@@ -198,11 +198,11 @@ mq_error_handler (void *cls,
 static int
 reconnect_arm_monitor (struct GNUNET_ARM_MonitorHandle *h)
 {
-  GNUNET_MQ_hd_var_size (monitor_notify,
-                         GNUNET_MESSAGE_TYPE_ARM_STATUS,
-                         struct GNUNET_ARM_StatusMessage);
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_monitor_notify_handler (h),
+    GNUNET_MQ_hd_var_size (monitor_notify,
+                           GNUNET_MESSAGE_TYPE_ARM_STATUS,
+                           struct GNUNET_ARM_StatusMessage,
+                           h),
     GNUNET_MQ_handler_end ()
   };
   struct GNUNET_MessageHeader *msg;