* @param h the handle that was being used
*/
void
-GNUNET_ARM_disconnect_and_free (struct GNUNET_ARM_Handle *handle)
+GNUNET_ARM_disconnect_and_free (struct GNUNET_ARM_Handle *h)
{
LOG (GNUNET_ERROR_TYPE_DEBUG, "Disconnecting from ARM service\n");
- if (NULL != handle->cth)
+ if (NULL != h->cth)
{
- GNUNET_CLIENT_notify_transmit_ready_cancel (handle->cth);
- handle->cth = NULL;
+ GNUNET_CLIENT_notify_transmit_ready_cancel (h->cth);
+ h->cth = NULL;
}
- clear_pending_messages (handle, GNUNET_ARM_REQUEST_DISCONNECTED);
- if (NULL != handle->client)
+ clear_pending_messages (h, GNUNET_ARM_REQUEST_DISCONNECTED);
+ if (NULL != h->client)
{
- GNUNET_CLIENT_disconnect (handle->client);
- handle->client = NULL;
+ GNUNET_CLIENT_disconnect (h->client);
+ h->client = NULL;
}
- if (GNUNET_SCHEDULER_NO_TASK != handle->reconnect_task)
+ if (GNUNET_SCHEDULER_NO_TASK != h->reconnect_task)
{
- GNUNET_SCHEDULER_cancel (handle->reconnect_task);
- handle->reconnect_task = GNUNET_SCHEDULER_NO_TASK;
+ GNUNET_SCHEDULER_cancel (h->reconnect_task);
+ h->reconnect_task = GNUNET_SCHEDULER_NO_TASK;
}
- if (GNUNET_NO == handle->service_test_is_active)
+ if (GNUNET_NO == h->service_test_is_active)
{
- GNUNET_CONFIGURATION_destroy (handle->cfg);
- GNUNET_free (handle);
+ GNUNET_CONFIGURATION_destroy (h->cfg);
+ GNUNET_free (h);
}
}
* @param arm handle to the ARM connection
* @param connected GNUNET_YES if connected, GNUNET_NO if disconnected,
* GNUNET_SYSERR on error.
- * @param error GNUNET_YES if we encountered a permanent error, and there
- * will be no re-connection.
*/
static void
-conn_status (void *cls, struct GNUNET_ARM_Handle *arm, char connected)
+conn_status (void *cls, struct GNUNET_ARM_Handle *arm,
+ int connected)
{
if (GNUNET_SYSERR == connected)
{
else
GNUNET_free (armconfig);
}
- h = GNUNET_ARM_connect (cfg, conn_status, NULL);
+ h = GNUNET_ARM_connect (cfg, &conn_status, NULL);
if (NULL != h)
{
- m = GNUNET_ARM_monitor (cfg, srv_status, NULL);
+ m = GNUNET_ARM_monitor (cfg, &srv_status, NULL);
if (NULL != m)
{
- GNUNET_SCHEDULER_add_now (action_loop, NULL);
+ GNUNET_SCHEDULER_add_now (&action_loop, NULL);
GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
shutdown_task, NULL);
}
* @param cls closure, always NULL
* @param other the other peer involved
* @param message the actual message
- * @param atsi performance information
- * @param atsi_count number of entries in atsi
* @return GNUNET_OK to keep the connection open,
* GNUNET_SYSERR to close it (signal serious error)
*/
* @param ret_side sign of the cell's count where the decoded element came from.
* A negative sign indicates that the element was recovered
* resides in an IBF that was previously subtracted from.
- * @param ret_key receives the hash code of the decoded element, if successful
+ * @param ret_id receives the hash code of the decoded element, if successful
* @return GNUNET_YES if decoding an element was successful,
* GNUNET_NO if the IBF is empty,
* GNUNET_SYSERR if the decoding has failed
* @param ret_side sign of the cell's count where the decoded element came from.
* A negative sign indicates that the element was recovered
* resides in an IBF that was previously subtracted from.
- * @param ret_key receives the hash code of the decoded element, if successful
+ * @param ret_id receives the hash code of the decoded element, if successful
* @return GNUNET_YES if decoding an element was successful,
* GNUNET_NO if the IBF is empty,
* GNUNET_SYSERR if the decoding has failed
*/
int
-ibf_decode (struct InvertibleBloomFilter *ibf, int *ret_side, struct IBF_Key *ret_key);
+ibf_decode (struct InvertibleBloomFilter *ibf, int *ret_side, struct IBF_Key *ret_id);
/**
* @param error GNUNET_YES if we encountered a permanent error, and there
* will be no re-connection.
*/
-typedef void (*GNUNET_ARM_ConnectionStatusCallback) (void *cls, struct GNUNET_ARM_Handle *arm, char connected);
+typedef void (*GNUNET_ARM_ConnectionStatusCallback) (void *cls,
+ struct GNUNET_ARM_Handle *arm,
+ int connected);
/**
* @param address address of the other peer, NULL if other peer
* connected to us
* @param session session to use (or NULL)
- * @param ats performance data
- * @param ats_count number of entries in ats (excluding 0-termination)
*/
static void
check_blacklist (const struct GNUNET_PeerIdentity *peer,
* @param address address of the other peer, NULL if other peer
* connected to us
* @param session session to use (or NULL)
- * @param ats performance data
- * @param ats_count number of entries in ats (excluding 0-termination)
*/
void
GST_neighbours_handle_connect (const struct GNUNET_MessageHeader *message,
* @param address address of the other peer, NULL if other peer
* connected to us
* @param session session to use (or NULL)
- * @param ats performance data
- * @param ats_count number of entries in ats
*/
void
GST_neighbours_handle_connect_ack (const struct GNUNET_MessageHeader *message,
*
* @param cls closure
* @param neighbour identity of the neighbour
- * @param ats performance data
- * @param ats_count number of entries in ats (including 0-termination)
* @param address the address (or NULL)
* @param bandwidth_in inbound quota in NBO
* @param bandwidth_out outbound quota in NBO
*
* @param cls closure
* @param peer the peer that connected
- * @param ats performance data
- * @param ats_count number of entries in ats (excluding 0-termination)
*/
static void
notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer)