Commit d347a1c5 authored by Alba Mendez's avatar Alba Mendez
Browse files

typos in webrtc-unidirectional-h264.c

parent f8cbae9d
Pipeline #280999 waiting for manual action with stages
in 42 seconds
......@@ -409,9 +409,7 @@ void
soup_websocket_message_cb (G_GNUC_UNUSED SoupWebsocketConnection * connection,
SoupWebsocketDataType data_type, GBytes * message, gpointer user_data)
{
gsize size;
gchar *data;
gchar *data_string;
const gchar *data_string = g_bytes_get_data (message, NULL);;
const gchar *type_string;
JsonNode *root_json;
JsonObject *root_json_object;
......@@ -422,14 +420,9 @@ soup_websocket_message_cb (G_GNUC_UNUSED SoupWebsocketConnection * connection,
switch (data_type) {
case SOUP_WEBSOCKET_DATA_BINARY:
g_error ("Received unknown binary message, ignoring\n");
g_bytes_unref (message);
return;
case SOUP_WEBSOCKET_DATA_TEXT:
data = g_bytes_unref_to_data (message, &size);
/* Convert to NULL-terminated string */
data_string = g_strndup (data, size);
g_free (data);
break;
default:
......@@ -536,7 +529,6 @@ soup_websocket_message_cb (G_GNUC_UNUSED SoupWebsocketConnection * connection,
cleanup:
if (json_parser != NULL)
g_object_unref (G_OBJECT (json_parser));
g_free (data_string);
return;
unknown_message:
......@@ -588,7 +580,7 @@ soup_websocket_handler (G_GNUC_UNUSED SoupServer * server,
ReceiverEntry *receiver_entry;
GHashTable *receiver_entry_table = (GHashTable *) user_data;
gst_print ("Processing new websocket connection %p", (gpointer) connection);
gst_print ("Processing new websocket connection %p\n", (gpointer) connection);
g_signal_connect (G_OBJECT (connection), "closed",
G_CALLBACK (soup_websocket_closed_cb), (gpointer) receiver_entry_table);
......@@ -675,8 +667,11 @@ main (int argc, char *argv[])
soup_server_add_handler (soup_server, "/", soup_http_handler, NULL, NULL);
soup_server_add_websocket_handler (soup_server, "/ws", NULL, NULL,
soup_websocket_handler, (gpointer) receiver_entry_table, NULL);
soup_server_listen_all (soup_server, SOUP_HTTP_PORT,
(SoupServerListenOptions) 0, NULL);
if (!soup_server_listen_all (soup_server, SOUP_HTTP_PORT,
(SoupServerListenOptions) 0, NULL)) {
g_printerr ("Can't listen on HTTP port\n");
return -1;
}
gst_print ("WebRTC page link: http://127.0.0.1:%d/\n", (gint) SOUP_HTTP_PORT);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment