X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fjul.c;h=7b603cf25137031effccd15a7a53f19efa39c713;hb=a404f215a0b00c3a2a6f805d0a74e53adb289846;hp=c4d81217a4ded46ebe712620782dd616fdc63d67;hpb=428de77a3148b53f46d62c62da781f972c767ab7;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/jul.c b/src/bin/lttng-sessiond/jul.c index c4d81217a..7b603cf25 100644 --- a/src/bin/lttng-sessiond/jul.c +++ b/src/bin/lttng-sessiond/jul.c @@ -248,6 +248,8 @@ static int enable_event(struct jul_app *app, struct jul_event *event) goto error_io; } + msg.loglevel = event->loglevel; + msg.loglevel_type = event->loglevel_type; strncpy(msg.name, event->name, sizeof(msg.name)); ret = send_payload(app->sock, &msg, sizeof(msg)); if (ret < 0) { @@ -494,8 +496,6 @@ struct jul_app *jul_create_app(pid_t pid, struct lttcomm_sock *sock) app->pid = pid; app->sock = sock; - /* Flag it invalid until assignation. */ - app->ust_app_sock = -1; lttng_ht_node_init_ulong(&app->node, (unsigned long) app->sock->fd); error: @@ -546,59 +546,6 @@ void jul_add_app(struct jul_app *app) rcu_read_unlock(); } -/* - * Attach a given JUL application to an UST app object. This is done by copying - * the socket fd value into the ust app obj. atomically. - */ -void jul_attach_app(struct jul_app *japp) -{ - struct ust_app *uapp; - - assert(japp); - - rcu_read_lock(); - uapp = ust_app_find_by_pid(japp->pid); - if (!uapp) { - goto end; - } - - uatomic_set(&uapp->jul_app_sock, japp->sock->fd); - - DBG3("JUL app pid: %d, sock: %d attached to UST app.", japp->pid, - japp->sock->fd); - -end: - rcu_read_unlock(); - return; -} - -/* - * Remove JUL app. reference from an UST app object and set it to NULL. - */ -void jul_detach_app(struct jul_app *japp) -{ - struct ust_app *uapp; - - assert(japp); - - rcu_read_lock(); - - if (japp->ust_app_sock < 0) { - goto end; - } - - uapp = ust_app_find_by_sock(japp->ust_app_sock); - if (!uapp) { - goto end; - } - - uapp->jul_app_sock = -1; - -end: - rcu_read_unlock(); - return; -} - /* * Delete JUL application from the global hash table. */ @@ -732,27 +679,6 @@ error: return NULL; } -/* - * Delete JUL event from given domain. Events hash table MUST be initialized. - */ -void jul_delete_event(struct jul_event *event, struct jul_domain *dom) -{ - int ret; - struct lttng_ht_iter iter; - - assert(event); - assert(dom); - assert(dom->events); - - DBG3("JUL deleting event %s from domain", event->name); - - iter.iter.node = &event->node.node; - rcu_read_lock(); - ret = lttng_ht_del(dom->events, &iter); - rcu_read_unlock(); - assert(!ret); -} - /* * Free given JUL event. This event must not be globally visible at this * point (only expected to be used on failure just after event