Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
ret = consumer_send_msg(socket, &msg);
pthread_mutex_unlock(socket->lock);
if (ret < 0) {
+ switch (-ret) {
+ case LTTCOMM_CONSUMERD_CHAN_NOT_FOUND:
+ ret = -LTTNG_ERR_CHAN_NOT_FOUND;
+ break;
+ default:
+ ret = -LTTNG_ERR_SNAPSHOT_FAIL;
+ break;
+ }
goto error;
}
nb_packets_per_stream,
trace_archive_id);
if (ret < 0) {
+ if (ret == -LTTNG_ERR_CHAN_NOT_FOUND) {
+ continue;
+ }
goto error;
}
}
registry = get_session_registry(ua_sess);
if (!registry) {
- DBG("Application session is being torn down. Abort snapshot record.");
- ret = -1;
- goto error;
+ DBG("Application session is being torn down. Skip application.");
+ continue;
}
ret = consumer_snapshot_channel(socket,
registry->metadata_key, output,
pathname, wait, 0,
trace_archive_id);
if (ret < 0) {
+ if (ret == -LTTNG_ERR_CHAN_NOT_FOUND) {
+ continue;
+ }
goto error;
}
}