*/
#define _LGPL_SOURCE
-#include <assert.h>
#include <common/common.h>
#include <common/sessiond-comm/sessiond-comm.h>
struct lttng_ht_iter iter;
list = session_get_list();
- assert(list);
+ LTTNG_ASSERT(list);
cds_list_for_each_entry_safe(session, stmp, &list->head, list) {
if (!session_get(session)) {
* before this thread is launched.
*/
ret = uri_parse(default_reg_uri, &uri);
- assert(ret);
- assert(the_config.agent_tcp_port.begin > 0);
+ LTTNG_ASSERT(ret);
+ LTTNG_ASSERT(the_config.agent_tcp_port.begin > 0);
uri->port = the_config.agent_tcp_port.begin;
sock = lttcomm_alloc_sock_from_uri(uri);
int ret;
uint16_t port;
- assert(sock);
+ LTTNG_ASSERT(sock);
ret = lttcomm_sock_get_port(sock, &port);
if (ret) {
struct agent_register_msg msg;
struct lttcomm_sock *new_sock;
- assert(reg_sock);
+ LTTNG_ASSERT(reg_sock);
new_sock = reg_sock->ops->accept(reg_sock);
if (!new_sock) {
int enabled;
enabled = uatomic_read(&agent_tracing_enabled);
- assert(enabled != -1);
+ LTTNG_ASSERT(enabled != -1);
return enabled == 1;
}
rcu_thread_online();
/* Agent initialization call MUST be called before starting the thread. */
- assert(the_agent_apps_ht_by_sock);
+ LTTNG_ASSERT(the_agent_apps_ht_by_sock);
/* Create pollset with size 2, quit pipe and registration socket. */
ret = lttng_poll_create(&events, 2, LTTNG_CLOEXEC);
uint16_t port;
ret = lttcomm_sock_get_port(reg_sock, &port);
- assert(ret == 0);
+ LTTNG_ASSERT(ret == 0);
ret = write_agent_port(port);
if (ret) {
struct lttcomm_sock *new_app_socket;
int new_app_socket_fd;
- assert(pollfd == reg_sock->fd);
+ LTTNG_ASSERT(pollfd == reg_sock->fd);
ret = accept_agent_connection(
reg_sock, &new_app_id, &new_app_socket);