summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Adam <jakub.adam@ktknet.cz>2011-05-15 16:54:16 (GMT)
committerYouness Alaoui <youness.alaoui@collabora.co.uk>2011-05-20 19:43:11 (GMT)
commit945e71aadf2f96ff9ef454b19e7f257354ccdaeb (patch)
tree41276b145dfd2f87ebf8745e615fbf057d4b76fe
parentd4049611272e26a2e6a35956bdc5430d7a3cdff1 (diff)
downloadlibnice-945e71aadf2f96ff9ef454b19e7f257354ccdaeb.tar.gz
libnice-945e71aadf2f96ff9ef454b19e7f257354ccdaeb.tar.xz
Remove useless conncheck_state
Member variable of struct _Stream is assigned to but never read.
-rw-r--r--agent/conncheck.c10
-rw-r--r--agent/stream.h14
2 files changed, 1 insertions, 23 deletions
diff --git a/agent/conncheck.c b/agent/conncheck.c
index e5be914..7b5a419 100644
--- a/agent/conncheck.c
+++ b/agent/conncheck.c
@@ -430,7 +430,6 @@ static gboolean priv_conn_check_tick_unlocked (gpointer pointer)
Component *component = j->data;
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
@@ -1270,10 +1269,6 @@ static void priv_add_new_check_pair (NiceAgent *agent, guint stream_id, Componen
pair->nominated = use_candidate;
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);
/* implement the hard upper limit for number of
@@ -1363,7 +1358,6 @@ void conn_check_free (NiceAgent *agent)
g_slist_foreach (stream->conncheck_list, conn_check_free_item, NULL);
g_slist_free (stream->conncheck_list),
stream->conncheck_list = NULL;
- stream->conncheck_state = NICE_CHECKLIST_NOT_STARTED;
}
}
@@ -1399,10 +1393,8 @@ gboolean conn_check_prune_stream (NiceAgent *agent, Stream *stream)
break;
}
- if (!stream->conncheck_list) {
- stream->conncheck_state = NICE_CHECKLIST_NOT_STARTED;
+ if (!stream->conncheck_list)
conn_check_free (agent);
- }
/* return FALSE if there was a memory allocation failure */
if (stream->conncheck_list == NULL && i != NULL)
diff --git a/agent/stream.h b/agent/stream.h
index 171ea72..e2f5e39 100644
--- a/agent/stream.h
+++ b/agent/stream.h
@@ -59,19 +59,6 @@ G_BEGIN_DECLS
#define NICE_STREAM_DEF_UFRAG 4 + 1 /* ufrag + 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
{
guint id;
@@ -79,7 +66,6 @@ struct _Stream
gboolean initial_binding_request_received;
GSList *components; /* list of 'Component' structs */
GSList *conncheck_list; /* list of CandidatePair items */
- NiceCheckListState conncheck_state; /* checklist state */
gchar local_ufrag[NICE_STREAM_MAX_UFRAG];
gchar local_password[NICE_STREAM_MAX_PWD];
gchar remote_ufrag[NICE_STREAM_MAX_UFRAG];