projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: pass NULL to config_load_session instead of an empty string
[lttng-tools.git]
/
src
/
lib
/
lttng-ctl
/
load.c
diff --git
a/src/lib/lttng-ctl/load.c
b/src/lib/lttng-ctl/load.c
index d1faf02693305541eb521eb27b1153e623835b4b..df712782f91026157c95c26896ad471f5dd0ef9e 100644
(file)
--- a/
src/lib/lttng-ctl/load.c
+++ b/
src/lib/lttng-ctl/load.c
@@
-159,14
+159,18
@@
end:
int lttng_load_session(struct lttng_load_session_attr *attr)
{
int ret;
int lttng_load_session(struct lttng_load_session_attr *attr)
{
int ret;
+ const char *url, *session_name;
if (!attr) {
ret = -LTTNG_ERR_INVALID;
goto end;
}
if (!attr) {
ret = -LTTNG_ERR_INVALID;
goto end;
}
- ret = config_load_session(attr->input_url, attr->session_name,
- attr->overwrite, 0);
+ url = attr->input_url[0] != '\0' ? attr->input_url : NULL;
+ session_name = attr->session_name[0] != '\0' ?
+ attr->session_name : NULL;
+
+ ret = config_load_session(url, session_name, attr->overwrite, 0);
end:
return ret;
end:
return ret;
This page took
0.023236 seconds
and
4
git commands to generate.