}
/* TODO : parse for IPv6 as well */
/* Parse the hostname or IP */
- ret = sscanf(path + proto_offset, "%[a-zA-Z.1-9%-]%s",
+ ret = sscanf(path + proto_offset, "%[a-zA-Z.0-9%-]%s",
hostname, remain);
if (ret == 2) {
/* Optional port number */
int ret = 0;
struct lttng_live_ctx ctx;
- /* set default */
- opt_context_field_names = 1;
- opt_payload_field_names = 1;
-
ctx.session = g_new0(struct lttng_live_session, 1);
- if (!ctx.session) {
- ret = -1;
- goto end;
- }
+
/* We need a pointer to the context from the packet_seek function. */
ctx.session->ctx = &ctx;
end_free:
g_hash_table_destroy(ctx.session->ctf_traces);
g_free(ctx.session);
-end:
g_free(ctx.session->streams);
return ret;
}