Relayd data available command support
[lttng-tools.git] / src / common / kernel-consumer / kernel-consumer.c
index 46413eda6e710d9e2f934df9e49336a5fd6fcef0..4e000fbd167e294c6b9139b6b7bdd2cf0098d6f1 100644 (file)
@@ -282,8 +282,19 @@ int lttng_kconsumer_recv_cmd(struct lttng_consumer_local_data *ctx,
        }
        case LTTNG_CONSUMER_DATA_AVAILABLE:
        {
-               rcu_read_unlock();
-               return -ENOSYS;
+               int32_t ret;
+               uint64_t id = msg.u.data_available.session_id;
+
+               DBG("Kernel consumer data available command for id %" PRIu64, id);
+
+               ret = consumer_data_available(id);
+
+               /* Send back returned value to session daemon */
+               ret = lttcomm_send_unix_sock(sock, &ret, sizeof(ret));
+               if (ret < 0) {
+                       PERROR("send data available ret code");
+               }
+               break;
        }
        default:
                goto end_nosignal;
This page took 0.032241 seconds and 4 git commands to generate.