projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Implement libustctl
[lttng-ust.git]
/
libust
/
lttng-ust-comm.c
diff --git
a/libust/lttng-ust-comm.c
b/libust/lttng-ust-comm.c
index 7971168c638b2d14fdf0864ec3bb6a0b35ec840e..ba60053627ace1c0bbf01737890272f4b90178ba 100644
(file)
--- a/
libust/lttng-ust-comm.c
+++ b/
libust/lttng-ust-comm.c
@@
-182,18
+182,18
@@
int register_app_to_sessiond(int socket)
return -errno;
}
return -errno;
}
- ret =
lt
tcomm_send_unix_sock(socket, ®_msg, sizeof(reg_msg));
+ ret =
us
tcomm_send_unix_sock(socket, ®_msg, sizeof(reg_msg));
if (ret >= 0 && ret != sizeof(reg_msg))
return -EIO;
return ret;
}
static
if (ret >= 0 && ret != sizeof(reg_msg))
return -EIO;
return ret;
}
static
-int send_reply(int sock, struct
lt
tcomm_ust_reply *lur)
+int send_reply(int sock, struct
us
tcomm_ust_reply *lur)
{
ssize_t len;
{
ssize_t len;
- len =
lt
tcomm_send_unix_sock(sock, lur, sizeof(*lur));
+ len =
us
tcomm_send_unix_sock(sock, lur, sizeof(*lur));
switch (len) {
case sizeof(*lur):
DBG("message successfully sent");
switch (len) {
case sizeof(*lur):
DBG("message successfully sent");
@@
-231,11
+231,11
@@
int handle_register_done(struct sock_info *sock_info)
static
int handle_message(struct sock_info *sock_info,
static
int handle_message(struct sock_info *sock_info,
- int sock, struct
lt
tcomm_ust_msg *lum)
+ int sock, struct
us
tcomm_ust_msg *lum)
{
int ret = 0;
const struct objd_ops *ops;
{
int ret = 0;
const struct objd_ops *ops;
- struct
lt
tcomm_ust_reply lur;
+ struct
us
tcomm_ust_reply lur;
int shm_fd, wait_fd;
ust_lock();
int shm_fd, wait_fd;
ust_lock();
@@
-280,9
+280,9
@@
end:
lur.cmd = lum->cmd;
lur.ret_val = ret;
if (ret >= 0) {
lur.cmd = lum->cmd;
lur.ret_val = ret;
if (ret >= 0) {
- lur.ret_code =
LT
TCOMM_OK;
+ lur.ret_code =
US
TCOMM_OK;
} else {
} else {
- //lur.ret_code =
LT
TCOMM_SESSION_FAIL;
+ //lur.ret_code =
US
TCOMM_SESSION_FAIL;
lur.ret_code = ret;
}
switch (lum->cmd) {
lur.ret_code = ret;
}
switch (lum->cmd) {
@@
-301,6
+301,9
@@
end:
shm_fd = lum->u.channel.shm_fd;
wait_fd = lum->u.channel.wait_fd;
break;
shm_fd = lum->u.channel.shm_fd;
wait_fd = lum->u.channel.wait_fd;
break;
+ case LTTNG_UST_VERSION:
+ lur.u.version = lum->u.version;
+ break;
}
ret = send_reply(sock, &lur);
if (ret < 0) {
}
ret = send_reply(sock, &lur);
if (ret < 0) {
@@
-311,16
+314,16
@@
end:
if ((lum->cmd == LTTNG_UST_STREAM
|| lum->cmd == LTTNG_UST_CHANNEL
|| lum->cmd == LTTNG_UST_METADATA)
if ((lum->cmd == LTTNG_UST_STREAM
|| lum->cmd == LTTNG_UST_CHANNEL
|| lum->cmd == LTTNG_UST_METADATA)
- && lur.ret_code ==
LT
TCOMM_OK) {
+ && lur.ret_code ==
US
TCOMM_OK) {
/* we also need to send the file descriptors. */
/* we also need to send the file descriptors. */
- ret =
lt
tcomm_send_fds_unix_sock(sock,
+ ret =
us
tcomm_send_fds_unix_sock(sock,
&shm_fd, &shm_fd,
1, sizeof(int));
if (ret < 0) {
perror("send shm_fd");
goto error;
}
&shm_fd, &shm_fd,
1, sizeof(int));
if (ret < 0) {
perror("send shm_fd");
goto error;
}
- ret =
lt
tcomm_send_fds_unix_sock(sock,
+ ret =
us
tcomm_send_fds_unix_sock(sock,
&wait_fd, &wait_fd,
1, sizeof(int));
if (ret < 0) {
&wait_fd, &wait_fd,
1, sizeof(int));
if (ret < 0) {
@@
-620,7
+623,7
@@
restart:
}
/* Register */
}
/* Register */
- ret =
lt
tcomm_connect_unix_sock(sock_info->sock_path);
+ ret =
us
tcomm_connect_unix_sock(sock_info->sock_path);
if (ret < 0) {
ERR("Error connecting to %s apps socket", sock_info->name);
prev_connect_failed = 1;
if (ret < 0) {
ERR("Error connecting to %s apps socket", sock_info->name);
prev_connect_failed = 1;
@@
-667,9
+670,9
@@
restart:
for (;;) {
ssize_t len;
for (;;) {
ssize_t len;
- struct
lt
tcomm_ust_msg lum;
+ struct
us
tcomm_ust_msg lum;
- len =
lt
tcomm_recv_unix_sock(sock, &lum, sizeof(lum));
+ len =
us
tcomm_recv_unix_sock(sock, &lum, sizeof(lum));
switch (len) {
case 0: /* orderly shutdown */
DBG("%s ltt-sessiond has performed an orderly shutdown\n", sock_info->name);
switch (len) {
case 0: /* orderly shutdown */
DBG("%s ltt-sessiond has performed an orderly shutdown\n", sock_info->name);
This page took
0.024614 seconds
and
4
git commands to generate.