+ if (!found) {
+ iter = NULL;
+ }
+ return iter;
+}
+
+/*
+ * find_session_by_name
+ *
+ * Return a ltt_session structure ptr that matches name.
+ * If no session found, NULL is returned.
+ */
+static struct ltt_session *find_session_by_name(char *name)
+{
+ int found = 0;
+ struct ltt_session *iter;
+
+ cds_list_for_each_entry(iter, <t_session_list.head, list) {
+ if (strncmp(iter->name, name, strlen(iter->name)) == 0) {
+ found = 1;
+ break;
+ }
+ }
+
+ if (!found) {
+ iter = NULL;
+ }
+