[Nice] [PATCH] Remove useless conncheck_state

Youness Alaoui youness.alaoui at collabora.co.uk
Thu May 19 14:54:01 PDT 2011


Hi,

Thanks for the patch, I'm trying to apply it but it doesn't work for some
reason, could you attach the patch as an attachment to the mail instead of
pasting it in the body of the email ?

Thanks,
Youness.

On 05/15/2011 01:25 PM, Jakub Adam wrote:
> From 7313fecccdc77e9c609d7f67fbdf493eb25c7ecc Mon Sep 17 00:00:00 2001
> From: Jakub Adam <jakub.adam at ktknet.cz>
> Date: Sun, 15 May 2011 18:54:16 +0200
> Subject: [PATCH] Remove useless conncheck_state
> 
> Member variable of struct _Stream is assigned to but never read.
> ---
>  agent/conncheck.c |   10 +---------
>  agent/stream.h    |   14 --------------
>  2 files changed, 1 insertions(+), 23 deletions(-)
> 
> diff --git a/agent/conncheck.c b/agent/conncheck.c
> index eea1009..dc15014 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];


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/nice/attachments/20110519/0aa2d19d/attachment.pgp>


More information about the Nice mailing list