+ GNUNET_SERVICE_client_continue (client);
+}
+
+
+/**
+ * Clean up @a client handle if we stored any via #handle_link_controllers(),
+ * the given client disconnected.
+ *
+ * @param client the client that is history
+ */
+void
+GST_link_notify_disconnect (struct GNUNET_SERVICE_Client *client)
+{
+ struct NeighbourConnectCtxt *ncc;
+ struct NeighbourConnectCtxt *nccn;
+ struct LCFContext *lcf;
+ struct LCFContext *lcfn;
+
+ for (ncc = ncc_head; NULL != ncc; ncc = nccn)
+ {
+ nccn = ncc->next;
+ if (ncc->client == client)
+ cleanup_ncc (ncc);
+ }
+ for (unsigned int i=0;i<GST_slave_list_size;i++)
+ {
+ struct Slave *slave = GST_slave_list[i];
+ struct LinkControllersContext *lcc;
+
+ if (NULL == slave)
+ continue;
+ GNUNET_CONTAINER_multihashmap_iterate (slave->reghost_map,
+ &drop_client_entries,
+ client);
+ lcc = slave->lcc;
+ if (NULL == lcc)
+ continue;
+ if (lcc->client == client)
+ {
+ slave->lcc = NULL;
+ GNUNET_free (lcc);
+ }
+ }
+ for (lcf = lcf_head; NULL != lcf; lcf = lcfn)
+ {
+ lcfn = lcf->next;
+ if ( (NULL != lcf) &&
+ (client == lcf->client) )
+ {
+ if (NULL != lcf->op)
+ GNUNET_TESTBED_operation_done (lcf->op);
+ GNUNET_CONTAINER_DLL_remove (lcf_head,
+ lcf_tail,
+ lcf);
+ GNUNET_free (lcf);
+ }
+ }