summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
00a17c9)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
#define DEFAULT_HOME_CLIENT_UNIX_SOCK "%s/.client-ltt-sessiond"
/* Queue size of listen(2) */
#define DEFAULT_HOME_CLIENT_UNIX_SOCK "%s/.client-ltt-sessiond"
/* Queue size of listen(2) */
+#define LTTNG_SESSIOND_COMM_MAX_LISTEN 64
/*
* Get the error code index from 0 since LTTCOMM_OK start at 1000
/*
* Get the error code index from 0 since LTTCOMM_OK start at 1000
- * Make the socket listen using MAX_LISTEN.
+ * Make the socket listen using LTTNG_SESSIOND_COMM_MAX_LISTEN.
*/
int lttcomm_listen_unix_sock(int sock)
{
int ret;
*/
int lttcomm_listen_unix_sock(int sock)
{
int ret;
- ret = listen(sock, MAX_LISTEN);
+ ret = listen(sock, LTTNG_SESSIOND_COMM_MAX_LISTEN);
if (ret < 0) {
perror("listen");
}
if (ret < 0) {
perror("listen");
}
$(top_builddir)/liblttng-sessiond-comm/liblttng-sessiond-comm.la \
$(top_builddir)/libkernelctl/libkernelctl.la \
$(top_builddir)/liblttngctl/liblttngctl.la
$(top_builddir)/liblttng-sessiond-comm/liblttng-sessiond-comm.la \
$(top_builddir)/libkernelctl/libkernelctl.la \
$(top_builddir)/liblttngctl/liblttngctl.la
+
+if LTTNG_TOOLS_HAVE_UST
+ltt_sessiond_LDADD += -llttng-ust-comm
+endif
#include <config.h>
#include <stdlib.h>
#include <lttngerr.h>
#include <config.h>
#include <stdlib.h>
#include <lttngerr.h>
+#include <ust/lttng-ust-comm.h>
DBG2("Sending UST command %d to sock %d", msg->cmd, sock);
/* Send UST msg */
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;
}
if (len < 0) {
goto error;
}
DBG2("Receiving UST reply on sock %d", sock);
/* Get UST reply */
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;
}
if (len < 0 || len < sizeof(*reply)) {
goto error;
}
#include <string.h>
#include <unistd.h>
#include <string.h>
#include <unistd.h>
-#include <lttng-sessiond-comm.h>
+#include <ust/lttng-ust-comm.h>
#include <lttngerr.h>
#include "ust-comm.h"
#include <lttngerr.h>
#include "ust-comm.h"
- if (reply->ret_code != LTTCOMM_OK) {
- DBG("Return code: %s", lttcomm_get_readable_code(reply->ret_code));
+ if (reply->ret_code != USTCOMM_OK) {
+ DBG("Return code: %s", ustcomm_get_readable_code(reply->ret_code));
- if (reply->ret_code != LTTCOMM_OK) {
- DBG("Return code: %s", lttcomm_get_readable_code(reply->ret_code));
+ if (reply->ret_code != USTCOMM_OK) {
+ DBG("Return code: %s", ustcomm_get_readable_code(reply->ret_code));
- if (reply->ret_code != LTTCOMM_OK) {
+ if (reply->ret_code != USTCOMM_OK) {
DBG("Return code (%d): %s", reply->ret_code,
DBG("Return code (%d): %s", reply->ret_code,
- lttcomm_get_readable_code(reply->ret_code));
+ ustcomm_get_readable_code(reply->ret_code));
- if (reply->ret_code != LTTCOMM_OK) {
+ if (reply->ret_code != USTCOMM_OK) {
DBG("Return code (%d): %s", reply->ret_code,
DBG("Return code (%d): %s", reply->ret_code,
- lttcomm_get_readable_code(reply->ret_code));
+ ustcomm_get_readable_code(reply->ret_code));
goto error;
} else if (reply->handle != chan->handle) {
ERR("Receive wrong handle from UST reply on enable channel");
goto error;
} else if (reply->handle != chan->handle) {
ERR("Receive wrong handle from UST reply on enable channel");
- if (reply->ret_code != LTTCOMM_OK) {
+ if (reply->ret_code != USTCOMM_OK) {
DBG("Return code (%d): %s", reply->ret_code,
DBG("Return code (%d): %s", reply->ret_code,
- lttcomm_get_readable_code(reply->ret_code));
+ ustcomm_get_readable_code(reply->ret_code));
goto error;
} else if (reply->handle != chan->handle) {
ERR("Receive wrong handle from UST reply on enable channel");
goto error;
} else if (reply->handle != chan->handle) {
ERR("Receive wrong handle from UST reply on enable channel");