[Pkg-telepathy-commits] [libnice] 241/265: discovery: Remove duplicated element between CandidateRefresh and NiceCandidate
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 59a23cfee39624cf5f7d6289294f545191c1c4c4
Author: Olivier Crête <olivier.crete at collabora.com>
Date: Tue Apr 22 16:13:52 2014 -0400
discovery: Remove duplicated element between CandidateRefresh and NiceCandidate
---
agent/conncheck.c | 15 +++++++--------
agent/discovery.c | 8 ++++----
agent/discovery.h | 2 --
3 files changed, 11 insertions(+), 14 deletions(-)
diff --git a/agent/conncheck.c b/agent/conncheck.c
index 8d84a53..90d5bd0 100644
--- a/agent/conncheck.c
+++ b/agent/conncheck.c
@@ -798,10 +798,10 @@ static void priv_turn_allocate_refresh_tick_unlocked (CandidateRefresh *cand)
StunUsageTurnCompatibility turn_compat =
agent_to_turn_compatibility (cand->agent);
- username = (uint8_t *)cand->turn->username;
- username_len = (size_t) strlen (cand->turn->username);
- password = (uint8_t *)cand->turn->password;
- password_len = (size_t) strlen (cand->turn->password);
+ username = (uint8_t *)cand->candidate->turn->username;
+ username_len = (size_t) strlen (cand->candidate->turn->username);
+ password = (uint8_t *)cand->candidate->turn->password;
+ password_len = (size_t) strlen (cand->candidate->turn->password);
if (turn_compat == STUN_USAGE_TURN_COMPATIBILITY_MSN ||
turn_compat == STUN_USAGE_TURN_COMPATIBILITY_OC2007) {
@@ -2333,9 +2333,7 @@ priv_add_new_turn_refresh (CandidateDiscovery *cdisco, NiceCandidate *relay_cand
cand->candidate = relay_cand;
cand->nicesock = cdisco->nicesock;
- cand->relay_socket = relay_cand->sockptr;
cand->server = cdisco->server;
- cand->turn = cdisco->turn;
cand->stream = cdisco->stream;
cand->component = cdisco->component;
cand->agent = cdisco->agent;
@@ -2803,9 +2801,10 @@ gboolean conn_check_handle_inbound_stun (NiceAgent *agent, Stream *stream,
for (i = agent->refresh_list; i; i = i->next) {
CandidateRefresh *r = i->data;
nice_debug ("Comparing %p to %p, %p to %p and %p and %p to %p", r->stream,
- stream, r->component, component, r->nicesock, r->relay_socket, nicesock);
+ stream, r->component, component, r->nicesock, r->candidate->sockptr,
+ nicesock);
if (r->stream == stream && r->component == component &&
- (r->nicesock == nicesock || r->relay_socket == nicesock)) {
+ (r->nicesock == nicesock || r->candidate->sockptr == nicesock)) {
valid = stun_agent_validate (&r->stun_agent, &req,
(uint8_t *) buf, len, conncheck_stun_validater, &validater_data);
nice_debug ("Validating gave %d", valid);
diff --git a/agent/discovery.c b/agent/discovery.c
index 2d9c975..516e2cc 100644
--- a/agent/discovery.c
+++ b/agent/discovery.c
@@ -155,10 +155,10 @@ void refresh_free_item (gpointer data, gpointer user_data)
cand->tick_source = NULL;
}
- username = (uint8_t *)cand->turn->username;
- username_len = (size_t) strlen (cand->turn->username);
- password = (uint8_t *)cand->turn->password;
- password_len = (size_t) strlen (cand->turn->password);
+ username = (uint8_t *)cand->candidate->turn->username;
+ username_len = (size_t) strlen (cand->candidate->turn->username);
+ password = (uint8_t *)cand->candidate->turn->password;
+ password_len = (size_t) strlen (cand->candidate->turn->password);
if (turn_compat == STUN_USAGE_TURN_COMPATIBILITY_MSN ||
turn_compat == STUN_USAGE_TURN_COMPATIBILITY_OC2007) {
diff --git a/agent/discovery.h b/agent/discovery.h
index 5f228ff..b72e941 100644
--- a/agent/discovery.h
+++ b/agent/discovery.h
@@ -70,12 +70,10 @@ typedef struct
{
NiceAgent *agent; /**< back pointer to owner */
NiceSocket *nicesock; /**< existing socket to use */
- NiceSocket *relay_socket; /**< relay socket from which we receive */
NiceAddress server; /**< STUN/TURN server address */
NiceCandidate *candidate; /**< candidate to refresh */
Stream *stream;
Component *component;
- TurnServer *turn;
StunAgent stun_agent;
GSource *timer_source;
GSource *tick_source;
--
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