#include <lttng/notification/channel-internal.h>
#include <lttng/rotate-internal.h>
#include <lttng/location-internal.h>
+#include <lttng/condition/condition-internal.h>
#include "rotation-thread.h"
#include "lttng-sessiond.h"
* the job will be processed when the rotation_thread catches
* up.
*/
+ DIAGNOSTIC_PUSH
+ DIAGNOSTIC_IGNORE_LOGICAL_OP
if (errno == EAGAIN || errno == EWOULDBLOCK) {
+ DIAGNOSTIC_POP
/*
* Not an error, but would be surprising and indicate
* that the rotation thread can't keep up with the
session = job->session;
if (!session) {
DBG("Session \"%s\" not found",
- session->name);
+ session->name != NULL ? session->name : "");
/*
* This is a non-fatal error, and we cannot report it to
* the user (timer), so just print the error and
session_lock_list();
session = session_find_by_name(condition_session_name);
if (!session) {
- ret = -1;
- session_unlock_list();
- ERR("Session \"%s\" not found",
+ DBG("Failed to find session while handling notification: notification type = %s, session name = `%s`",
+ lttng_condition_type_str(condition_type),
condition_session_name);
+ /*
+ * Not a fatal error: a session can be destroyed before we get
+ * the chance to handle the notification.
+ */
+ ret = 0;
+ session_unlock_list();
goto end;
}
session_lock(session);