Signed-off-by: David Goulet <david.goulet@polymtl.ca>
{
int ret;
int buf_size;
+ size_t header_size;
char *send_buf = NULL;
struct lttcomm_lttng_msg llm;
}
}
-
/* Default return code.
* In our world, everything is OK... right? ;)
*/
llm.ret_code = LTTCOMM_OK;
+ header_size = sizeof(struct lttcomm_lttng_msg);
+
/* Process by command type */
switch (lsm->cmd_type) {
case LTTNG_CREATE_SESSION:
goto end;
}
- get_list_apps((pid_t *)(send_buf + sizeof(struct lttcomm_lttng_msg)));
+ get_list_apps((pid_t *)(send_buf + header_size));
break;
}
goto end;
}
- get_list_sessions((struct lttng_session *)(send_buf + sizeof(struct lttcomm_lttng_msg)));
+ get_list_sessions((struct lttng_session *)(send_buf + header_size));
break;
}