Commit 99e8a581 authored by Youness Alaoui's avatar Youness Alaoui

do not use the same variable name for two different things... with one being...

do not use the same variable name for two different things... with one being inside a smaller scope of the same function... this could lead to confusion...
parent aeb51195
...@@ -761,6 +761,7 @@ priv_add_new_candidate_discovery_turn (NiceAgent *agent, ...@@ -761,6 +761,7 @@ priv_add_new_candidate_discovery_turn (NiceAgent *agent,
{ {
CandidateDiscovery *cdisco; CandidateDiscovery *cdisco;
GSList *modified_list; GSList *modified_list;
GSList *socket_modified_list;
/* note: no need to check for redundant candidates, as this is /* note: no need to check for redundant candidates, as this is
* done later on in the process */ * done later on in the process */
...@@ -777,7 +778,6 @@ priv_add_new_candidate_discovery_turn (NiceAgent *agent, ...@@ -777,7 +778,6 @@ priv_add_new_candidate_discovery_turn (NiceAgent *agent,
if (turn->type == NICE_RELAY_TYPE_TURN_UDP) { if (turn->type == NICE_RELAY_TYPE_TURN_UDP) {
if (agent->compatibility == NICE_COMPATIBILITY_GOOGLE) { if (agent->compatibility == NICE_COMPATIBILITY_GOOGLE) {
GSList *modified_list;
NiceAddress addr = socket->addr; NiceAddress addr = socket->addr;
NiceSocket *new_socket; NiceSocket *new_socket;
nice_address_set_port (&addr, 0); nice_address_set_port (&addr, 0);
...@@ -786,10 +786,10 @@ priv_add_new_candidate_discovery_turn (NiceAgent *agent, ...@@ -786,10 +786,10 @@ priv_add_new_candidate_discovery_turn (NiceAgent *agent,
if (new_socket) { if (new_socket) {
agent_attach_stream_component_socket (agent, stream, agent_attach_stream_component_socket (agent, stream,
component, new_socket); component, new_socket);
modified_list = g_slist_append (component->sockets, new_socket); socket_modified_list = g_slist_append (component->sockets, new_socket);
if (modified_list) { if (socket_modified_list) {
/* success: store a pointer to the sockaddr */ /* success: store a pointer to the sockaddr */
component->sockets = modified_list; component->sockets = socket_modified_list;
socket = new_socket; socket = new_socket;
} else { } else {
nice_socket_free (new_socket); nice_socket_free (new_socket);
......
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