- ERR("Channel %s: %s (session %s)", channel_name,
- lttng_strerror(ret), session_name);
+ switch (-ret) {
+ case LTTCOMM_KERN_CHAN_EXIST:
+ case LTTCOMM_UST_CHAN_EXIST:
+ WARN("Channel %s: %s (session %s", channel_name,
+ lttng_strerror(ret), session_name);
+ goto error;
+ default:
+ ERR("Channel %s: %s (session %s)", channel_name,
+ lttng_strerror(ret), session_name);
+ break;
+ }