aboutsummaryrefslogtreecommitdiff
path: root/src/util/server.c
diff options
context:
space:
mode:
authorNathan S. Evans <evans@in.tum.de>2010-07-02 13:00:36 +0000
committerNathan S. Evans <evans@in.tum.de>2010-07-02 13:00:36 +0000
commit4a789496f1b7a453c247b99994839e759155e7b9 (patch)
treefde32cd4adcc5e95d60a196ab692e8a578d26fb6 /src/util/server.c
parent1d938adb4c5c015d6bdef0047177641c808746b7 (diff)
downloadgnunet-4a789496f1b7a453c247b99994839e759155e7b9.tar.gz
gnunet-4a789496f1b7a453c247b99994839e759155e7b9.zip
remove max buffer size from everywhere in util
Diffstat (limited to 'src/util/server.c')
-rw-r--r--src/util/server.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/src/util/server.c b/src/util/server.c
index 606d44369..3011f4927 100644
--- a/src/util/server.c
+++ b/src/util/server.c
@@ -122,11 +122,6 @@ struct GNUNET_SERVER_Handle
122 struct GNUNET_TIME_Relative idle_timeout; 122 struct GNUNET_TIME_Relative idle_timeout;
123 123
124 /** 124 /**
125 * maximum write buffer size for accepted sockets
126 */
127 size_t maxbuf;
128
129 /**
130 * Task scheduled to do the listening. 125 * Task scheduled to do the listening.
131 */ 126 */
132 GNUNET_SCHEDULER_TaskIdentifier listen_task; 127 GNUNET_SCHEDULER_TaskIdentifier listen_task;
@@ -273,8 +268,7 @@ process_listen_socket (void *cls,
273 sock = 268 sock =
274 GNUNET_CONNECTION_create_from_accept (tc->sched, server->access, 269 GNUNET_CONNECTION_create_from_accept (tc->sched, server->access,
275 server->access_cls, 270 server->access_cls,
276 server->listen_sockets[i], 271 server->listen_sockets[i]);
277 server->maxbuf);
278 if (sock != NULL) 272 if (sock != NULL)
279 { 273 {
280#if DEBUG_SERVER 274#if DEBUG_SERVER
@@ -396,7 +390,6 @@ open_listen_socket (const struct sockaddr *serverAddr, socklen_t socklen)
396 * @param access function for access control 390 * @param access function for access control
397 * @param access_cls closure for access 391 * @param access_cls closure for access
398 * @param lsocks NULL-terminated array of listen sockets 392 * @param lsocks NULL-terminated array of listen sockets
399 * @param maxbuf maximum write buffer size for accepted sockets
400 * @param idle_timeout after how long should we timeout idle connections? 393 * @param idle_timeout after how long should we timeout idle connections?
401 * @param require_found if YES, connections sending messages of unknown type 394 * @param require_found if YES, connections sending messages of unknown type
402 * will be closed 395 * will be closed
@@ -407,7 +400,6 @@ struct GNUNET_SERVER_Handle *
407GNUNET_SERVER_create_with_sockets (struct GNUNET_SCHEDULER_Handle *sched, 400GNUNET_SERVER_create_with_sockets (struct GNUNET_SCHEDULER_Handle *sched,
408 GNUNET_CONNECTION_AccessCheck access, void *access_cls, 401 GNUNET_CONNECTION_AccessCheck access, void *access_cls,
409 struct GNUNET_NETWORK_Handle **lsocks, 402 struct GNUNET_NETWORK_Handle **lsocks,
410 size_t maxbuf,
411 struct GNUNET_TIME_Relative 403 struct GNUNET_TIME_Relative
412 idle_timeout, 404 idle_timeout,
413 int require_found) 405 int require_found)
@@ -418,7 +410,6 @@ GNUNET_SERVER_create_with_sockets (struct GNUNET_SCHEDULER_Handle *sched,
418 410
419 ret = GNUNET_malloc (sizeof (struct GNUNET_SERVER_Handle)); 411 ret = GNUNET_malloc (sizeof (struct GNUNET_SERVER_Handle));
420 ret->sched = sched; 412 ret->sched = sched;
421 ret->maxbuf = maxbuf;
422 ret->idle_timeout = idle_timeout; 413 ret->idle_timeout = idle_timeout;
423 ret->listen_sockets = lsocks; 414 ret->listen_sockets = lsocks;
424 ret->access = access; 415 ret->access = access;
@@ -451,7 +442,6 @@ GNUNET_SERVER_create_with_sockets (struct GNUNET_SCHEDULER_Handle *sched,
451 * @param access_cls closure for access 442 * @param access_cls closure for access
452 * @param serverAddr address to listen on (including port), NULL terminated array 443 * @param serverAddr address to listen on (including port), NULL terminated array
453 * @param socklen length of serverAddr 444 * @param socklen length of serverAddr
454 * @param maxbuf maximum write buffer size for accepted sockets
455 * @param idle_timeout after how long should we timeout idle connections? 445 * @param idle_timeout after how long should we timeout idle connections?
456 * @param require_found if YES, connections sending messages of unknown type 446 * @param require_found if YES, connections sending messages of unknown type
457 * will be closed 447 * will be closed
@@ -464,7 +454,6 @@ GNUNET_SERVER_create (struct GNUNET_SCHEDULER_Handle *sched,
464 void *access_cls, 454 void *access_cls,
465 struct sockaddr *const *serverAddr, 455 struct sockaddr *const *serverAddr,
466 const socklen_t * socklen, 456 const socklen_t * socklen,
467 size_t maxbuf,
468 struct GNUNET_TIME_Relative 457 struct GNUNET_TIME_Relative
469 idle_timeout, int require_found) 458 idle_timeout, int require_found)
470{ 459{
@@ -503,7 +492,6 @@ GNUNET_SERVER_create (struct GNUNET_SCHEDULER_Handle *sched,
503 return GNUNET_SERVER_create_with_sockets (sched, 492 return GNUNET_SERVER_create_with_sockets (sched,
504 access, access_cls, 493 access, access_cls,
505 lsocks, 494 lsocks,
506 maxbuf,
507 idle_timeout, 495 idle_timeout,
508 require_found); 496 require_found);
509} 497}
@@ -877,8 +865,7 @@ GNUNET_SERVER_connect_socket (struct
877 865
878 client = GNUNET_malloc (sizeof (struct GNUNET_SERVER_Client)); 866 client = GNUNET_malloc (sizeof (struct GNUNET_SERVER_Client));
879 client->connection = connection; 867 client->connection = connection;
880 client->mst = GNUNET_SERVER_mst_create (GNUNET_SERVER_MAX_MESSAGE_SIZE - 1, 868 client->mst = GNUNET_SERVER_mst_create (&client_message_tokenizer_callback,
881 &client_message_tokenizer_callback,
882 server); 869 server);
883 client->reference_count = 1; 870 client->reference_count = 1;
884 client->server = server; 871 client->server = server;