-fix
[oweals/gnunet.git] / src / peerinfo / gnunet-service-peerinfo.c
index 2dbdc9f837f344f5737ec37b9f3591e387e0437d..df3486ea05735256584ac4d8ec8c4c7e01653823 100644 (file)
@@ -185,7 +185,7 @@ notify_all (struct HostEntry *entry)
 static struct GNUNET_HELLO_Message *
 read_host_file (const char *fn)
 {
-  char buffer[GNUNET_SERVER_MAX_MESSAGE_SIZE - 1];
+  char buffer[GNUNET_SERVER_MAX_MESSAGE_SIZE - 1] GNUNET_ALIGN;
   const struct GNUNET_HELLO_Message *hello;
   struct GNUNET_HELLO_Message *hello_clean;
   int size;
@@ -425,7 +425,7 @@ add_to_tc (void *cls, const GNUNET_HashCode * key, void *value)
   struct HostEntry *pos = value;
   struct InfoMessage *im;
   uint16_t hs;
-  char buf[GNUNET_SERVER_MAX_MESSAGE_SIZE - 1];
+  char buf[GNUNET_SERVER_MAX_MESSAGE_SIZE - 1] GNUNET_ALIGN;
 
   hs = 0;
   im = (struct InfoMessage *) buf;
@@ -457,7 +457,7 @@ static int
 discard_hosts_helper (void *cls, const char *fn)
 {
   struct GNUNET_TIME_Absolute *now = cls;
-  char buffer[GNUNET_SERVER_MAX_MESSAGE_SIZE - 1];
+  char buffer[GNUNET_SERVER_MAX_MESSAGE_SIZE - 1] GNUNET_ALIGN;
   const struct GNUNET_HELLO_Message *hello;
   struct GNUNET_HELLO_Message *new_hello;
   int size;
@@ -620,6 +620,7 @@ handle_notify (void *cls, struct GNUNET_SERVER_Client *client,
                const struct GNUNET_MessageHeader *message)
 {
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "`%s' message received\n", "NOTIFY");
+  GNUNET_SERVER_client_mark_monitor (client);
   GNUNET_SERVER_notification_context_add (notify_list, client);
   GNUNET_CONTAINER_multihashmap_iterate (hostmap, &do_notify_entry, client);
   GNUNET_SERVER_receive_done (client, GNUNET_OK);