am a01cbee5: am 0bb87fe9: Merge "Signal client thread in error cases."

* commit 'a01cbee5f2b1457d7a4ce4848bf341dc2eccd5f6':
  Signal client thread in error cases.
diff --git a/audio/liba2dp.c b/audio/liba2dp.c
index f562084..62f52d4 100755
--- a/audio/liba2dp.c
+++ b/audio/liba2dp.c
@@ -272,8 +272,11 @@
 
 error:
 	/* close bluetooth connection to force reinit and reconfiguration */
-	if (data->state == A2DP_STATE_STARTING)
+	if (data->state == A2DP_STATE_STARTING) {
 		bluetooth_close(data);
+		/* notify client that thread is ready for next command */
+		pthread_cond_signal(&data->client_wait);
+        }
 	return err;
 }
 
@@ -928,8 +931,11 @@
 
 error:
 
-	if (data->state == A2DP_STATE_CONFIGURING)
+	if (data->state == A2DP_STATE_CONFIGURING) {
 		bluetooth_close(data);
+		/* notify client that thread is ready for next command */
+		pthread_cond_signal(&data->client_wait);
+        }
 	return err;
 }