/*
* Copyright (c) 2011 David Goulet <david.goulet@polymtl.ca>
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; only version 2
+ * of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
#include <lttng/lttng.h>
#include "conf.h"
+#include "lttngerr.h"
/*
* get_session_name
}
error:
+ DBG("Session name found: %s", session_name);
return session_name;
}
-
-/*
- * set_session_name
- *
- * Get session name and set it for the lttng control lib.
- */
-int set_session_name(char *name)
-{
- int ret;
- char *session_name;
-
- if (!name) {
- session_name = get_session_name();
- if (session_name == NULL) {
- ret = -1;
- goto error;
- }
- } else {
- session_name = name;
- }
-
- lttng_set_session_name(session_name);
- if (!name)
- free(session_name);
-
- ret = 0;
-
-error:
- return ret;
-}