add NOTFOUND reply for get_subbuf and put_subbuf commands
[ust.git] / ustd / ustd.c
index b38593b36b0d65cc9f89b2eea565aed612d97c58..7882e34544278f4cd68a08303670e8b8d35d75ea 100644 (file)
@@ -160,6 +160,14 @@ int put_subbuffer(struct buffer_info *buf)
                DBG("subbuffer put %s", buf->name);
                retval = PUT_SUBBUF_OK;
        }
+       else if(!strcmp(received_msg, "NOTFOUND")) {
+               WARN("For buffer %s, the trace was not found. This likely means it was destroyed by the user.", buf->name);
+               /* However, maybe this was not the last subbuffer. So
+                * we return the program died.
+                */
+               retval = PUT_SUBBUF_DIED;
+               goto end_rep;
+       }
        else {
                DBG("put_subbuffer: received error, we were pushed");
                retval = PUT_SUBBUF_PUSHED;
This page took 0.023441 seconds and 4 git commands to generate.