diff options
-rw-r--r-- | src/ats/perf_ats_mlp.c | 2 | ||||
-rw-r--r-- | src/chat/gnunet-chat.c | 10 | ||||
-rw-r--r-- | src/fragmentation/defragmentation.c | 2 | ||||
-rw-r--r-- | src/gns/gnunet-gns-fcfsd.c | 2 | ||||
-rw-r--r-- | src/gns/gnunet-service-gns.c | 11 | ||||
-rw-r--r-- | src/namestore/namestore_api.c | 3 | ||||
-rw-r--r-- | src/transport/plugin_transport_tcp.c | 40 |
7 files changed, 40 insertions, 30 deletions
diff --git a/src/ats/perf_ats_mlp.c b/src/ats/perf_ats_mlp.c index a06f16c3e..bace9809f 100644 --- a/src/ats/perf_ats_mlp.c +++ b/src/ats/perf_ats_mlp.c | |||
@@ -231,7 +231,7 @@ check (void *cls, char *const *args, const char *cfgfile, | |||
231 | if ((update_percentage >= 0) && (update_percentage <= 100)) | 231 | if ((update_percentage >= 0) && (update_percentage <= 100)) |
232 | { | 232 | { |
233 | update = GNUNET_YES; | 233 | update = GNUNET_YES; |
234 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Benchmarking with existing presolution and %u \% updated addresses\n", update_percentage); | 234 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Benchmarking with existing presolution and %u%% updated addresses\n", update_percentage); |
235 | } | 235 | } |
236 | else if ((update_percentage > 100) && (update_percentage != UINT_MAX)) | 236 | else if ((update_percentage > 100) && (update_percentage != UINT_MAX)) |
237 | { | 237 | { |
diff --git a/src/chat/gnunet-chat.c b/src/chat/gnunet-chat.c index fb958d98a..7b11c0d18 100644 --- a/src/chat/gnunet-chat.c +++ b/src/chat/gnunet-chat.c | |||
@@ -44,13 +44,14 @@ static struct GNUNET_CONTAINER_MetaData *meta; | |||
44 | 44 | ||
45 | static struct GNUNET_CHAT_Room *room; | 45 | static struct GNUNET_CHAT_Room *room; |
46 | 46 | ||
47 | static GNUNET_SCHEDULER_TaskIdentifier handle_cmd_task = | 47 | static GNUNET_SCHEDULER_TaskIdentifier handle_cmd_task; |
48 | GNUNET_SCHEDULER_NO_TASK; | 48 | |
49 | typedef int (*ActionFunction)(const char *argumetns, const void *xtra); | ||
49 | 50 | ||
50 | struct ChatCommand | 51 | struct ChatCommand |
51 | { | 52 | { |
52 | const char *command; | 53 | const char *command; |
53 | int (*Action) (const char *arguments, const void *xtra); | 54 | ActionFunction Action; |
54 | const char *helptext; | 55 | const char *helptext; |
55 | }; | 56 | }; |
56 | 57 | ||
@@ -234,7 +235,8 @@ member_list_cb (void *cls, const struct GNUNET_CONTAINER_MetaData *member_info, | |||
234 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *member_id, | 235 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *member_id, |
235 | enum GNUNET_CHAT_MsgOptions options) | 236 | enum GNUNET_CHAT_MsgOptions options) |
236 | { | 237 | { |
237 | char *nick, *non_unique_nick; | 238 | char *nick; |
239 | char *non_unique_nick; | ||
238 | int nick_is_a_dup; | 240 | int nick_is_a_dup; |
239 | GNUNET_HashCode id; | 241 | GNUNET_HashCode id; |
240 | struct UserList *pos; | 242 | struct UserList *pos; |
diff --git a/src/fragmentation/defragmentation.c b/src/fragmentation/defragmentation.c index b07f20407..061277c41 100644 --- a/src/fragmentation/defragmentation.c +++ b/src/fragmentation/defragmentation.c | |||
@@ -362,7 +362,7 @@ estimate_latency (struct MessageContext *mc) | |||
362 | if (ret.rel_value == 0) | 362 | if (ret.rel_value == 0) |
363 | ret = GNUNET_TIME_UNIT_MILLISECONDS; /* always at least 1 */ | 363 | ret = GNUNET_TIME_UNIT_MILLISECONDS; /* always at least 1 */ |
364 | return ret; | 364 | return ret; |
365 | }; | 365 | } |
366 | 366 | ||
367 | 367 | ||
368 | /** | 368 | /** |
diff --git a/src/gns/gnunet-gns-fcfsd.c b/src/gns/gnunet-gns-fcfsd.c index 7e099df62..accdf1e0d 100644 --- a/src/gns/gnunet-gns-fcfsd.c +++ b/src/gns/gnunet-gns-fcfsd.c | |||
@@ -621,7 +621,7 @@ run_httpd () | |||
621 | struct GNUNET_NETWORK_FDSet *wes; | 621 | struct GNUNET_NETWORK_FDSet *wes; |
622 | int max; | 622 | int max; |
623 | int haveto; | 623 | int haveto; |
624 | unsigned MHD_LONG_LONG timeout; | 624 | MHD_LONG_LONG timeout; |
625 | struct GNUNET_TIME_Relative tv; | 625 | struct GNUNET_TIME_Relative tv; |
626 | 626 | ||
627 | FD_ZERO (&rs); | 627 | FD_ZERO (&rs); |
diff --git a/src/gns/gnunet-service-gns.c b/src/gns/gnunet-service-gns.c index 9caa52c26..26a496d4a 100644 --- a/src/gns/gnunet-service-gns.c +++ b/src/gns/gnunet-service-gns.c | |||
@@ -146,14 +146,14 @@ struct GNUNET_CRYPTO_ShortHashCode zone_hash; | |||
146 | /** | 146 | /** |
147 | * Useful for zone update for DHT put | 147 | * Useful for zone update for DHT put |
148 | */ | 148 | */ |
149 | static int num_public_records = 0; | 149 | static int num_public_records; |
150 | 150 | ||
151 | /** | 151 | /** |
152 | * update interval in seconds | 152 | * update interval in seconds |
153 | */ | 153 | */ |
154 | static unsigned long long int max_record_put_interval; | 154 | static unsigned long long max_record_put_interval; |
155 | 155 | ||
156 | static unsigned long long int dht_max_update_interval; | 156 | static unsigned long long dht_max_update_interval; |
157 | 157 | ||
158 | /* dht update interval FIXME define? */ | 158 | /* dht update interval FIXME define? */ |
159 | static struct GNUNET_TIME_Relative record_put_interval; | 159 | static struct GNUNET_TIME_Relative record_put_interval; |
@@ -383,10 +383,9 @@ put_gns_record(void *cls, | |||
383 | static void | 383 | static void |
384 | update_zone_dht_start(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 384 | update_zone_dht_start(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
385 | { | 385 | { |
386 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Scheduling DHT zone update!\n"); | 386 | unsigned long long interval = 0; |
387 | |||
388 | unsigned long long int interval = 0; | ||
389 | 387 | ||
388 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Scheduling DHT zone update!\n"); | ||
390 | if (0 == num_public_records) | 389 | if (0 == num_public_records) |
391 | { | 390 | { |
392 | /** | 391 | /** |
diff --git a/src/namestore/namestore_api.c b/src/namestore/namestore_api.c index 8c55e13a4..eadbeb55f 100644 --- a/src/namestore/namestore_api.c +++ b/src/namestore/namestore_api.c | |||
@@ -935,7 +935,8 @@ clean_up_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
935 | } | 935 | } |
936 | GNUNET_free(h); | 936 | GNUNET_free(h); |
937 | h = NULL; | 937 | h = NULL; |
938 | }; | 938 | } |
939 | |||
939 | 940 | ||
940 | /** | 941 | /** |
941 | * Disconnect from the namestore service (and free associated | 942 | * Disconnect from the namestore service (and free associated |
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c index 9c3fedc75..1a4ab765a 100644 --- a/src/transport/plugin_transport_tcp.c +++ b/src/transport/plugin_transport_tcp.c | |||
@@ -457,6 +457,8 @@ plugin_tcp_access_check (void *cls, | |||
457 | { | 457 | { |
458 | struct Plugin *plugin = cls; | 458 | struct Plugin *plugin = cls; |
459 | 459 | ||
460 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
461 | "Accepting new incoming TCP connection\n"); | ||
460 | if (0 == plugin->max_connections) | 462 | if (0 == plugin->max_connections) |
461 | return GNUNET_NO; | 463 | return GNUNET_NO; |
462 | plugin->max_connections--; | 464 | plugin->max_connections--; |
@@ -712,6 +714,9 @@ create_session (struct Plugin *plugin, const struct GNUNET_PeerIdentity *target, | |||
712 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "tcp", | 714 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "tcp", |
713 | "Creating new session for peer `%4s'\n", | 715 | "Creating new session for peer `%4s'\n", |
714 | GNUNET_i2s (target)); | 716 | GNUNET_i2s (target)); |
717 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
718 | "Creating new TCP session for peer `%s'\n", | ||
719 | GNUNET_i2s (target)); | ||
715 | 720 | ||
716 | ret = GNUNET_malloc (sizeof (struct Session)); | 721 | ret = GNUNET_malloc (sizeof (struct Session)); |
717 | ret->last_activity = GNUNET_TIME_absolute_get (); | 722 | ret->last_activity = GNUNET_TIME_absolute_get (); |
@@ -1089,9 +1094,10 @@ struct SessionItCtx | |||
1089 | struct Session * result; | 1094 | struct Session * result; |
1090 | }; | 1095 | }; |
1091 | 1096 | ||
1092 | int session_lookup_it (void *cls, | 1097 | static int |
1093 | const GNUNET_HashCode * key, | 1098 | session_lookup_it (void *cls, |
1094 | void *value) | 1099 | const GNUNET_HashCode * key, |
1100 | void *value) | ||
1095 | { | 1101 | { |
1096 | struct SessionItCtx * si_ctx = cls; | 1102 | struct SessionItCtx * si_ctx = cls; |
1097 | struct Session * session = value; | 1103 | struct Session * session = value; |
@@ -1144,11 +1150,10 @@ nat_connect_timeout (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
1144 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "tcp", | 1150 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "tcp", |
1145 | "NAT WAIT connection to `%4s' at `%s' could not be established, removing session\n", | 1151 | "NAT WAIT connection to `%4s' at `%s' could not be established, removing session\n", |
1146 | GNUNET_i2s (&session->target), tcp_address_to_string(NULL, session->addr, session->addrlen)); | 1152 | GNUNET_i2s (&session->target), tcp_address_to_string(NULL, session->addr, session->addrlen)); |
1147 | |||
1148 | disconnect_session (session); | 1153 | disconnect_session (session); |
1149 | |||
1150 | } | 1154 | } |
1151 | 1155 | ||
1156 | |||
1152 | /** | 1157 | /** |
1153 | * Create a new session to transmit data to the target | 1158 | * Create a new session to transmit data to the target |
1154 | * This session will used to send data to this peer and the plugin will | 1159 | * This session will used to send data to this peer and the plugin will |
@@ -1164,7 +1169,6 @@ tcp_plugin_get_session (void *cls, | |||
1164 | { | 1169 | { |
1165 | struct Plugin * plugin = cls; | 1170 | struct Plugin * plugin = cls; |
1166 | struct Session * session = NULL; | 1171 | struct Session * session = NULL; |
1167 | |||
1168 | int af; | 1172 | int af; |
1169 | const void *sb; | 1173 | const void *sb; |
1170 | size_t sbs; | 1174 | size_t sbs; |
@@ -1175,20 +1179,19 @@ tcp_plugin_get_session (void *cls, | |||
1175 | const struct IPv6TcpAddress *t6; | 1179 | const struct IPv6TcpAddress *t6; |
1176 | struct GNUNET_ATS_Information ats; | 1180 | struct GNUNET_ATS_Information ats; |
1177 | unsigned int is_natd = GNUNET_NO; | 1181 | unsigned int is_natd = GNUNET_NO; |
1178 | size_t addrlen = 0; | 1182 | size_t addrlen; |
1179 | 1183 | ||
1180 | GNUNET_assert (plugin != NULL); | 1184 | GNUNET_assert (plugin != NULL); |
1181 | GNUNET_assert (address != NULL); | 1185 | GNUNET_assert (address != NULL); |
1182 | |||
1183 | addrlen = address->address_length; | 1186 | addrlen = address->address_length; |
1184 | 1187 | GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, "tcp", | |
1185 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "tcp", | 1188 | "Trying to get session for `%s' address of peer `%s'\n", |
1186 | "Trying to get session for `%s' address length %i\n", | ||
1187 | tcp_address_to_string(NULL, address->address, address->address_length), | 1189 | tcp_address_to_string(NULL, address->address, address->address_length), |
1188 | addrlen); | 1190 | GNUNET_i2s (&address->peer)); |
1189 | 1191 | ||
1190 | /* look for existing session */ | 1192 | /* look for existing session */ |
1191 | if (GNUNET_CONTAINER_multihashmap_contains(plugin->sessionmap, &address->peer.hashPubKey)) | 1193 | if (GNUNET_YES == |
1194 | GNUNET_CONTAINER_multihashmap_contains(plugin->sessionmap, &address->peer.hashPubKey)) | ||
1192 | { | 1195 | { |
1193 | struct SessionItCtx si_ctx; | 1196 | struct SessionItCtx si_ctx; |
1194 | 1197 | ||
@@ -1208,6 +1211,11 @@ tcp_plugin_get_session (void *cls, | |||
1208 | session); | 1211 | session); |
1209 | return session; | 1212 | return session; |
1210 | } | 1213 | } |
1214 | GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, "tcp", | ||
1215 | "Existing sessions did not match address `%s' or peer `%s'\n", | ||
1216 | tcp_address_to_string(NULL, address->address, address->address_length), | ||
1217 | GNUNET_i2s (&address->peer)); | ||
1218 | |||
1211 | } | 1219 | } |
1212 | 1220 | ||
1213 | if (addrlen == sizeof (struct IPv6TcpAddress)) | 1221 | if (addrlen == sizeof (struct IPv6TcpAddress)) |
@@ -1281,7 +1289,7 @@ tcp_plugin_get_session (void *cls, | |||
1281 | &address->peer.hashPubKey))) | 1289 | &address->peer.hashPubKey))) |
1282 | { | 1290 | { |
1283 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "tcp", | 1291 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "tcp", |
1284 | _("Found valid IPv4 NAT address (creating session)!\n")); | 1292 | "Found valid IPv4 NAT address (creating session)!\n") ; |
1285 | session = create_session (plugin, &address->peer, NULL, GNUNET_YES); | 1293 | session = create_session (plugin, &address->peer, NULL, GNUNET_YES); |
1286 | session->addrlen = 0; | 1294 | session->addrlen = 0; |
1287 | session->addr = NULL; | 1295 | session->addr = NULL; |
@@ -1324,7 +1332,7 @@ tcp_plugin_get_session (void *cls, | |||
1324 | } | 1332 | } |
1325 | plugin->max_connections--; | 1333 | plugin->max_connections--; |
1326 | 1334 | ||
1327 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "tcp", | 1335 | GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, "tcp", |
1328 | "Asked to transmit to `%4s', creating fresh session using address `%s'.\n", | 1336 | "Asked to transmit to `%4s', creating fresh session using address `%s'.\n", |
1329 | GNUNET_i2s (&address->peer), GNUNET_a2s (sb, sbs)); | 1337 | GNUNET_i2s (&address->peer), GNUNET_a2s (sb, sbs)); |
1330 | 1338 | ||
@@ -1769,7 +1777,7 @@ handle_tcp_welcome (void *cls, struct GNUNET_SERVER_Client *client, | |||
1769 | return; | 1777 | return; |
1770 | } | 1778 | } |
1771 | 1779 | ||
1772 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "tcp", | 1780 | GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, "tcp", |
1773 | "Received %s message from `%4s'\n", "WELCOME", | 1781 | "Received %s message from `%4s'\n", "WELCOME", |
1774 | GNUNET_i2s (&wm->clientIdentity)); | 1782 | GNUNET_i2s (&wm->clientIdentity)); |
1775 | GNUNET_STATISTICS_update (plugin->env->stats, | 1783 | GNUNET_STATISTICS_update (plugin->env->stats, |