fix bug that always forced the consumed offset at 0
[ust.git] / libust / tracectl.c
index 0a8fc8e80f2e2d2e7bdbc3ead5df30a97d40a61f..3a5a3385d2522ae094046cef4d570cc61dd303eb 100644 (file)
@@ -640,7 +640,6 @@ static int do_cmd_put_subbuffer(const char *recvbuf, struct ustcomm_source *src)
                if(!strcmp(trace->channels[i].channel_name, ch_name)) {
                        struct ust_buffer *buf = channel->buf[ch_cpu];
                        char *reply;
-                       long consumed_old=0;
 
                        found = 1;
 
@@ -1117,6 +1116,11 @@ static void __attribute__((constructor)) init()
                /* Ensure markers are initialized */
                init_markers();
 
+               /* Ensure buffers are initialized, for the transport to be available.
+                * We are about to set a trace type and it will fail without this.
+                */
+               init_ustrelay_transport();
+
                /* FIXME: When starting early tracing (here), depending on the
                 * order of constructors, it is very well possible some marker
                 * sections are not yet registered. Because of this, some
This page took 0.022435 seconds and 4 git commands to generate.