From 6dc1643c76a2541bad6a2dccd047b6ed44acc7fb Mon Sep 17 00:00:00 2001 From: Szymon Janc Date: Tue, 10 May 2011 13:36:55 +0200 Subject: [PATCH] Disconnect headset when not able to reply with ERROR command --- audio/headset.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/audio/headset.c b/audio/headset.c index 3b48c27cf..4540c343b 100644 --- a/audio/headset.c +++ b/audio/headset.c @@ -1331,6 +1331,8 @@ static gboolean rfcomm_io_cb(GIOChannel *chan, GIOCondition cond, error("Badly formated or unrecognized command: %s", &slc->buf[slc->data_start]); err = headset_send(hs, "\r\nERROR\r\n"); + if (err < 0) + goto failed; } else if (err < 0) error("Error handling command %s: %s (%d)", &slc->buf[slc->data_start], -- 2.47.3