ABI: refuse non-matching ABI minor version on event registration
[lttng-ust.git] / liblttng-ust-comm / lttng-ust-comm.c
index 2c54a443566a7fca4bc7e919d5bec6608f1fd176..7ba23c527ce0e9b3c2c621e4fe66acf3af33c37d 100644 (file)
@@ -95,7 +95,7 @@ const char *lttng_ust_strerror(int code)
  *
  * Connect to unix socket using the path name.
  */
-int ustcomm_connect_unix_sock(const char *pathname)
+int ustcomm_connect_unix_sock(const char *pathname, long timeout)
 {
        struct sockaddr_un sun;
        int fd, ret;
@@ -110,6 +110,15 @@ int ustcomm_connect_unix_sock(const char *pathname)
                ret = -errno;
                goto error;
        }
+       if (timeout >= 0) {
+               /* Give at least 10ms. */
+               if (timeout < 10)
+                       timeout = 10;
+               ret = ustcomm_setsockopt_snd_timeout(fd, timeout);
+               if (ret < 0) {
+                       WARN("Error setting connect socket send timeout");
+               }
+       }
        ret = fcntl(fd, F_SETFD, FD_CLOEXEC);
        if (ret < 0) {
                PERROR("fcntl");
@@ -1088,8 +1097,10 @@ int serialize_entries(struct ustctl_enum_entry **_entries,
                uentry = &entries[i];
                lentry = &lttng_entries[i];
 
-               uentry->start = lentry->start;
-               uentry->end = lentry->end;
+               uentry->start.value = lentry->start.value;
+               uentry->start.signedness = lentry->start.signedness;
+               uentry->end.value = lentry->end.value;
+               uentry->end.signedness = lentry->end.signedness;
                strncpy(uentry->string, lentry->string, LTTNG_UST_SYM_NAME_LEN);
                uentry->string[LTTNG_UST_SYM_NAME_LEN - 1] = '\0';
        }
This page took 0.023257 seconds and 4 git commands to generate.