diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-09-06 12:05:24 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-09-06 12:05:24 +0000 |
commit | 8675d5f1a8906b4255562f878e140acc0ee8fafc (patch) | |
tree | 40f140e61d6b2a5212d2aa94b7379ec0d9f03494 /src/namestore/gnunet-namestore-fcfsd.c | |
parent | 3a56bf7aa7e6de7d096cb509054b5dab1e50d119 (diff) | |
download | gnunet-8675d5f1a8906b4255562f878e140acc0ee8fafc.tar.gz gnunet-8675d5f1a8906b4255562f878e140acc0ee8fafc.zip |
-misc fixes
Diffstat (limited to 'src/namestore/gnunet-namestore-fcfsd.c')
-rw-r--r-- | src/namestore/gnunet-namestore-fcfsd.c | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/src/namestore/gnunet-namestore-fcfsd.c b/src/namestore/gnunet-namestore-fcfsd.c index c0b9f4da6..041b046ba 100644 --- a/src/namestore/gnunet-namestore-fcfsd.c +++ b/src/namestore/gnunet-namestore-fcfsd.c | |||
@@ -23,6 +23,8 @@ | |||
23 | * @author Christian Grothoff | 23 | * @author Christian Grothoff |
24 | * | 24 | * |
25 | * TODO: | 25 | * TODO: |
26 | * - need to track active zone info requests so we can cancel them | ||
27 | * during shutdown, right? | ||
26 | * - the code currently contains a 'race' between checking that the | 28 | * - the code currently contains a 'race' between checking that the |
27 | * domain name is available and allocating it to the new public key | 29 | * domain name is available and allocating it to the new public key |
28 | * (should this race be solved by namestore or by fcfsd?) | 30 | * (should this race be solved by namestore or by fcfsd?) |
@@ -921,6 +923,8 @@ identity_cb (void *cls, | |||
921 | void **ctx, | 923 | void **ctx, |
922 | const char *name) | 924 | const char *name) |
923 | { | 925 | { |
926 | int options; | ||
927 | |||
924 | id_op = NULL; | 928 | id_op = NULL; |
925 | if (NULL == ego) | 929 | if (NULL == ego) |
926 | { | 930 | { |
@@ -930,21 +934,24 @@ identity_cb (void *cls, | |||
930 | } | 934 | } |
931 | fcfs_zone_pkey = *GNUNET_IDENTITY_ego_get_private_key (ego); | 935 | fcfs_zone_pkey = *GNUNET_IDENTITY_ego_get_private_key (ego); |
932 | 936 | ||
933 | 937 | options = MHD_USE_DUAL_STACK | MHD_USE_DEBUG; | |
934 | httpd = MHD_start_daemon ( | 938 | do |
935 | #ifdef MHD_USE_DUAL_STACK | 939 | { |
936 | MHD_USE_DUAL_STACK | | 940 | httpd = MHD_start_daemon (options, |
937 | #endif | 941 | (uint16_t) port, |
938 | MHD_USE_DEBUG, | 942 | NULL, NULL, |
939 | (uint16_t) port, | 943 | &create_response, NULL, |
940 | NULL, NULL, | 944 | MHD_OPTION_CONNECTION_LIMIT, (unsigned int) 128, |
941 | &create_response, NULL, | 945 | MHD_OPTION_PER_IP_CONNECTION_LIMIT, (unsigned int) 1, |
942 | MHD_OPTION_CONNECTION_LIMIT, (unsigned int) 128, | 946 | MHD_OPTION_CONNECTION_TIMEOUT, (unsigned int) 16, |
943 | MHD_OPTION_PER_IP_CONNECTION_LIMIT, (unsigned int) 1, | 947 | MHD_OPTION_CONNECTION_MEMORY_LIMIT, (size_t) (4 * 1024), |
944 | MHD_OPTION_CONNECTION_TIMEOUT, (unsigned int) 16, | 948 | MHD_OPTION_NOTIFY_COMPLETED, &request_completed_callback, NULL, |
945 | MHD_OPTION_CONNECTION_MEMORY_LIMIT, (size_t) (4 * 1024), | 949 | MHD_OPTION_END); |
946 | MHD_OPTION_NOTIFY_COMPLETED, &request_completed_callback, NULL, | 950 | if (MHD_USE_DEBUG == options) |
947 | MHD_OPTION_END); | 951 | break; |
952 | options = MHD_USE_DEBUG; | ||
953 | } | ||
954 | while (NULL == httpd); | ||
948 | if (NULL == httpd) | 955 | if (NULL == httpd) |
949 | { | 956 | { |
950 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 957 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |