case LTTNG_CONDITION_TYPE_BUFFER_USAGE_LOW:
case LTTNG_CONDITION_TYPE_BUFFER_USAGE_HIGH:
case LTTNG_CONDITION_TYPE_SESSION_CONSUMED_SIZE:
- return LTTNG_OBJECT_TYPE_CHANNEL;
+ return LTTNG_OBJECT_TYPE_CHANNEL;
case LTTNG_CONDITION_TYPE_SESSION_ROTATION_ONGOING:
case LTTNG_CONDITION_TYPE_SESSION_ROTATION_COMPLETED:
return LTTNG_OBJECT_TYPE_SESSION;
&iter);
node = cds_lfht_iter_get_node(&iter);
- return node ? caa_container_of(node,
+ return node ? caa_container_of(node,
struct notification_client_list,
notification_trigger_ht_node) : NULL;
}
goto end;
}
- list = caa_container_of(node,
+ list = caa_container_of(node,
struct lttng_session_trigger_list,
session_triggers_ht_node);
end:
ret = client_reset_inbound_state(client);
if (ret) {
ERR("[notification-thread] Failed to reset client communication's inbound state");
- ret = 0;
+ ret = 0;
goto error;
}
if (ret) {
ERR("[notification-thread] Failed to remove client socket from poll set");
}
- cds_lfht_del(state->client_socket_ht,
+ cds_lfht_del(state->client_socket_ht,
&client->client_socket_ht_node);
notification_client_destroy(client, state);
end:
ret = lttcomm_send_unix_sock_non_block(client->socket,
client->communication.outbound.buffer.data,
to_send_count);
- if ((ret < 0 && (errno == EAGAIN || errno == EWOULDBLOCK)) ||
- (ret > 0 && ret < to_send_count)) {
+ if ((ret >= 0 && ret < to_send_count)) {
DBG("[notification-thread] Client (socket fd = %i) outgoing queue could not be completely flushed",
client->socket);
to_send_count -= max(ret, 0);
}
static
-int client_enqueue_dropped_notification(struct notification_client *client,
- struct notification_thread_state *state)
+int client_enqueue_dropped_notification(struct notification_client *client)
{
int ret;
struct lttng_notification_channel_message msg = {
if (!client->communication.outbound.dropped_notification) {
client->communication.outbound.dropped_notification = true;
ret = client_enqueue_dropped_notification(
- client, state);
+ client);
if (ret) {
goto end;
}
trigger_list = caa_container_of(node, struct lttng_channel_trigger_list,
channel_triggers_ht_node);
cds_list_for_each_entry(trigger_list_element, &trigger_list->list,
- node) {
+ node) {
const struct lttng_condition *condition;
const struct lttng_action *action;
const struct lttng_trigger *trigger;