*/
#define _LGPL_SOURCE
-#include <assert.h>
#include <ctype.h>
#include <popt.h>
#include <stdio.h>
#include <common/sessiond-comm/sessiond-comm.h>
#include <common/uri.h>
#include <common/utils.h>
-#include <lttng/snapshot.h>
-#include <lttng/session-descriptor.h>
+#include <lttng/lttng.h>
static char *opt_output_path;
static char *opt_session_name;
struct lttng_session *sessions;
/* session_name should not be null */
- assert(session_name);
- assert(writer);
+ LTTNG_ASSERT(session_name);
+ LTTNG_ASSERT(writer);
count = lttng_list_sessions(&sessions);
if (count < 0) {
static
struct lttng_session_descriptor *create_session_descriptor(void)
{
- int ret;
ssize_t uri_count;
enum output_type output_type;
struct lttng_uri *uris = NULL;
output_type = OUTPUT_NONE;
} else if (opt_output_path) {
char *expanded_output_path;
+ int ret;
output_type = OUTPUT_LOCAL;
expanded_output_path = utils_expand_path(opt_output_path);
goto end;
}
} else if (opt_url || opt_ctrl_url) {
+ int ret;
+
uri_str1 = opt_ctrl_url ? opt_ctrl_url : opt_url;
uri_str2 = opt_data_url;
*
* Spawn a session daemon by forking and execv.
*/
-static int spawn_sessiond(char *pathname)
+static int spawn_sessiond(const char *pathname)
{
int ret = 0;
pid_t pid;
static int launch_sessiond(void)
{
int ret;
- char *pathname = NULL;
+ const char *pathname = NULL;
ret = lttng_session_daemon_alive();
if (ret) {