1 From 4c3f634072d507daff563125440040332b8e1410 Mon Sep 17 00:00:00 2001
2 From: Jakub Adam <jakub.adam@ktknet.cz>
3 Date: Sat, 7 May 2011 19:21:51 +0200
4 Subject: [PATCH] Changed PurpleMediaNetworkProtocol
6 Distinguish between TCP active and passive
8 libpurple/media/enum-types.c | 9 ++++++---
9 libpurple/media/enum-types.h | 5 +++--
10 libpurple/protocols/jabber/google/google_session.c | 2 +-
11 3 files changed, 10 insertions(+), 6 deletions(-)
13 diff --git a/libpurple/media/enum-types.c b/libpurple/media/enum-types.c
14 index 5aa5908..0383e13 100644
15 --- a/libpurple/media/enum-types.c
16 +++ b/libpurple/media/enum-types.c
17 @@ -145,9 +145,12 @@ purple_media_network_protocol_get_type()
18 { PURPLE_MEDIA_NETWORK_PROTOCOL_UDP,
19 "PURPLE_MEDIA_NETWORK_PROTOCOL_UDP",
21 - { PURPLE_MEDIA_NETWORK_PROTOCOL_TCP,
22 - "PURPLE_MEDIA_NETWORK_PROTOCOL_TCP",
24 + { PURPLE_MEDIA_NETWORK_PROTOCOL_TCP_ACTIVE,
25 + "PURPLE_MEDIA_NETWORK_PROTOCOL_TCP_ACTIVE",
27 + { PURPLE_MEDIA_NETWORK_PROTOCOL_TCP_PASSIVE,
28 + "PURPLE_MEDIA_NETWORK_PROTOCOL_TCP_PASSIVE",
32 type = g_enum_register_static("PurpleMediaNetworkProtocol",
33 diff --git a/libpurple/media/enum-types.h b/libpurple/media/enum-types.h
34 index dd163d5..1623d18 100644
35 --- a/libpurple/media/enum-types.h
36 +++ b/libpurple/media/enum-types.h
37 @@ -81,8 +81,9 @@ typedef enum {
39 /** Media network protocols */
41 - PURPLE_MEDIA_NETWORK_PROTOCOL_UDP,
42 - PURPLE_MEDIA_NETWORK_PROTOCOL_TCP,
43 + PURPLE_MEDIA_NETWORK_PROTOCOL_UDP = 1,
44 + PURPLE_MEDIA_NETWORK_PROTOCOL_TCP_ACTIVE = 2,
45 + PURPLE_MEDIA_NETWORK_PROTOCOL_TCP_PASSIVE = 4,
46 } PurpleMediaNetworkProtocol;
48 /** Media session types */
49 diff --git a/libpurple/protocols/jabber/google/google_session.c b/libpurple/protocols/jabber/google/google_session.c
50 index 698df08..3a9a741 100644
51 --- a/libpurple/protocols/jabber/google/google_session.c
52 +++ b/libpurple/protocols/jabber/google/google_session.c
53 @@ -658,7 +658,7 @@ google_session_handle_candidates(JabberStream *js, GoogleSession *session, xmln
55 purple_strequal(protocol, "udp") ?
56 PURPLE_MEDIA_NETWORK_PROTOCOL_UDP :
57 - PURPLE_MEDIA_NETWORK_PROTOCOL_TCP,
58 + PURPLE_MEDIA_NETWORK_PROTOCOL_TCP_ACTIVE,
61 g_object_set(info, "username", xmlnode_get_attrib(cand, "username"),