aboutsummaryrefslogtreecommitdiff
path: root/src/or/channel.c
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2013-02-11 20:52:12 +0100
committerNick Mathewson <nickm@torproject.org>2013-07-18 14:59:57 -0400
commite765d6ed8404a9df97f39846bf943217cf6a2001 (patch)
tree7a1548b6fee39425367be9aa71c30a13c11f71a1 /src/or/channel.c
parent0ec4e5a698d248448aaf684a74fc51f31c84d313 (diff)
downloadtor-e765d6ed8404a9df97f39846bf943217cf6a2001.tar.gz
tor-e765d6ed8404a9df97f39846bf943217cf6a2001.zip
Make a channel getter method to retrieve transport names.
Diffstat (limited to 'src/or/channel.c')
-rw-r--r--src/or/channel.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/or/channel.c b/src/or/channel.c
index 4b6c7e107d..ea5f9610a0 100644
--- a/src/or/channel.c
+++ b/src/or/channel.c
@@ -2379,9 +2379,14 @@ channel_do_open_actions(channel_t *chan)
/* only report it to the geoip module if it's not a known router */
if (!router_get_by_id_digest(chan->identity_digest)) {
if (channel_get_addr_if_possible(chan, &remote_addr)) {
- /* XXXX 5040/4773 : Is this 'NULL' right? */
- geoip_note_client_seen(GEOIP_CLIENT_CONNECT, &remote_addr, NULL,
+ char *transport_name = NULL;
+ if (chan->get_transport_name(chan, &transport_name) < 0)
+ transport_name = NULL;
+
+ geoip_note_client_seen(GEOIP_CLIENT_CONNECT,
+ &remote_addr, transport_name,
now);
+ tor_free(transport_name);
}
/* Otherwise the underlying transport can't tell us this, so skip it */
}