use c99
[oweals/gnunet.git] / src / set / set_api.c
index 826b6a63c8fe7d9cfc0aad7ddab9b83063b4ed47..af4907deaf1fd9e4415e64aa4a49456f66635a60 100644 (file)
@@ -579,21 +579,18 @@ create_internal (const struct GNUNET_CONFIGURATION_Handle *cfg,
   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,
@@ -906,21 +903,21 @@ listen_connect (void *cls)
   };
   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);
 }