Change API to support exporting loglevel in event listing
[lttng-ust.git] / liblttng-ust / lttng-ust-comm.c
index 0b53269d60a75e2c63abfbe3ddc839670e97cf92..6830d86d100ac4ad4e49b5458f2518b463d609cc 100644 (file)
@@ -307,9 +307,7 @@ end:
                lur.u.version = lum->u.version;
                break;
        case LTTNG_UST_TRACEPOINT_LIST_GET:
-               memcpy(lur.u.tracepoint_list_entry,
-                       lum->u.tracepoint_list_entry,
-                       LTTNG_UST_SYM_NAME_LEN);
+               memcpy(&lur.u.tracepoint, &lum->u.tracepoint, sizeof(lur.u.tracepoint));
                break;
        }
        ret = send_reply(sock, &lur);
@@ -683,6 +681,20 @@ restart:
                switch (len) {
                case 0: /* orderly shutdown */
                        DBG("%s ltt-sessiond has performed an orderly shutdown\n", sock_info->name);
+                       ust_lock();
+                       /*
+                        * Either sessiond has shutdown or refused us by closing the socket.
+                        * In either case, we don't want to delay construction execution,
+                        * and we need to wait before retry.
+                        */
+                       prev_connect_failed = 1;
+                       /*
+                        * If we cannot register to the sessiond daemon, don't
+                        * delay constructor execution.
+                        */
+                       ret = handle_register_done(sock_info);
+                       assert(!ret);
+                       ust_unlock();
                        goto end;
                case sizeof(lum):
                        DBG("message received\n");
@@ -692,6 +704,7 @@ restart:
                        }
                        continue;
                case -1:
+                       DBG("Receive failed from lttng-sessiond with errno %d", errno);
                        if (errno == ECONNRESET) {
                                ERR("%s remote end closed connection\n", sock_info->name);
                                goto end;
This page took 0.026168 seconds and 4 git commands to generate.