aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2011-08-30 09:24:45 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2011-08-30 09:24:45 +0000
commit76e9a6b5cfd602b6c3eeadec11dd3811fddcfb90 (patch)
tree68b00f6dc04932ddc1426cc48c2c969aab2759be /src/util
parentd89572e31baedfab391428de67a376abc14ff849 (diff)
downloadgnunet-76e9a6b5cfd602b6c3eeadec11dd3811fddcfb90.tar.gz
gnunet-76e9a6b5cfd602b6c3eeadec11dd3811fddcfb90.zip
removing unique id code
Diffstat (limited to 'src/util')
-rw-r--r--src/util/server.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/src/util/server.c b/src/util/server.c
index ce5d16e1e..c8eb15f1c 100644
--- a/src/util/server.c
+++ b/src/util/server.c
@@ -247,11 +247,6 @@ struct GNUNET_SERVER_Client
247 * Type of last message processed (for warn_no_receive_done). 247 * Type of last message processed (for warn_no_receive_done).
248 */ 248 */
249 uint16_t warn_type; 249 uint16_t warn_type;
250
251 /**
252 * unique identifier to distinguish between clients
253 */
254 uint64_t id;
255}; 250};
256 251
257 252
@@ -938,18 +933,6 @@ client_message_tokenizer_callback (void *cls, void *client,
938 933
939 934
940/** 935/**
941 * Get a unique identifier for each GNUNET_SERVER_Client
942 */
943static uint64_t
944get_client_id (void)
945{
946 static uint64_t id;
947
948 GNUNET_assert (id < ULONG_LONG_MAX);
949 return (id++);
950}
951
952/**
953 * Add a TCP socket-based connection to the set of handles managed by 936 * Add a TCP socket-based connection to the set of handles managed by
954 * this server. Use this function for outgoing (P2P) connections that 937 * this server. Use this function for outgoing (P2P) connections that
955 * we initiated (and where this server should process incoming 938 * we initiated (and where this server should process incoming
@@ -980,7 +963,6 @@ GNUNET_SERVER_connect_socket (struct GNUNET_SERVER_Handle *server,
980 client->receive_pending = GNUNET_YES; 963 client->receive_pending = GNUNET_YES;
981 client->callback = NULL; 964 client->callback = NULL;
982 client->callback_cls = NULL; 965 client->callback_cls = NULL;
983 client->id = get_client_id ();
984 GNUNET_CONNECTION_receive (client->connection, 966 GNUNET_CONNECTION_receive (client->connection,
985 GNUNET_SERVER_MAX_MESSAGE_SIZE - 1, 967 GNUNET_SERVER_MAX_MESSAGE_SIZE - 1,
986 client->idle_timeout, &process_incoming, client); 968 client->idle_timeout, &process_incoming, client);
@@ -1293,18 +1275,6 @@ GNUNET_SERVER_client_persist_ (struct GNUNET_SERVER_Client *client)
1293 1275
1294 1276
1295/** 1277/**
1296 * Retrieve the unique id from the opaque defined GNUNET_SERVER_Client
1297 *
1298 * @param client the client
1299 * @return the unique id
1300 */
1301uint64_t
1302GNUNET_SERVER_client_get_id (struct GNUNET_SERVER_Client *client)
1303{
1304 return client->id;
1305}
1306
1307/**
1308 * Resume receiving from this client, we are done processing the 1278 * Resume receiving from this client, we are done processing the
1309 * current request. This function must be called from within each 1279 * current request. This function must be called from within each
1310 * GNUNET_SERVER_MessageCallback (or its respective continuations). 1280 * GNUNET_SERVER_MessageCallback (or its respective continuations).