[ltt-dev] A modest LTTng agent TCF plug-in change proposal (agent/lttctlservice.c)

Thibault, Daniel Daniel.Thibault at drdc-rddc.gc.ca
Thu Jul 21 08:49:52 EDT 2011


   The LTTng agent/client TCF plug-ins (git.dorsal.polymtl.ca: lttng-agent-72ea7d0) are a little lacking in retroaction when engaged in conversation by the TCF client (in sort-of-command-line mode).  This is also evidenced by the TODO comments left in agent/lttctlservice.c.  Right now most tcf ltt_control actions, when successful, respond with an unsettling silence.  Writing a non-committal "Action succeeded" back to the client is enough to re-assure the user that everything is well.

 

   The diff is:

 

________________________________

--- a/agent/lttctlservice.c            2011-03-23 16:20:41.000000000 -0400

+++ b/agent/lttctlservice.c         2011-07-21 08:37:46.050603621 -0400

@@ -104,7 +104,7 @@

     else if (err)

         json_write_string(&c->out, errFunc());

     else

-        /*@TODO Send some kind of status..?*/;

+        write_string(&c->out, "Action succeeded");

 

     write_stream(&c->out, 0);

     write_stream(&c->out, MARKER_EOM);

@@ -439,7 +439,7 @@

     else if (err)

         json_write_string(&c->out, provider->ltt_get_last_error());

     else

-        /*@TODO Send some kind of status..?*/;

+        write_string(&c->out, "Action succeeded");

 

     write_stream(&c->out, 0);

     write_stream(&c->out, MARKER_EOM);

@@ -486,7 +486,7 @@

     else if (err)

         json_write_string(&c->out, errFunc());

     else

-        /*@TODO Send some kind of status..?*/;

+        write_string(&c->out, "Action succeeded");

 

     write_stream(&c->out, 0);

     write_stream(&c->out, MARKER_EOM);

@@ -805,7 +805,7 @@

     else if (err)

         json_write_string(&c->out, provider->ltt_get_last_error());

     else

-        /*@TODO Send some kind of status..?*/;

+        write_string(&c->out, "Action succeeded");

 

     write_stream(&c->out, 0);

     write_stream(&c->out, MARKER_EOM);

@@ -887,7 +887,7 @@

     else if (err)

         json_write_string(&c->out, provider->ltt_get_last_error());

     else

-        /*@TODO Send some kind of status..?*/;

+        write_string(&c->out, "Action succeeded");

 

     write_stream(&c->out, 0);

     write_stream(&c->out, MARKER_EOM);

________________________________

 

Daniel U. Thibault
R & D pour la défense Canada - Valcartier (RDDC Valcartier) / Defence R&D Canada - Valcartier (DRDC Valcartier)
Système de systèmes (SdS) / System of Systems (SoS)
Solutions informatiques et expérimentations (SIE) / Computing Solutions and Experimentations (CSE)
2459 Boul. Pie XI Nord
Québec, QC  G3J 1X5
CANADA
Vox : (418) 844-4000 x4245
Fax : (418) 844-4538

NAC: 918V QSDJ <http://www.travelgis.com/map.asp?addr=918V%20QSDJ> 
Gouvernement du Canada / Government of Canada
<http://www.valcartier.drdc-rddc.gc.ca/ <http://www.valcartier.drdc-rddc.gc.ca/> >

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20110721/ba1ab60e/attachment-0003.htm>


More information about the lttng-dev mailing list