/**
 * Broadcast information about the given entry to all
 * clients that care.
 *
 * @param entry entry to broadcast about
 */
static void
notify_all (struct HostEntry *entry)
{
  struct InfoMessage *msg_pub;
  struct InfoMessage *msg_friend;
  struct NotificationContext *cur;

  msg_pub = make_info_message (entry, GNUNET_NO);
  msg_friend = make_info_message (entry, GNUNET_YES);
  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
	      "Notifying all clients about peer `%s'\n",
	      GNUNET_i2s(&entry->identity));
  for (cur = nc_head; NULL != cur; cur = cur->next)
  {
    if (GNUNET_NO == cur->include_friend_only)
      {
	GNUNET_SERVER_notification_context_unicast (notify_list,
						    cur->client,
						    &msg_pub->header,
						    GNUNET_NO);
      }
    if (GNUNET_YES == cur->include_friend_only)
    {
      GNUNET_SERVER_notification_context_unicast (notify_list,
						  cur->client,
						  &msg_friend->header,
						  GNUNET_NO);
    }
  }
  GNUNET_free (msg_pub);
  GNUNET_free (msg_friend);
}
/**
 * Broadcast information about the given entry to all
 * clients that care.
 *
 * @param entry entry to broadcast about
 */
static void
notify_all (struct HostEntry *entry)
{
  struct InfoMessage *msg;

  msg = make_info_message (entry);
  GNUNET_SERVER_notification_context_broadcast (notify_list, &msg->header,
                                                GNUNET_NO);
  GNUNET_free (msg);
}
/**
 * FIXME.
 */
static int
do_notify_entry (void *cls, const GNUNET_HashCode * key, void *value)
{
  struct GNUNET_SERVER_Client *client = cls;
  struct HostEntry *he = value;
  struct InfoMessage *msg;

  msg = make_info_message (he);
  GNUNET_SERVER_notification_context_unicast (notify_list, client, &msg->header,
                                              GNUNET_NO);
  GNUNET_free (msg);
  return GNUNET_YES;
}