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/main.c | |
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/main.c')
-rw-r--r-- | src/main.c | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -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 |