X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fsnapshot.c;h=b14a398c343ba58d2cab3a50b726f2d33475b515;hb=10a5031171c7bca5b4498c871b119e5a88b6a3fb;hp=77255fa2c597f0440e72e8585be486c64e6ef369;hpb=6dc3064a30b0cc7cfa9fdd22da1963525dfb7388;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/snapshot.c b/src/bin/lttng-sessiond/snapshot.c index 77255fa2c..b14a398c3 100644 --- a/src/bin/lttng-sessiond/snapshot.c +++ b/src/bin/lttng-sessiond/snapshot.c @@ -49,13 +49,16 @@ int snapshot_output_init(uint64_t max_size, const char *name, assert(output); + DBG2("Snapshot output initializing with max size %" PRIu64 ", name %s " + "ctrl URL %s, data URL %s", max_size, name, ctrl_url, data_url); + output->max_size = max_size; if (snapshot) { output->id = get_next_output_id(snapshot); } lttng_ht_node_init_ulong(&output->node, (unsigned long) output->id); - if (name) { + if (name && name[0] != '\0') { strncpy(output->name, name, sizeof(output->name)); } else { /* Set default name. */ @@ -211,11 +214,6 @@ error: return output; } -struct snapshot *snapshot_alloc(void) -{ - return zmalloc(sizeof(struct snapshot)); -} - /* * Initialized a snapshot object that was already allocated. *