Implement ustctl_register_done
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sun, 23 Oct 2011 21:38:05 +0000 (17:38 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sun, 23 Oct 2011 21:38:05 +0000 (17:38 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/ust/lttng-ust-ctl.h
libustctl/ustctl.c

index ea3d0301c320a775e3e5fec744ecc0a6bd41c8b0..ddadd61e8b846528095a59c4ba52cc9c1dacb7f1 100644 (file)
@@ -41,6 +41,7 @@ struct object_data {
        uint64_t memory_map_size;
 };
 
+int ustctl_register_done(int sock);
 int ustctl_create_session(int sock);
 int ustctl_open_metadata(int sock, int session_handle,
                struct lttng_ust_channel_attr *chops,
index e0b7edafdb39ad07035a7558a89fb8d98ffb5565..cec7e24cab8a0b7eef95d995530843330138457c 100644 (file)
@@ -55,6 +55,32 @@ void release_object(int sock, struct object_data *data)
        free(data);
 }
 
+/*
+ * Send registration done packet to the application.
+ */
+int ustctl_register_done(int sock)
+{
+       struct ustcomm_ust_msg lum;
+       struct ustcomm_ust_reply lur;
+       int ret;
+
+       DBG("Sending register done command to %d", sock);
+       memset(&lum, 0, sizeof(lum));
+       lum.handle = LTTNG_UST_ROOT_HANDLE;
+       lum.cmd = LTTNG_UST_REGISTER_DONE;
+       ret = ustcomm_send_app_cmd(sock, &lum, &lur);
+       if (ret)
+               return ret;
+       if (lur.ret_code != USTCOMM_OK) {
+               DBG("Return code: %s", ustcomm_get_readable_code(lur.ret_code));
+               goto error;
+       }
+       return 0;
+
+error:
+       return -1;
+}
+
 /*
  * returns session handle.
  */
This page took 0.026876 seconds and 4 git commands to generate.