[Xfce4-commits] <xfce4-mpc-plugin:master> it costs nothing to reset/drop mo->buffer in this error case.

Landry Breuil noreply at xfce.org
Sat Oct 16 12:38:01 CEST 2010


Updating branch refs/heads/master
         to d2f05a30067b53c3155e1af6efd25a12f4ae1dc5 (commit)
       from 2a189d535d93cfba40447bc18b68ecedbc848676 (commit)

commit d2f05a30067b53c3155e1af6efd25a12f4ae1dc5
Author: Landry Breuil <landry at xfce.org>
Date:   Sat Oct 16 12:08:52 2010 +0200

    it costs nothing to reset/drop mo->buffer in this error case.

 panel-plugin/simple-libmpd.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/panel-plugin/simple-libmpd.c b/panel-plugin/simple-libmpd.c
index 0084358..d035957 100644
--- a/panel-plugin/simple-libmpd.c
+++ b/panel-plugin/simple-libmpd.c
@@ -291,6 +291,8 @@ void send_complex_cmd(MpdObj* mo, char* cmd, void (*parse_answer_fct)(), void *r
          {
             mo->error = MPD_ERROR_CONNCLOSED;
             DBG("ERROR parsing reply");
+            *mo->buffer = '\0';
+            mo->buflen = 0;
             return;
          }
 



More information about the Xfce4-commits mailing list