Commit 945e71aa authored by Jakub Adam's avatar Jakub Adam Committed by Youness Alaoui

Remove useless conncheck_state

Member variable of struct _Stream is assigned to but never read.
parent d4049611
...@@ -430,7 +430,6 @@ static gboolean priv_conn_check_tick_unlocked (gpointer pointer) ...@@ -430,7 +430,6 @@ static gboolean priv_conn_check_tick_unlocked (gpointer pointer)
Component *component = j->data; Component *component = j->data;
priv_update_check_list_state_for_ready (agent, stream, component); priv_update_check_list_state_for_ready (agent, stream, component);
} }
stream->conncheck_state = NICE_CHECKLIST_COMPLETED;
} }
/* Stopping the timer so destroy the source.. this will allow /* Stopping the timer so destroy the source.. this will allow
...@@ -1270,10 +1269,6 @@ static void priv_add_new_check_pair (NiceAgent *agent, guint stream_id, Componen ...@@ -1270,10 +1269,6 @@ static void priv_add_new_check_pair (NiceAgent *agent, guint stream_id, Componen
pair->nominated = use_candidate; pair->nominated = use_candidate;
pair->controlling = agent->controlling_mode; pair->controlling = agent->controlling_mode;
/* note: for the first added check */
if (!stream->conncheck_list)
stream->conncheck_state = NICE_CHECKLIST_RUNNING;
nice_debug ("Agent %p : added a new conncheck %p with foundation of '%s' to list %u.", agent, pair, pair->foundation, stream_id); nice_debug ("Agent %p : added a new conncheck %p with foundation of '%s' to list %u.", agent, pair, pair->foundation, stream_id);
/* implement the hard upper limit for number of /* implement the hard upper limit for number of
...@@ -1363,7 +1358,6 @@ void conn_check_free (NiceAgent *agent) ...@@ -1363,7 +1358,6 @@ void conn_check_free (NiceAgent *agent)
g_slist_foreach (stream->conncheck_list, conn_check_free_item, NULL); g_slist_foreach (stream->conncheck_list, conn_check_free_item, NULL);
g_slist_free (stream->conncheck_list), g_slist_free (stream->conncheck_list),
stream->conncheck_list = NULL; stream->conncheck_list = NULL;
stream->conncheck_state = NICE_CHECKLIST_NOT_STARTED;
} }
} }
...@@ -1399,10 +1393,8 @@ gboolean conn_check_prune_stream (NiceAgent *agent, Stream *stream) ...@@ -1399,10 +1393,8 @@ gboolean conn_check_prune_stream (NiceAgent *agent, Stream *stream)
break; break;
} }
if (!stream->conncheck_list) { if (!stream->conncheck_list)
stream->conncheck_state = NICE_CHECKLIST_NOT_STARTED;
conn_check_free (agent); conn_check_free (agent);
}
/* return FALSE if there was a memory allocation failure */ /* return FALSE if there was a memory allocation failure */
if (stream->conncheck_list == NULL && i != NULL) if (stream->conncheck_list == NULL && i != NULL)
......
...@@ -59,19 +59,6 @@ G_BEGIN_DECLS ...@@ -59,19 +59,6 @@ G_BEGIN_DECLS
#define NICE_STREAM_DEF_UFRAG 4 + 1 /* ufrag + NULL */ #define NICE_STREAM_DEF_UFRAG 4 + 1 /* ufrag + NULL */
#define NICE_STREAM_DEF_PWD 22 + 1 /* pwd + NULL */ #define NICE_STREAM_DEF_PWD 22 + 1 /* pwd + NULL */
/*
* Checklist states. These match the definition given in
* the ICE spec sect 5.7.4. "Computing States" (ID-19).
*/
typedef enum
{
NICE_CHECKLIST_NOT_STARTED = 1,
NICE_CHECKLIST_RUNNING,
NICE_CHECKLIST_COMPLETED,
NICE_CHECKLIST_FAILED
} NiceCheckListState;
struct _Stream struct _Stream
{ {
guint id; guint id;
...@@ -79,7 +66,6 @@ struct _Stream ...@@ -79,7 +66,6 @@ struct _Stream
gboolean initial_binding_request_received; gboolean initial_binding_request_received;
GSList *components; /* list of 'Component' structs */ GSList *components; /* list of 'Component' structs */
GSList *conncheck_list; /* list of CandidatePair items */ GSList *conncheck_list; /* list of CandidatePair items */
NiceCheckListState conncheck_state; /* checklist state */
gchar local_ufrag[NICE_STREAM_MAX_UFRAG]; gchar local_ufrag[NICE_STREAM_MAX_UFRAG];
gchar local_password[NICE_STREAM_MAX_PWD]; gchar local_password[NICE_STREAM_MAX_PWD];
gchar remote_ufrag[NICE_STREAM_MAX_UFRAG]; gchar remote_ufrag[NICE_STREAM_MAX_UFRAG];
......
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