Cleanup: src.ctf.lttng-live: rename _is_canceled function
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Wed, 15 May 2019 20:01:39 +0000 (16:01 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 28 May 2019 13:48:13 +0000 (09:48 -0400)
Rename the `lttng_live_is_canceled()` function to
`lttng_live_graph_is_canceled()` to make it clear it's the graph that
may be canceled and not the lttng_live component.

No behaviour change intended.

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Change-Id: I918c5262e4b833eb8ed302eab42df19ceac0cbbc
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1309
Tested-by: jenkins
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
plugins/ctf/lttng-live/lttng-live.c
plugins/ctf/lttng-live/lttng-live.h
plugins/ctf/lttng-live/metadata.c
plugins/ctf/lttng-live/viewer-connection.c

index 40a145607216b9bce6b856807abad69f272c677a..ef33c776c6a91e32664bdb4a4f3710cfdd68c839 100644 (file)
@@ -108,7 +108,7 @@ const char *print_state(struct lttng_live_stream_iterator *s)
        } while (0);
 
 BT_HIDDEN
-bool lttng_live_is_canceled(struct lttng_live_component *lttng_live)
+bool lttng_live_graph_is_canceled(struct lttng_live_component *lttng_live)
 {
        const bt_component *component;
        bool ret;
@@ -261,7 +261,7 @@ void lttng_live_destroy_session(struct lttng_live_session *session)
                if (lttng_live_detach_session(session)) {
                        live_comp = session->lttng_live_msg_iter->lttng_live_comp;
                        if (session->lttng_live_msg_iter &&
-                                       !lttng_live_is_canceled(live_comp)) {
+                                       !lttng_live_graph_is_canceled(live_comp)) {
                                /* Old relayd cannot detach sessions. */
                                BT_LOGD("Unable to detach lttng live session %" PRIu64,
                                        session->id);
@@ -423,7 +423,7 @@ enum lttng_live_iterator_status lttng_live_get_session(
        if (!session->attached) {
                ret = lttng_live_attach_session(session);
                if (ret) {
-                       if (lttng_live_msg_iter && lttng_live_is_canceled(
+                       if (lttng_live_msg_iter && lttng_live_graph_is_canceled(
                                                lttng_live_msg_iter->lttng_live_comp)) {
                                status = LTTNG_LIVE_ITERATOR_STATUS_AGAIN;
                        } else {
@@ -1580,7 +1580,7 @@ bt_self_component_status lttng_live_component_init(
        }
        lttng_live->self_comp = self_comp;
 
-       if (lttng_live_is_canceled(lttng_live)) {
+       if (lttng_live_graph_is_canceled(lttng_live)) {
                goto end;
        }
 
index 6a3614bbb98df72db46dd75756f4b5e5c80b8c07..4ea4865de055f1cb976e0cf41660f5546a5eb7e0 100644 (file)
@@ -295,6 +295,6 @@ struct lttng_live_trace *lttng_live_borrow_trace(
                struct lttng_live_session *session, uint64_t trace_id);
 void lttng_live_need_new_streams(struct lttng_live_msg_iter *lttng_live_msg_iter);
 
-bool lttng_live_is_canceled(struct lttng_live_component *lttng_live);
+bool lttng_live_graph_is_canceled(struct lttng_live_component *lttng_live);
 
 #endif /* BABELTRACE_PLUGIN_CTF_LTTNG_LIVE_H */
index 36ff1c6c52fabc2abc0fc3f6c3abc1a473b7a3c5..bbecc16cb20bba663263be3627eab031a991277a 100644 (file)
@@ -181,7 +181,7 @@ enum lttng_live_iterator_status lttng_live_metadata_update(
                        metadata->trace = NULL;
                }
                if (errno == EINTR) {
-                       if (lttng_live_is_canceled(lttng_live)) {
+                       if (lttng_live_graph_is_canceled(lttng_live)) {
                                status = LTTNG_LIVE_ITERATOR_STATUS_AGAIN;
                                goto end;
                        }
index ec9dba29d3e9f8246325bec90fa4c73ab1478165..fb770d712642ab28bab7a66b8e3d71aed348d1de 100644 (file)
@@ -65,7 +65,7 @@ ssize_t lttng_live_recv(struct live_viewer_connection *viewer_connection,
                }
                if (ret == BT_SOCKET_ERROR && bt_socket_interrupted()) {
                        if (!viewer_connection->in_query &&
-                                       lttng_live_is_canceled(lttng_live_msg_iter->lttng_live_comp)) {
+                                       lttng_live_graph_is_canceled(lttng_live_msg_iter->lttng_live_comp)) {
                                break;
                        } else {
                                continue;
@@ -91,7 +91,7 @@ ssize_t lttng_live_send(struct live_viewer_connection *viewer_connection,
                ret = bt_socket_send_nosigpipe(sock, buf, len);
                if (ret == BT_SOCKET_ERROR && bt_socket_interrupted()) {
                        if (!viewer_connection->in_query &&
-                                       lttng_live_is_canceled(lttng_live_msg_iter->lttng_live_comp)) {
+                                       lttng_live_graph_is_canceled(lttng_live_msg_iter->lttng_live_comp)) {
                                break;
                        } else {
                                continue;
@@ -1235,7 +1235,7 @@ end:
        return retstatus;
 
 error:
-       if (lttng_live_is_canceled(lttng_live)) {
+       if (lttng_live_graph_is_canceled(lttng_live)) {
                retstatus = LTTNG_LIVE_ITERATOR_STATUS_AGAIN;
        } else {
                retstatus = LTTNG_LIVE_ITERATOR_STATUS_ERROR;
@@ -1360,7 +1360,7 @@ end:
        return retstatus;
 
 error:
-       if (lttng_live_is_canceled(lttng_live)) {
+       if (lttng_live_graph_is_canceled(lttng_live)) {
                retstatus = BT_MSG_ITER_MEDIUM_STATUS_AGAIN;
        } else {
                retstatus = BT_MSG_ITER_MEDIUM_STATUS_ERROR;
@@ -1457,7 +1457,7 @@ end:
        return status;
 
 error:
-       if (lttng_live_is_canceled(lttng_live)) {
+       if (lttng_live_graph_is_canceled(lttng_live)) {
                status = LTTNG_LIVE_ITERATOR_STATUS_AGAIN;
        } else {
                status = LTTNG_LIVE_ITERATOR_STATUS_ERROR;
This page took 0.029245 seconds and 4 git commands to generate.