- else if(nth_token_is(recvbuf, "get_n_subbufs", 0) == 1) {
- do_cmd_get_n_subbufs(recvbuf, &src);
+
+ reply_msg->channel = USTCOMM_POISON_PTR;
+ reply_msg->consumed_old = consumed_old;
+
+ reply_header->size = COMPUTE_MSG_SIZE(reply_msg, offset);
+
+ break;
+ case PUT_SUBBUFFER:
+ result = put_subbuffer(buf_inf->trace, buf_inf->channel,
+ buf_inf->ch_cpu,
+ buf_inf->consumed_old);
+ reply_header->result = result;
+
+ break;
+ }
+
+ if (ustcomm_send(sock, reply_header, (char *)reply_msg) < 0) {
+ ERR("ustcomm_send failed");
+ }
+
+}
+
+static void process_ust_marker_cmd(int sock, int command,
+ struct ustcomm_ust_marker_info *ust_marker_inf)
+{
+ struct ustcomm_header _reply_header;
+ struct ustcomm_header *reply_header = &_reply_header;
+ int result = 0;
+
+ memset(reply_header, 0, sizeof(*reply_header));
+
+ switch(command) {
+ case ENABLE_MARKER:
+
+ result = ltt_ust_marker_connect(ust_marker_inf->channel,
+ ust_marker_inf->ust_marker,
+ "default");
+ if (result < 0) {
+ WARN("could not enable ust_marker; channel=%s,"
+ " name=%s",
+ ust_marker_inf->channel,
+ ust_marker_inf->ust_marker);
+