data_size = be32toh(reply_hdr.data_size) + sizeof(*reply);
break;
default:
- ERR("Agent returned an unknown code: %" PRIu32,
- be32toh(reply_hdr.ret_code));
- ret = LTTNG_ERR_FATAL;
+ ret = LTTNG_ERR_UNK;
goto error;
}
ret = LTTNG_ERR_UST_EVENT_NOT_FOUND;
goto error;
default:
- ERR("Agent returned an unknown code: %" PRIu32,
- be32toh(reply.ret_code));
- ret = LTTNG_ERR_FATAL;
+ ret = LTTNG_ERR_UNK;
goto error;
}
{
int ret;
uint64_t data_size;
+ uint32_t reply_ret_code;
struct lttcomm_agent_disable msg;
struct lttcomm_agent_generic_reply reply;
goto error_io;
}
- switch (be32toh(reply.ret_code)) {
+ reply_ret_code = be32toh(reply.ret_code);
+ log_reply_code(reply_ret_code);
+ switch (reply_ret_code) {
case AGENT_RET_CODE_SUCCESS:
break;
case AGENT_RET_CODE_UNKNOWN_NAME:
ret = LTTNG_ERR_UST_EVENT_NOT_FOUND;
goto error;
default:
- ERR("Agent returned an unknown code: %" PRIu32,
- be32toh(reply.ret_code));
- ret = LTTNG_ERR_FATAL;
+ ret = LTTNG_ERR_UNK;
goto error;
}
assert(app);
DBG3("Agent adding app sock: %d and pid: %d to ht", app->sock->fd, app->pid);
-
- rcu_read_lock();
lttng_ht_add_unique_ulong(agent_apps_ht_by_sock, &app->node);
- rcu_read_unlock();
}
/*
DBG3("Agent adding from domain %d", agt->domain);
- rcu_read_lock();
lttng_ht_add_unique_u64(ht, &agt->node);
- rcu_read_unlock();
}
/*
int ret;
struct agent *agt;
- agt = zmalloc(sizeof(*agt));
+ agt = zmalloc(sizeof(struct agent));
if (!agt) {
goto error;
}
assert(agt->events);
DBG3("Agent adding event %s", event->name);
-
- rcu_read_lock();
add_unique_agent_event(agt->events, event);
- rcu_read_unlock();
agt->being_used = 1;
}
assert(event);
free(event->filter);
+ free(event->filter_expression);
free(event);
}
DBG3("Agent destroy");
- /*
- * Just ignore if no events hash table exists. This is possible if for
- * instance an agent object was allocated but not initialized.
- */
- if (!agt->events) {
- return;
- }
-
rcu_read_lock();
cds_lfht_for_each_entry(agt->events->ht, &iter.iter, node, node) {
int ret;