The started flag, use to detect start vs restart, was set to 0 when
stopping tracing which is really not suppose to. An assert has been
addedd to detect a started = 0 at this stage which is a bad execution
flow error.
Signed-off-by: David Goulet <dgoulet@efficios.com>
goto error_rcu_unlock;
}
- /* Not started, continuing. */
- if (ua_sess->started == 0) {
- goto end;
- }
+ /*
+ * If started = 0, it means that stop trace has been called for a session
+ * that was never started. This is a code flow error and should never
+ * happen.
+ */
+ assert(ua_sess->started == 1);
/* This inhibits UST tracing */
ret = ustctl_stop_session(app->key.sock, ua_sess->handle);
ret);
}
- ua_sess->started = 0;
-
end:
rcu_read_unlock();
return 0;