X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=liblttngctl%2Fliblttngctl.c;h=e0a81588281b1f1e82955627abe7eb22c7300331;hp=e693123b9c1c384b5d18f8f9eaa1d64984fe991d;hb=b79f82bbde7fd1fb50a6820d5ffabdbe105941ed;hpb=38057ed1e3358090cd03b81ce8414b032eb56f43 diff --git a/liblttngctl/liblttngctl.c b/liblttngctl/liblttngctl.c index e693123b9..e0a815882 100644 --- a/liblttngctl/liblttngctl.c +++ b/liblttngctl/liblttngctl.c @@ -1,19 +1,23 @@ /* + * liblttngctl.c + * + * Linux Trace Toolkit Control Library + * * 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 distributed in the hope that it will be useful, + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; only + * version 2.1 of the License. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #define _GNU_SOURCE @@ -204,6 +208,14 @@ static int disconnect_sessiond(void) return ret; } +/* + * Reset the session message structure. + */ +static void reset_session_msg(void) +{ + memset(&lsm, 0, sizeof(struct lttcomm_session_msg)); +} + /* * ask_sessiond * @@ -262,6 +274,7 @@ static int ask_sessiond(enum lttcomm_sessiond_command lct, void **buf) end: disconnect_sessiond(); + reset_session_msg(); return ret; }