Update quickstart
[lttng-tools.git] / liblttngctl / liblttngctl.c
index e693123b9c1c384b5d18f8f9eaa1d64984fe991d..e0a81588281b1f1e82955627abe7eb22c7300331 100644 (file)
@@ -1,19 +1,23 @@
 /*
+ * liblttngctl.c
+ *
+ * Linux Trace Toolkit Control Library
+ *
  * 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 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;
 }
 
This page took 0.023515 seconds and 4 git commands to generate.