X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=libust%2Flttng-ust-comm.c;h=c9cb777709dab0d84ffffebe26352fcfdfbde563;hb=b35d179d7be2ab0cb4a9c698b86d78928089fc39;hp=e28c39c6f8d930c0e32b32f2b03301ad6d93b95d;hpb=e77234624408c3d201a901121845fa5c4b93179e;p=lttng-ust.git diff --git a/libust/lttng-ust-comm.c b/libust/lttng-ust-comm.c index e28c39c6..c9cb7777 100644 --- a/libust/lttng-ust-comm.c +++ b/libust/lttng-ust-comm.c @@ -23,7 +23,8 @@ #include #include #include -#include +#include +#include #include #include @@ -54,10 +55,14 @@ int register_app_to_sessiond(int socket) { ssize_t ret; struct { + uint32_t major; + uint32_t minor; pid_t pid; uid_t uid; } reg_msg; + reg_msg.major = LTTNG_UST_COMM_VERSION_MAJOR; + reg_msg.minor = LTTNG_UST_COMM_VERSION_MINOR; reg_msg.pid = getpid(); reg_msg.uid = getuid(); @@ -75,13 +80,13 @@ int handle_message(int sock, struct lttcomm_ust_msg *lum) int ret; switch (lum->cmd_type) { - case LTTNG_CREATE_SESSION: + case UST_CREATE_SESSION: { struct lttcomm_ust_reply lur; DBG("Handling create session message"); memset(&lur, 0, sizeof(lur)); - lur.cmd_type = LTTNG_CREATE_SESSION; + lur.cmd_type = UST_CREATE_SESSION; /* ... */ ret = 0; @@ -90,7 +95,7 @@ int handle_message(int sock, struct lttcomm_ust_msg *lum) lur.ret_code = LTTCOMM_OK; else lur.ret_code = LTTCOMM_SESSION_FAIL; - lur.u.session.handle = 42; + lur.ret_val = 42; len = lttcomm_send_unix_sock(sock, &lur, sizeof(lur)); switch (len) { case sizeof(lur): @@ -220,4 +225,5 @@ void __attribute__((destructor)) lttng_ust_comm_exit(void) if (ret) { ERR("Error cancelling local ust listener thread"); } + lttng_ust_abi_exit(); }