static int send_unix_sock(int sock, void *buf, size_t len);
static int set_signal_handler(void);
static int set_permissions(void);
static int send_unix_sock(int sock, void *buf, size_t len);
static int set_signal_handler(void);
static int set_permissions(void);
static int create_lttng_rundir(void);
static int set_kconsumerd_sockets(void);
static void cleanup(void);
static int create_lttng_rundir(void);
static int set_kconsumerd_sockets(void);
static void cleanup(void);
/* This function dispatch the work to the LTTng or UST libs
* and then sends back the response to the client. This is needed
/* This function dispatch the work to the LTTng or UST libs
* and then sends back the response to the client. This is needed
* send out so process_client_msg do both jobs.
*/
ret = process_client_msg(sock, &lsm);
* send out so process_client_msg do both jobs.
*/
ret = process_client_msg(sock, &lsm);
- strncpy(llm->trace_name, lsm->trace_name, strlen(llm->trace_name));
- llm->trace_name[strlen(llm->trace_name) - 1] = '\0';
+ strncpy(llh->trace_name, lsm->trace_name, strlen(llh->trace_name));
+ llh->trace_name[strlen(llh->trace_name) - 1] = '\0';
- llm->size_payload = s_data;
- memcpy(*buf, llm, sizeof(struct lttcomm_lttng_msg));
+ llh->payload_size = s_data;
+ memcpy(*buf, llh, sizeof(struct lttcomm_lttng_header));
DBG("Processing client message");
/* Copy common data to identify the response
* on the lttng client side.
*/
DBG("Processing client message");
/* Copy common data to identify the response
* on the lttng client side.
*/
/* Setup data buffer and details for transmission */
buf_size = setup_data_buffer(&send_buf,
/* Setup data buffer and details for transmission */
buf_size = setup_data_buffer(&send_buf,
/* Setup data buffer and details for transmission */
buf_size = setup_data_buffer(&send_buf,
/* Setup data buffer and details for transmission */
buf_size = setup_data_buffer(&send_buf,
end:
DBG("Return code to client %d", ret);
/* Notify client of error */
end:
DBG("Return code to client %d", ret);
/* Notify client of error */