aboutsummaryrefslogtreecommitdiffstats
path: root/src/icipc-client.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/icipc-client.c')
-rw-r--r--src/icipc-client.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/icipc-client.c b/src/icipc-client.c
index aa71b1f..587878c 100644
--- a/src/icipc-client.c
+++ b/src/icipc-client.c
@@ -24,11 +24,16 @@ reply_handler (struct icipc_sender *self, const uint8_t *buffer, size_t size, vo
{
struct client_data *data = p;
const char *error = NULL;
- const struct spa_pod *pod = icipc_client_send_request_finish (self, buffer, size, &error);
- if (!pod)
- printf ("error: %s\n", error ? error : "unknown");
- else
- printf ("success!\n");
+
+ if (buffer) {
+ const struct spa_pod *pod = icipc_client_send_request_finish (self, buffer, size, &error);
+ if (!pod)
+ printf ("error: %s\n", error ? error : "unknown");
+ else
+ printf ("success!\n");
+ } else {
+ printf ("error: lost connection with server\n");
+ }
/* signal reply received */
pthread_mutex_lock (&data->mutex);