Commit 7ada79ef authored by Youness Alaoui's avatar Youness Alaoui

Get rid of NiceSocket from the candidate, and make it into an obscure...

Get rid of NiceSocket from the candidate, and make it into an obscure gpointer.. then cast it (only twice) inside the code. This allows us to get rid of all those socket layer .h files from installation which were not needed to be public
parent 21ecb824
...@@ -56,8 +56,6 @@ ...@@ -56,8 +56,6 @@
G_BEGIN_DECLS G_BEGIN_DECLS
#include "socket.h"
#define NICE_CANDIDATE_TYPE_PREF_HOST 120 #define NICE_CANDIDATE_TYPE_PREF_HOST 120
#define NICE_CANDIDATE_TYPE_PREF_PEER_REFLEXIVE 110 #define NICE_CANDIDATE_TYPE_PREF_PEER_REFLEXIVE 110
...@@ -178,7 +176,7 @@ struct _NiceCandidate ...@@ -178,7 +176,7 @@ struct _NiceCandidate
gchar *username; /* pointer to a NULL-terminated username string */ gchar *username; /* pointer to a NULL-terminated username string */
gchar *password; /* pointer to a NULL-terminated password string */ gchar *password; /* pointer to a NULL-terminated password string */
TurnServer *turn; TurnServer *turn;
NiceSocket *sockptr; gpointer sockptr;
}; };
/** /**
......
...@@ -589,7 +589,7 @@ static gboolean priv_conn_keepalive_tick_unlocked (NiceAgent *agent) ...@@ -589,7 +589,7 @@ static gboolean priv_conn_keepalive_tick_unlocked (NiceAgent *agent)
"socket=%u (c-id:%u), username='%s' (%d), " "socket=%u (c-id:%u), username='%s' (%d), "
"password='%s' (%d), priority=%u.", agent, "password='%s' (%d), priority=%u.", agent,
tmpbuf, nice_address_get_port (&p->remote->addr), tmpbuf, nice_address_get_port (&p->remote->addr),
p->local->sockptr->fileno, component->id, ((NiceSocket *)p->local->sockptr)->fileno, component->id,
uname, uname_len, password, password_len, priority); uname, uname_len, password, password_len, priority);
if (uname_len > 0) { if (uname_len > 0) {
...@@ -1644,7 +1644,7 @@ int conn_check_send (NiceAgent *agent, CandidateCheckPair *pair) ...@@ -1644,7 +1644,7 @@ int conn_check_send (NiceAgent *agent, CandidateCheckPair *pair)
nice_debug ("Agent %p : STUN-CC REQ to '%s:%u', socket=%u, pair=%s (c-id:%u), tie=%llu, username='%s' (%d), password='%s' (%d), priority=%u.", agent, nice_debug ("Agent %p : STUN-CC REQ to '%s:%u', socket=%u, pair=%s (c-id:%u), tie=%llu, username='%s' (%d), password='%s' (%d), priority=%u.", agent,
tmpbuf, tmpbuf,
ntohs(nice_address_get_port (&pair->remote->addr)), ntohs(nice_address_get_port (&pair->remote->addr)),
pair->local->sockptr->fileno, ((NiceSocket *)pair->local->sockptr)->fileno,
pair->foundation, pair->component_id, pair->foundation, pair->component_id,
(unsigned long long)agent->tie_breaker, (unsigned long long)agent->tie_breaker,
uname, uname_len, password, password_len, priority); uname, uname_len, password, password_len, priority);
......
...@@ -38,5 +38,3 @@ libsocket_la_SOURCES = \ ...@@ -38,5 +38,3 @@ libsocket_la_SOURCES = \
tcp-turn.c tcp-turn.c
pkginclude_HEADERS = socket.h udp-bsd.h tcp-bsd.h pseudossl.h http.h socks5.h turn.h tcp-turn.h
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
#include <string.h> #include <string.h>
#include <nice/nice.h> #include <nice/nice.h>
#include "socket/socket.h"
static GMainLoop *loop = NULL; static GMainLoop *loop = NULL;
......
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