projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make code simpler for send buffer header size
[lttng-tools.git]
/
ltt-sessiond
/
ltt-sessiond.c
diff --git
a/ltt-sessiond/ltt-sessiond.c
b/ltt-sessiond/ltt-sessiond.c
index 275088f075e959fcfe07ddbd966c73c060646fdd..4f9ca1bd4d2e45396edbbe367a165dca50af3830 100644
(file)
--- a/
ltt-sessiond/ltt-sessiond.c
+++ b/
ltt-sessiond/ltt-sessiond.c
@@
-684,6
+684,7
@@
static int process_client_msg(int sock, struct lttcomm_session_msg *lsm)
{
int ret;
int buf_size;
{
int ret;
int buf_size;
+ size_t header_size;
char *send_buf = NULL;
struct lttcomm_lttng_msg llm;
char *send_buf = NULL;
struct lttcomm_lttng_msg llm;
@@
-704,12
+705,13
@@
static int process_client_msg(int sock, struct lttcomm_session_msg *lsm)
}
}
}
}
-
/* Default return code.
* In our world, everything is OK... right? ;)
*/
llm.ret_code = LTTCOMM_OK;
/* 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:
/* Process by command type */
switch (lsm->cmd_type) {
case LTTNG_CREATE_SESSION:
@@
-771,7
+773,7
@@
static int process_client_msg(int sock, struct lttcomm_session_msg *lsm)
goto end;
}
goto end;
}
- get_list_apps((pid_t *)(send_buf +
sizeof(struct lttcomm_lttng_msg)
));
+ get_list_apps((pid_t *)(send_buf +
header_size
));
break;
}
break;
}
@@
-791,7
+793,7
@@
static int process_client_msg(int sock, struct lttcomm_session_msg *lsm)
goto end;
}
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;
}
break;
}
This page took
0.023878 seconds
and
4
git commands to generate.