projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: report to client when snapshot will be empty
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
consumer.c
diff --git
a/src/bin/lttng-sessiond/consumer.c
b/src/bin/lttng-sessiond/consumer.c
index d79dee3cafd99c1232f2458a985561fb0e7a1875..d4455e5c84a0cd1566978700bf7beb7667f60866 100644
(file)
--- a/
src/bin/lttng-sessiond/consumer.c
+++ b/
src/bin/lttng-sessiond/consumer.c
@@
-62,8
+62,8
@@
int consumer_socket_send(struct consumer_socket *socket, void *msg, size_t len)
/* The above call will print a PERROR on error. */
DBG("Error when sending data to consumer on sock %d", fd);
/*
/* The above call will print a PERROR on error. */
DBG("Error when sending data to consumer on sock %d", fd);
/*
- * At this point, the socket is not usable anymore thus
flagging it
- *
invalid and closing it
.
+ * At this point, the socket is not usable anymore thus
closing it and
+ *
setting the file descriptor to -1 so it is not reused
.
*/
/* This call will PERROR on error. */
*/
/* This call will PERROR on error. */
@@
-106,8
+106,8
@@
int consumer_socket_recv(struct consumer_socket *socket, void *msg, size_t len)
/* The above call will print a PERROR on error. */
DBG("Error when receiving data from the consumer socket %d", fd);
/*
/* The above call will print a PERROR on error. */
DBG("Error when receiving data from the consumer socket %d", fd);
/*
- * At this point, the socket is not usable anymore thus
flagging it
- *
invalid and closing it
.
+ * At this point, the socket is not usable anymore thus
closing it and
+ *
setting the file descriptor to -1 so it is not reused
.
*/
/* This call will PERROR on error. */
*/
/* This call will PERROR on error. */
@@
-141,7
+141,7
@@
int consumer_recv_status_reply(struct consumer_socket *sock)
goto end;
}
goto end;
}
- if (reply.ret_code == LTT
NG_OK
) {
+ if (reply.ret_code == LTT
COMM_CONSUMERD_SUCCESS
) {
/* All good. */
ret = 0;
} else {
/* All good. */
ret = 0;
} else {
@@
-177,13
+177,14
@@
int consumer_recv_status_channel(struct consumer_socket *sock,
}
/* An error is possible so don't touch the key and stream_count. */
}
/* An error is possible so don't touch the key and stream_count. */
- if (reply.ret_code != LTT
NG_OK
) {
+ if (reply.ret_code != LTT
COMM_CONSUMERD_SUCCESS
) {
ret = -1;
goto end;
}
*key = reply.key;
*stream_count = reply.stream_count;
ret = -1;
goto end;
}
*key = reply.key;
*stream_count = reply.stream_count;
+ ret = 0;
end:
return ret;
end:
return ret;
This page took
0.023403 seconds
and
4
git commands to generate.