X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=lttng%2Futils.c;h=db7fd38fe6ee297fc2ec8b123a3fba1e3e52a3f3;hp=1b2138cedbd1531afe12db32a4cb463f84670afc;hb=3889a2d65e6e9d7a9a6e55871dda4b0c8068cb00;hpb=b73d0b29491b7d0dc5cde3c4c65a6cd7c80479b4 diff --git a/lttng/utils.c b/lttng/utils.c index 1b2138ced..db7fd38fe 100644 --- a/lttng/utils.c +++ b/lttng/utils.c @@ -1,10 +1,10 @@ /* * Copyright (c) 2011 David Goulet * - * 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 @@ -21,6 +21,7 @@ #include #include "conf.h" +#include "lttngerr.h" /* * get_session_name @@ -45,35 +46,6 @@ char *get_session_name(void) } 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; -}