diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2014-07-25 04:14:51 (GMT) |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2014-07-25 04:14:51 (GMT) |
commit | 8dd9db15febf97548f1bc079e91600aafa47030a (patch) | |
tree | 688e2a6ebc7cdf314f8666c3a27da73b325cf349 /src | |
parent | e0d453a3a2c120264b13c44f004025b0330547a8 (diff) | |
download | soup-transcoding-proxy-8dd9db15febf97548f1bc079e91600aafa47030a.zip soup-transcoding-proxy-8dd9db15febf97548f1bc079e91600aafa47030a.tar.gz |
misc syntactic changes -- no behaviour changes
Diffstat (limited to 'src')
-rw-r--r-- | src/encode.c | 2 | ||||
-rw-r--r-- | src/main.c | 20 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/encode.c b/src/encode.c index a18fe5e..72e91a7 100644 --- a/src/encode.c +++ b/src/encode.c @@ -149,9 +149,9 @@ on_demuxer_pad_added (GstElement *demuxer, sinkpad = gst_element_get_static_pad (rtppay, "sink"); gst_pad_link (srcpad, sinkpad); stp_print_status ("Streaming a vp8 stream on UDP\n"); + gst_object_unref (sinkpad); out: g_free (name); - gst_object_unref (sinkpad); } static void @@ -89,7 +89,7 @@ stp_validate_fetch_token_from_query (GHashTable *tokens, { GHashTable *query; char *type, *udp_clients; - STPStreamToken *token, *valid_token; + STPStreamToken *token, *perms_token; if (!query_string) { *http_status_code = SOUP_STATUS_BAD_REQUEST; @@ -111,25 +111,21 @@ stp_validate_fetch_token_from_query (GHashTable *tokens, type = g_hash_table_lookup (query, "type"); token->stream_type = stp_get_stream_type_from_string (type); - valid_token = g_hash_table_lookup (tokens, sessionid); + perms_token = g_hash_table_lookup (tokens, sessionid); if (stp_inet_addrmask && - valid_token->stream_type != token->stream_type) { + perms_token->stream_type != token->stream_type) { *http_status_code = SOUP_STATUS_FORBIDDEN; - g_free (token); - token = NULL; - goto out; + goto err; } if (!(token->stream_type & STP_STREAM_TYPE_RTP_UDP)) goto out; - /* Host and port are only needed for RTP streaming */ + /* Only needed for RTP streaming */ udp_clients = g_hash_table_lookup (query, "udp-clients"); if (!udp_clients) { *http_status_code = SOUP_STATUS_BAD_REQUEST; - g_free (token); - token = NULL; - goto out; + goto err; } token->udp_clients = g_strdup (udp_clients); @@ -137,6 +133,10 @@ stp_validate_fetch_token_from_query (GHashTable *tokens, out: g_hash_table_destroy (query); return token; +err: + g_free (token); + token = NULL; + goto out; } static void |