struct GNUNET_MQ_Envelope *mqm;
struct GNUNET_SET_CreateMessage *create_msg;
struct GNUNET_SET_CopyLazyConnectMessage *copy_msg;
- struct GNUNET_CLIENT_Connection *client;
set->cfg = cfg;
- client = GNUNET_CLIENT_connect ("set", cfg);
- if (NULL == client)
+ set->mq = GNUNET_CLIENT_connecT (cfg,
+ "set",
+ mq_handlers,
+ &handle_client_set_error,
+ set);
+ if (NULL == set->mq)
{
GNUNET_free (set);
return NULL;
}
- set->mq = GNUNET_MQ_queue_for_connection_client (client,
- mq_handlers,
- &handle_client_set_error,
- set);
- GNUNET_assert (NULL != set->mq);
-
if (NULL == cookie)
{
LOG (GNUNET_ERROR_TYPE_DEBUG,
};
struct GNUNET_MQ_Envelope *mqm;
struct GNUNET_SET_ListenMessage *msg;
- struct GNUNET_CLIENT_Connection *client;
lh->reconnect_task = NULL;
GNUNET_assert (NULL == lh->mq);
- client = GNUNET_CLIENT_connect ("set", lh->cfg);
- if (NULL == client)
+ lh->mq = GNUNET_CLIENT_connecT (lh->cfg,
+ "set",
+ mq_handlers,
+ &handle_client_listener_error,
+ lh);
+ if (NULL == lh->mq)
return;
- lh->mq = GNUNET_MQ_queue_for_connection_client (client,
- mq_handlers,
- &handle_client_listener_error,
- lh);
mqm = GNUNET_MQ_msg (msg, GNUNET_MESSAGE_TYPE_SET_LISTEN);
msg->operation = htonl (lh->operation);
msg->app_id = lh->app_id;
- GNUNET_MQ_send (lh->mq, mqm);
+ GNUNET_MQ_send (lh->mq,
+ mqm);
}