* @param h the handle that was being used
*/
void
-GNUNET_ARM_disconnect (struct GNUNET_ARM_Handle *handle)
+GNUNET_ARM_disconnect_and_free (struct GNUNET_ARM_Handle *handle)
{
LOG (GNUNET_ERROR_TYPE_DEBUG, "Disconnecting from ARM service\n");
if (NULL != handle->cth)
* Stopping arm itself will not invalidate its handle, and
* ARM API will try to restore connection to the ARM service,
* even if ARM connection was lost because you asked for ARM to be stopped.
- * Call GNUNET_ARM_disconnect () to free the handle and prevent
+ * Call GNUNET_ARM_disconnect_and_free () to free the handle and prevent
* further connection attempts.
*
* @param h handle to ARM
static void
shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
- GNUNET_ARM_disconnect (h);
+ GNUNET_ARM_disconnect_and_free (h);
GNUNET_ARM_monitor_disconnect (m);
h = NULL;
m = NULL;
static void
trigger_disconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
- GNUNET_ARM_disconnect ((struct GNUNET_ARM_Handle *) cls);
+ GNUNET_ARM_disconnect_and_free ((struct GNUNET_ARM_Handle *) cls);
}
static void
trigger_disconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
- GNUNET_ARM_disconnect (arm);
+ GNUNET_ARM_disconnect_and_free (arm);
GNUNET_ARM_monitor_disconnect (mon);
}
static void
trigger_disconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
- GNUNET_ARM_disconnect (arm);
+ GNUNET_ARM_disconnect_and_free (arm);
arm = NULL;
}
* @param h the handle that was being used
*/
void
-GNUNET_ARM_disconnect (struct GNUNET_ARM_Handle *h);
+GNUNET_ARM_disconnect_and_free (struct GNUNET_ARM_Handle *h);
/**
* Stopping arm itself will not invalidate its handle, and
* ARM API will try to restore connection to the ARM service,
* even if ARM connection was lost because you asked for ARM to be stopped.
- * Call GNUNET_ARM_disconnect () to free the handle and prevent
+ * Call GNUNET_ARM_disconnect_and_free () to free the handle and prevent
* further connection attempts.
*
* @param h handle to ARM
if (NULL != peer->arm_handle)
{
- GNUNET_ARM_disconnect (peer->arm_handle);
+ GNUNET_ARM_disconnect_and_free (peer->arm_handle);
peer->arm_handle = NULL;
}
}