+/**
+ * Method called to inform about the egos of this peer.
+ *
+ * When used with #GNUNET_IDENTITY_create or #GNUNET_IDENTITY_get,
+ * this function is only called ONCE, and 'NULL' being passed in
+ * @a ego does indicate an error (i.e. name is taken or no default
+ * value is known). If @a ego is non-NULL and if '*ctx'
+ * is set in those callbacks, the value WILL be passed to a subsequent
+ * call to the identity callback of #GNUNET_IDENTITY_connect (if
+ * that one was not NULL).
+ *
+ * @param cls closure, NULL
+ * @param ego ego handle
+ * @param ctx context for application to store data for this ego
+ * (during the lifetime of this process, initially NULL)
+ * @param name name assigned by the user for this ego,
+ * NULL if the user just deleted the ego and it
+ * must thus no longer be used
+ */
+static void
+identity_cb (void *cls,
+ struct GNUNET_IDENTITY_Ego *ego,
+ void **ctx,
+ const char *name)
+{
+ int options;
+
+ (void) cls;
+ (void) ctx;
+ (void) name;
+ id_op = NULL;
+ if (NULL == ego)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ _("No ego configured for `fcfsd` subsystem\n"));
+ return;
+ }
+ fcfs_zone_pkey = *GNUNET_IDENTITY_ego_get_private_key (ego);
+
+ options = MHD_USE_DUAL_STACK | MHD_USE_DEBUG;
+ do
+ {
+ httpd = MHD_start_daemon (options,
+ (uint16_t) port,
+ NULL, NULL,
+ &create_response, NULL,
+ MHD_OPTION_CONNECTION_LIMIT, (unsigned int) 128,
+ MHD_OPTION_PER_IP_CONNECTION_LIMIT, (unsigned int) 1,
+ MHD_OPTION_CONNECTION_TIMEOUT, (unsigned int) 16,
+ MHD_OPTION_CONNECTION_MEMORY_LIMIT, (size_t) (4 * 1024),
+ MHD_OPTION_NOTIFY_COMPLETED, &request_completed_callback, NULL,
+ MHD_OPTION_END);
+ if (MHD_USE_DEBUG == options)
+ break;
+ options = MHD_USE_DEBUG;
+ }
+ while (NULL == httpd);
+ if (NULL == httpd)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ _("Failed to start HTTP server\n"));
+ GNUNET_SCHEDULER_shutdown ();
+ return;
+ }
+ run_httpd ();
+}
+
+