[Pkg-telepathy-commits] [libnice] 237/265: factor out: component_clean_turn_servers()
Simon McVittie
smcv at debian.org
Wed May 14 12:05:12 UTC 2014
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch debian
in repository libnice.
commit ab7ac2cef39d0a65cbd09567d625e99a41d044d0
Author: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
Date: Tue Apr 15 15:50:39 2014 +0200
factor out: component_clean_turn_servers()
---
agent/component.c | 24 ++++++++++++++++--------
agent/component.h | 3 +++
2 files changed, 19 insertions(+), 8 deletions(-)
diff --git a/agent/component.c b/agent/component.c
index 9c2ab43..fa323e2 100644
--- a/agent/component.c
+++ b/agent/component.c
@@ -146,10 +146,24 @@ component_new (guint id, NiceAgent *agent, Stream *stream)
}
void
+component_clean_turn_servers (Component *cmp)
+{
+ GList *item;
+
+ for (item = cmp->turn_servers; item; item = g_list_next (item)) {
+ TurnServer *turn = item->data;
+ g_free (turn->username);
+ g_free (turn->password);
+ g_slice_free (TurnServer, turn);
+ }
+ g_list_free (cmp->turn_servers);
+ cmp->turn_servers = NULL;
+}
+
+void
component_free (Component *cmp)
{
GSList *i;
- GList *item;
IOCallbackData *data;
GOutputVector *vec;
@@ -178,13 +192,7 @@ component_free (Component *cmp)
component_free_socket_sources (cmp);
g_slist_free (cmp->incoming_checks);
- for (item = cmp->turn_servers; item; item = g_list_next (item)) {
- TurnServer *turn = item->data;
- g_free (turn->username);
- g_free (turn->password);
- g_slice_free (TurnServer, turn);
- }
- g_list_free (cmp->turn_servers);
+ component_clean_turn_servers (cmp);
if (cmp->selected_pair.keepalive.tick_source != NULL) {
g_source_destroy (cmp->selected_pair.keepalive.tick_source);
diff --git a/agent/component.h b/agent/component.h
index 6f464ed..af9b0b5 100644
--- a/agent/component.h
+++ b/agent/component.h
@@ -257,6 +257,9 @@ component_emit_io_callback (Component *component,
gboolean
component_has_io_callback (Component *component);
+void
+component_clean_turn_servers (Component *component);
+
G_END_DECLS
#endif /* _NICE_COMPONENT_H */
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-telepathy/libnice.git
More information about the Pkg-telepathy-commits
mailing list