X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fplugins%2Fctf%2Flttng-live%2Fviewer-connection.c;h=be9c79e0035347660c98be2ef013b23a29c52f85;hb=0235b0db7de5bcacdb3650c92461f2ce5eb2143d;hp=0f1ddba959cb2d423e47eaad3aefdbed36d87bdc;hpb=b73700301e831acfc3d2828d22da60c3f62c497e;p=babeltrace.git diff --git a/src/plugins/ctf/lttng-live/viewer-connection.c b/src/plugins/ctf/lttng-live/viewer-connection.c index 0f1ddba9..be9c79e0 100644 --- a/src/plugins/ctf/lttng-live/viewer-connection.c +++ b/src/plugins/ctf/lttng-live/viewer-connection.c @@ -1,24 +1,8 @@ /* - * Copyright 2019 - Francis Deslauriers - * Copyright 2016 - Mathieu Desnoyers + * SPDX-License-Identifier: MIT * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. + * Copyright 2019 Francis Deslauriers + * Copyright 2016 Mathieu Desnoyers */ #define BT_COMP_LOG_SELF_COMP (viewer_connection->self_comp) @@ -412,7 +396,7 @@ end: static enum lttng_live_viewer_status lttng_live_connect_viewer( - struct live_viewer_connection *viewer_connection) + struct live_viewer_connection *viewer_connection) { struct hostent *host; struct sockaddr_in server_addr; @@ -1057,7 +1041,7 @@ end: } BT_HIDDEN -enum lttng_live_viewer_status lttng_live_attach_session( +enum lttng_live_viewer_status lttng_live_session_attach( struct lttng_live_session *session, bt_self_message_iterator *self_msg_iter) { @@ -1159,7 +1143,7 @@ end: } BT_HIDDEN -enum lttng_live_viewer_status lttng_live_detach_session( +enum lttng_live_viewer_status lttng_live_session_detach( struct lttng_live_session *session) { struct lttng_viewer_cmd cmd; @@ -1377,6 +1361,19 @@ void lttng_index_to_packet_index(struct lttng_viewer_index *lindex, pindex->events_discarded = be64toh(lindex->events_discarded); } +static +void lttng_live_need_new_streams(struct lttng_live_msg_iter *lttng_live_msg_iter) +{ + uint64_t session_idx; + + for (session_idx = 0; session_idx < lttng_live_msg_iter->sessions->len; + session_idx++) { + struct lttng_live_session *session = + g_ptr_array_index(lttng_live_msg_iter->sessions, session_idx); + session->new_streams_needed = true; + } +} + BT_HIDDEN enum lttng_live_iterator_status lttng_live_get_next_index( struct lttng_live_msg_iter *lttng_live_msg_iter, @@ -1633,7 +1630,7 @@ end: * Request new streams for a session. */ BT_HIDDEN -enum lttng_live_iterator_status lttng_live_get_new_streams( +enum lttng_live_iterator_status lttng_live_session_get_new_streams( struct lttng_live_session *session, bt_self_message_iterator *self_msg_iter) {