Commit b5562b3c authored by Youness Alaoui's avatar Youness Alaoui

remove useless agent in socks5 proxy, fix copyright and return FALSE in send, if we're in an error

parent 6efd9ab5
......@@ -920,7 +920,7 @@ priv_add_new_candidate_discovery_turn (NiceAgent *agent,
if (socket &&
agent->proxy_type == NICE_PROXY_TYPE_SOCKS5) {
socket = nice_socks5_socket_new (agent, socket, &turn->server,
socket = nice_socks5_socket_new (socket, &turn->server,
agent->proxy_username, agent->proxy_password);
} else {
/* TODO add HTTP support */
......
/*
* This file is part of the Nice GLib ICE library.
*
* (C) 2006-2008 Collabora Ltd.
* Contact: Dafydd Harries
* Contact: Olivier Crete
* (C) 2006, 2007 Nokia Corporation. All rights reserved.
* Contact: Kai Vehmanen
* (C) 2008 Collabora Ltd.
* Contact: Youness Alaoui
* (C) 2008 Nokia Corporation. All rights reserved.
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
......@@ -23,10 +21,7 @@
* Corporation. All Rights Reserved.
*
* Contributors:
* Dafydd Harries, Collabora Ltd.
* Olivier Crete, Collabora Ltd.
* Rémi Denis-Courmont, Nokia
* Kai Vehmanen
* Youness Alaoui, Collabora Ltd.
*
* Alternatively, the contents of this file may be used under the terms of the
* the GNU Lesser General Public License Version 2.1 (the "LGPL"), in which
......@@ -93,7 +88,7 @@ static void free_to_be_sent (struct to_be_sent *tbs);
NiceSocket *
nice_socks5_socket_new (NiceAgent *agent, NiceSocket *base_socket,
nice_socks5_socket_new (NiceSocket *base_socket,
NiceAddress *addr, gchar *username, gchar *password)
{
Socks5Priv *priv;
......@@ -385,6 +380,8 @@ socket_send (NiceSocket *sock, const NiceAddress *to,
return nice_socket_send (priv->base_socket, to, len, buf);
else
return FALSE;
} else if (priv->state == SOCKS_STATE_ERROR) {
return FALSE;
} else {
add_to_be_sent (sock, to, buf, len);
}
......
/*
* This file is part of the Nice GLib ICE library.
*
* (C) 2006, 2007 Collabora Ltd.
* Contact: Dafydd Harries
* (C) 2006, 2007 Nokia Corporation. All rights reserved.
* Contact: Kai Vehmanen
* (C) 2008 Collabora Ltd.
* Contact: Youness Alaoui
* (C) 2008 Nokia Corporation. All rights reserved.
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
......@@ -22,7 +21,7 @@
* Corporation. All Rights Reserved.
*
* Contributors:
* Dafydd Harries, Collabora Ltd.
* Youness Alaoui, Collabora Ltd.
*
* Alternatively, the contents of this file may be used under the terms of the
* the GNU Lesser General Public License Version 2.1 (the "LGPL"), in which
......@@ -45,7 +44,7 @@ G_BEGIN_DECLS
NiceSocket *
nice_socks5_socket_new (NiceAgent *agent, NiceSocket *base_socket,
nice_socks5_socket_new (NiceSocket *base_socket,
NiceAddress *addr, gchar *username, gchar *password);
......
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