X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=liblttng-ust%2Flttng-ust-comm.c;h=f11b7d0142a3b210fa6bfd2ce2c606bba83f93ed;hb=f59ed768f82d44110167a267d67145a60fe7e532;hp=78201835719d36d82d2bc20fc9d0a07bf7f3957b;hpb=7bc53e94a229963972aa78880b361b1510fdd268;p=lttng-ust.git diff --git a/liblttng-ust/lttng-ust-comm.c b/liblttng-ust/lttng-ust-comm.c index 78201835..f11b7d01 100644 --- a/liblttng-ust/lttng-ust-comm.c +++ b/liblttng-ust/lttng-ust-comm.c @@ -342,7 +342,7 @@ int handle_message(struct sock_info *sock_info, if (ops->cmd) { ret = ops->cmd(lum->handle, lum->cmd, (unsigned long) bytecode, - &args); + &args, sock_info); if (ret) { free(bytecode); } @@ -357,7 +357,7 @@ int handle_message(struct sock_info *sock_info, if (ops->cmd) ret = ops->cmd(lum->handle, lum->cmd, (unsigned long) &lum->u, - &args); + &args, sock_info); else ret = -ENOSYS; break; @@ -825,7 +825,8 @@ restart: /* * Create only one root handle per listener thread for the whole - * process lifetime. + * process lifetime, so we ensure we get ID which is statically + * assigned to the root handle. */ if (sock_info->root_handle == -1) { ret = lttng_abi_create_root_handle(); @@ -897,6 +898,10 @@ restart: } end: + ust_lock(); + /* Cleanup socket handles before trying to reconnect */ + lttng_ust_objd_table_owner_cleanup(sock_info); + ust_unlock(); goto restart; /* try to reconnect */ quit: return NULL;