Port: Add OSX clock_gettime compat
[lttng-tools.git] / src / bin / lttng-sessiond / main.c
index afd0cc6e14f3cdf5d9ff6793ad4c0d60b917adcc..b0674612b54589de311bdfa0e76117226675223e 100644 (file)
@@ -1357,7 +1357,6 @@ restart:
                consumer_data->metadata_sock.lock = zmalloc(sizeof(pthread_mutex_t));
                if (consumer_data->metadata_sock.lock == NULL) {
                        PERROR("zmalloc pthread mutex");
-                       ret = -1;
                        goto error;
                }
                pthread_mutex_init(consumer_data->metadata_sock.lock, NULL);
@@ -2379,7 +2378,7 @@ static int spawn_consumer_thread(struct consumer_data *consumer_data)
        pthread_mutex_lock(&consumer_data->cond_mutex);
 
        /* Get time for sem_timedwait absolute timeout */
-       clock_ret = clock_gettime(CLOCK_MONOTONIC, &timeout);
+       clock_ret = lttng_clock_gettime(CLOCK_MONOTONIC, &timeout);
        /*
         * Set the timeout for the condition timed wait even if the clock gettime
         * call fails since we might loop on that call and we want to avoid to
@@ -3005,6 +3004,7 @@ static int process_client_msg(struct command_ctx *cmd_ctx, int sock,
        case LTTNG_SAVE_SESSION:
        case LTTNG_SET_SESSION_SHM_PATH:
        case LTTNG_REGENERATE_METADATA:
+       case LTTNG_REGENERATE_STATEDUMP:
                need_domain = 0;
                break;
        default:
@@ -4120,6 +4120,11 @@ error_add_context:
                ret = cmd_regenerate_metadata(cmd_ctx->session);
                break;
        }
+       case LTTNG_REGENERATE_STATEDUMP:
+       {
+               ret = cmd_regenerate_statedump(cmd_ctx->session);
+               break;
+       }
        default:
                ret = LTTNG_ERR_UND;
                break;
@@ -4286,7 +4291,6 @@ restart:
                        if (ret) {
                                PERROR("close");
                        }
-                       new_sock = -1;
                        continue;
                }
 
@@ -4315,7 +4319,6 @@ restart:
                if (ret) {
                        PERROR("close");
                }
-               new_sock = -1;
        }
 
 exit:
This page took 0.0255 seconds and 5 git commands to generate.