From 4e9b88df39128d01139414263e9cf387e3339814 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Fri, 11 Jul 2014 16:53:55 +0530 Subject: misc: Fix/add a couple of error messages, etc --- src/main.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/main.c b/src/main.c index b6793c6..15ea208 100644 --- a/src/main.c +++ b/src/main.c @@ -50,6 +50,9 @@ get_server_ctx_from_msg (SoupMessage *msg, ctx = g_hash_table_lookup (ctx_table, soup_uri_get_path (uri)); soup_uri_free (uri); + if (!ctx) + g_critical ("No matching context found for msg!\n"); + return ctx; } @@ -204,15 +207,18 @@ stream_finished_cb (SoupMessage *msg, { gboolean ret; - g_print ("Stream finished/aborted, sending EOS...\n"); + g_print ("Stream finished/aborted, queueing EOS... "); ctx->request_finished = TRUE; /* Incoming stream has ended */ g_signal_emit_by_name (ctx->appsrc, "end-of-stream", &ret); - if (!ret) - g_printerr ("Unable to emit end-of-stream after an aborted stream\n"); + if (ret != GST_FLOW_OK) + g_printerr ("\nUnable to emit end-of-stream after an aborted stream\n"); + else + g_print ("Done.\n"); } +/* This is called when the entire request body has been read */ static void handle_request_cb (SoupServer *server, SoupMessage *msg, -- cgit v0.11.2-2-gd1dd