}
my_client = client;
GNUNET_SERVER_notification_context_add (nc, client);
- GNUNET_SERVER_client_keep (client);
return GNUNET_OK;
}
if (my_client != client)
return;
GAS_addresses_destroy_all ();
- GNUNET_SERVER_client_drop (client);
my_client = NULL;
}
GNUNET_SERVER_receive_done (client, GNUNET_OK);
}
+/**
+ * Handle 'reset backoff' messages from clients.
+ *
+ * @param cls unused, NULL
+ * @param client client that sent the request
+ * @param message the request message
+ */
+void
+GAS_handle_reset_backoff (void *cls,
+ struct GNUNET_SERVER_Client *client,
+ const struct GNUNET_MessageHeader *message)
+{
+ const struct ResetBackoffMessage *msg =
+ (const struct ResetBackoffMessage *) message;
+
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received `%s' message\n",
+ "RESET_BACKOFF");
+ GNUNET_STATISTICS_update (GSA_stats, "# backoff reset requests received", 1,
+ GNUNET_NO);
+ GNUNET_break (0 == ntohl (msg->reserved));
+ GAS_addresses_handle_backoff_reset (&msg->peer);
+ GNUNET_SERVER_receive_done (client, GNUNET_OK);
+}
+
/**
* Handle 'address update' messages from clients.
void
GAS_scheduling_done ()
{
+ if (NULL != my_client)
+ {
+ my_client = NULL;
+ }
GNUNET_SERVER_notification_context_destroy (nc);
nc = NULL;
+
}