/**
 * Adapter function called to destroy a connection to
 * a service.
 *
 * @param cls closure
 * @param op_result service handle returned from the connect adapter
 */
static void
decrypt_disconnect_adapter(void *cls, void *op_result)
{
  struct GNUNET_SECRETSHARING_DecryptionHandle **dh = cls;
  if (NULL != *dh)
  {
    GNUNET_SECRETSHARING_decrypt_cancel (*dh);
    *dh = NULL;
  }
}
/**
 * Adapter function called to destroy a connection to
 * a service.
 *
 * @param cls closure
 * @param op_result service handle returned from the connect adapter
 */
static void
decrypt_disconnect_adapter(void *cls, void *op_result)
{
  struct GNUNET_SECRETSHARING_DecryptionHandle **dh = cls;
  unsigned int n = dh - decrypt_handles;

  GNUNET_assert (*dh == decrypt_handles[n]);

  if (NULL != *dh)
  {
    GNUNET_SECRETSHARING_decrypt_cancel (*dh);
    *dh = NULL;
  }

  GNUNET_assert (NULL != connect_ops[n]);
  connect_ops[n] = NULL;
}