Tear down handles associated with a closed sessiond socket
[lttng-ust.git] / liblttng-ust / lttng-ust-comm.c
index 78201835719d36d82d2bc20fc9d0a07bf7f3957b..f11b7d0142a3b210fa6bfd2ce2c606bba83f93ed 100644 (file)
@@ -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;
This page took 0.025775 seconds and 4 git commands to generate.