X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Flib%2Flttng-ctl%2Fchannel.cpp;h=aee38f58bfa41bafebd5fce22c5d26d12c590a6f;hb=1524f98c04431d04e50796f83a9dd29184b3a8a4;hp=d1d92d00d5497b9f8cdf27525b2db9591e9f678a;hpb=63ae8472c752d86217fb28671ea9e9199fdca993;p=lttng-tools.git diff --git a/src/lib/lttng-ctl/channel.cpp b/src/lib/lttng-ctl/channel.cpp index d1d92d00d..aee38f58b 100644 --- a/src/lib/lttng-ctl/channel.cpp +++ b/src/lib/lttng-ctl/channel.cpp @@ -268,7 +268,7 @@ lttng_notification_channel_get_next_notification( status = LTTNG_NOTIFICATION_CHANNEL_STATUS_ERROR; goto end_unlock; } - ret = lttng_poll_add(&events, channel->socket, LPOLLIN | LPOLLERR); + ret = lttng_poll_add(&events, channel->socket, LPOLLIN); if (ret < 0) { status = LTTNG_NOTIFICATION_CHANNEL_STATUS_ERROR; goto end_clean_poll; @@ -448,7 +448,7 @@ lttng_notification_channel_has_pending_notification( status = LTTNG_NOTIFICATION_CHANNEL_STATUS_ERROR; goto end_unlock; } - ret = lttng_poll_add(&events, channel->socket, LPOLLIN | LPOLLERR); + ret = lttng_poll_add(&events, channel->socket, LPOLLIN); if (ret < 0) { status = LTTNG_NOTIFICATION_CHANNEL_STATUS_ERROR; goto end_clean_poll; @@ -577,13 +577,13 @@ int handshake(struct lttng_notification_channel *channel) .major = LTTNG_NOTIFICATION_CHANNEL_VERSION_MAJOR, .minor = LTTNG_NOTIFICATION_CHANNEL_VERSION_MINOR, }; - struct lttng_notification_channel_message msg_header = { - .type = LTTNG_NOTIFICATION_CHANNEL_MESSAGE_TYPE_HANDSHAKE, - .size = sizeof(handshake), - .fds = 0, - }; + struct lttng_notification_channel_message msg_header; char send_buffer[sizeof(msg_header) + sizeof(handshake)]; + msg_header.type = LTTNG_NOTIFICATION_CHANNEL_MESSAGE_TYPE_HANDSHAKE; + msg_header.size = sizeof(handshake); + msg_header.fds = 0; + memcpy(send_buffer, &msg_header, sizeof(msg_header)); memcpy(send_buffer + sizeof(msg_header), &handshake, sizeof(handshake)); @@ -627,11 +627,11 @@ enum lttng_notification_channel_status send_condition_command( enum lttng_notification_channel_status status = LTTNG_NOTIFICATION_CHANNEL_STATUS_OK; struct lttng_payload payload; - struct lttng_notification_channel_message cmd_header = { - .type = (int8_t) type, - .size =0, - .fds = 0, - }; + struct lttng_notification_channel_message cmd_header; + + cmd_header.type = (int8_t) type; + cmd_header.size = 0; + cmd_header.fds = 0; lttng_payload_init(&payload);