diff options
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -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, |