projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove a silly print out in ust_trace.h
[lttng-ust.git]
/
libustcmd
/
ustcmd.c
diff --git
a/libustcmd/ustcmd.c
b/libustcmd/ustcmd.c
index 4248072b4705d0ca384982dcbd1acb2a68f4b01e..ac90f6cae099c681218ffc73cd3ec0f0777e368d 100644
(file)
--- a/
libustcmd/ustcmd.c
+++ b/
libustcmd/ustcmd.c
@@
-52,7
+52,12
@@
pid_t *ustcmd_get_online_pids(void)
!!strcmp(dirent->d_name, "ustd")) {
sscanf(dirent->d_name, "%u", (unsigned int *) &ret[i]);
!!strcmp(dirent->d_name, "ustd")) {
sscanf(dirent->d_name, "%u", (unsigned int *) &ret[i]);
- if (pid_is_online(ret[i])) {
+ /* FIXME: Here we previously called pid_is_online, which
+ * always returned 1, now I replaced it with just 1.
+ * We need to figure out an intelligent way of solving
+ * this, maybe connect-disconnect.
+ */
+ if (1) {
ret_size += sizeof(pid_t);
ret = (pid_t *) realloc(ret, ret_size);
++i;
ret_size += sizeof(pid_t);
ret = (pid_t *) realloc(ret, ret_size);
++i;
@@
-395,10
+400,6
@@
int ustcmd_get_cmsf(struct marker_status **cmsf, const pid_t pid)
return -1;
}
result = ustcmd_send_cmd("list_markers", pid, &big_str);
return -1;
}
result = ustcmd_send_cmd("list_markers", pid, &big_str);
- if (result != 1) {
- return -1;
- }
-
if (result != 1) {
ERR("error while getting markers list");
return -1;
if (result != 1) {
ERR("error while getting markers list");
return -1;
@@
-407,6
+408,7
@@
int ustcmd_get_cmsf(struct marker_status **cmsf, const pid_t pid)
tmp_cmsf = (struct marker_status *) malloc(sizeof(struct marker_status) *
(ustcmd_count_nl(big_str) + 1));
if (tmp_cmsf == NULL) {
tmp_cmsf = (struct marker_status *) malloc(sizeof(struct marker_status) *
(ustcmd_count_nl(big_str) + 1));
if (tmp_cmsf == NULL) {
+ ERR("Failed to allocate CMSF array");
return -1;
}
return -1;
}
@@
-595,17
+597,17
@@
int ustcmd_force_switch(pid_t pid)
int ustcmd_send_cmd(const char *cmd, const pid_t pid, char **reply)
{
int ustcmd_send_cmd(const char *cmd, const pid_t pid, char **reply)
{
-
struct ustcomm_connection conn
;
+
int app_fd
;
int retval;
int retval;
- if (ustcomm_connect_app(pid, &
conn
)) {
+ if (ustcomm_connect_app(pid, &
app_fd
)) {
ERR("could not connect to PID %u", (unsigned int) pid);
return -1;
}
ERR("could not connect to PID %u", (unsigned int) pid);
return -1;
}
- retval = ustcomm_send_request(
&conn
, cmd, reply);
+ retval = ustcomm_send_request(
app_fd
, cmd, reply);
-
ustcomm_close_app(&conn
);
+
close(app_fd
);
return retval;
}
return retval;
}
This page took
0.026217 seconds
and
4
git commands to generate.