tracectl.c: send error when put_subbuf fails
authorPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Fri, 12 Jun 2009 05:41:10 +0000 (01:41 -0400)
committerPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Fri, 12 Jun 2009 05:41:10 +0000 (01:41 -0400)
this happens when the reader is pushed by a write

libust/tracectl.c

index 3b9d3d39fccbff0d88b839c58238ee19bc7f5962..8be2cd03228edcde4196f7d211623a5a36b14d4f 100644 (file)
@@ -570,12 +570,13 @@ int listener_main(void *p)
 
                                        result = ltt_do_put_subbuf(rbuf, lttbuf, consumed_old);
                                        if(result < 0) {
-                                               WARN("ltt_do_put_subbuf: error");
+                                               WARN("ltt_do_put_subbuf: error (subbuf=%s)", channel_name);
+                                               asprintf(&reply, "%s", "ERROR", consumed_old);
                                        }
                                        else {
-                                               DBG("ltt_do_put_subbuf: success");
+                                               DBG("ltt_do_put_subbuf: success (subbuf=%s)", channel_name);
+                                               asprintf(&reply, "%s", "OK", consumed_old);
                                        }
-                                       asprintf(&reply, "%s", "OK", consumed_old);
 
                                        result = ustcomm_send_reply(&ustcomm_app.server, reply, &src);
                                        if(result) {
This page took 0.024153 seconds and 4 git commands to generate.