Use UST comm lib
[lttng-tools.git] / ltt-sessiond / ust-comm.c
index 31c40070e92758b94779ef6b58e27f7b5ce39a23..4a54bf78429e0172a1c7ddfbaa385c0aa98f1a74 100644 (file)
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  */
 
+#include <config.h>
 #include <stdlib.h>
-
 #include <lttngerr.h>
-
+#include <ust/lttng-ust-comm.h>
 #include "ust-comm.h"
 
 /*
  * Send msg containing a command to an UST application via sock and wait for
- * the reply.
+ * the reply. Caller must free() the reply structure sent back.
  *
  * Return the replied structure or NULL.
  */
@@ -39,10 +39,10 @@ struct lttcomm_ust_reply *ustcomm_send_command(int sock,
                goto error;
        }
 
-       DBG("Sending UST command %d to sock %d", msg->cmd, sock);
+       DBG2("Sending UST command %d to sock %d", msg->cmd, sock);
 
        /* Send UST msg */
-       len = lttcomm_send_unix_sock(sock, msg, sizeof(*msg));
+       len = ustcomm_send_unix_sock(sock, msg, sizeof(*msg));
        if (len < 0) {
                goto error;
        }
@@ -53,10 +53,10 @@ struct lttcomm_ust_reply *ustcomm_send_command(int sock,
                goto error;
        }
 
-       DBG("Receiving UST reply on sock %d", sock);
+       DBG2("Receiving UST reply on sock %d", sock);
 
        /* Get UST reply */
-       len = lttcomm_recv_unix_sock(sock, reply, sizeof(*reply));
+       len = ustcomm_recv_unix_sock(sock, reply, sizeof(*reply));
        if (len < 0 || len < sizeof(*reply)) {
                goto error;
        }
This page took 0.025481 seconds and 5 git commands to generate.