};
struct GNUNET_MQ_Envelope *e;
struct ClientPhoneRegisterMessage *reg;
- struct GNUNET_CLIENT_Connection *client;
clean_up_callers (phone);
if (NULL != phone->mq)
phone->mq = NULL;
}
phone->state = PS_REGISTER;
- client = GNUNET_CLIENT_connect ("conversation",
- phone->cfg);
- if (NULL == client)
+ phone->mq = GNUNET_CLIENT_connecT (phone->cfg,
+ "conversation",
+ handlers,
+ &phone_error_handler,
+ phone);
+ if (NULL == phone->mq)
return;
- phone->mq = GNUNET_MQ_queue_for_connection_client (client,
- handlers,
- &phone_error_handler,
- phone);
e = GNUNET_MQ_msg (reg, GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_REGISTER);
reg->line = phone->my_record.line;
GNUNET_MQ_send (phone->mq, e);
*/
const struct GNUNET_CONFIGURATION_Handle *cfg;
- /**
- * Handle to talk with CONVERSATION service.
- */
- struct GNUNET_CLIENT_Connection *client;
-
/**
* Our caller identity.
*/
GNUNET_MQ_destroy (call->mq);
call->mq = NULL;
}
- if (NULL != call->client)
- {
- GNUNET_CLIENT_disconnect (call->client);
- call->client = NULL;
- }
call->state = CS_SHUTDOWN;
call->event_handler (call->event_handler_cls,
GNUNET_CONVERSATION_EC_CALL_ERROR);
};
struct GNUNET_CRYPTO_EcdsaPublicKey my_zone;
- call->client = GNUNET_CLIENT_connect ("conversation", cfg);
- if (NULL == call->client)
+ call->mq = GNUNET_CLIENT_connecT (cfg,
+ "conversation",
+ handlers,
+ &call_error_handler,
+ call);
+ if (NULL == call->mq)
{
GNUNET_break (0);
GNUNET_free (call);
GNUNET_CONVERSATION_call_stop (call);
return NULL;
}
- call->mq = GNUNET_MQ_queue_for_connection_client (call->client,
- handlers,
- &call_error_handler,
- call);
call->state = CS_LOOKUP;
GNUNET_IDENTITY_ego_get_public_key (call->zone_id,
&my_zone);
GNUNET_MQ_destroy (call->mq);
call->mq = NULL;
}
- if (NULL != call->client)
- {
- GNUNET_CLIENT_disconnect (call->client);
- call->client = NULL;
- }
if (NULL != call->gns_lookup)
{
GNUNET_GNS_lookup_cancel (call->gns_lookup);