diff options
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/client.c | 11 | ||||
-rw-r--r-- | src/util/connection.c | 21 | ||||
-rw-r--r-- | src/util/container_heap.c | 7 | ||||
-rw-r--r-- | src/util/container_meta_data.c | 6 | ||||
-rw-r--r-- | src/util/crypto_rsa.c | 6 | ||||
-rw-r--r-- | src/util/disk.h | 5 | ||||
-rw-r--r-- | src/util/getopt.c | 12 | ||||
-rw-r--r-- | src/util/os_network.c | 5 | ||||
-rw-r--r-- | src/util/os_priority.c | 7 | ||||
-rw-r--r-- | src/util/peer.c | 8 | ||||
-rw-r--r-- | src/util/perf_crypto_hash.c | 8 | ||||
-rw-r--r-- | src/util/resolver_api.c | 6 | ||||
-rw-r--r-- | src/util/scheduler.c | 6 | ||||
-rw-r--r-- | src/util/server.c | 12 | ||||
-rw-r--r-- | src/util/server_nc.c | 4 | ||||
-rw-r--r-- | src/util/test_crypto_ksk.c | 8 | ||||
-rw-r--r-- | src/util/test_crypto_rsa.c | 20 | ||||
-rw-r--r-- | src/util/test_os_network.c | 6 | ||||
-rw-r--r-- | src/util/test_time.c | 7 |
19 files changed, 84 insertions, 81 deletions
diff --git a/src/util/client.c b/src/util/client.c index 59cd26ad1..2b866e6f8 100644 --- a/src/util/client.c +++ b/src/util/client.c | |||
@@ -452,8 +452,8 @@ check_complete (struct GNUNET_CLIENT_Connection *conn) | |||
452 | { | 452 | { |
453 | if ((conn->received_pos >= sizeof (struct GNUNET_MessageHeader)) && | 453 | if ((conn->received_pos >= sizeof (struct GNUNET_MessageHeader)) && |
454 | (conn->received_pos >= | 454 | (conn->received_pos >= |
455 | ntohs (((const struct GNUNET_MessageHeader *) conn-> | 455 | ntohs (((const struct GNUNET_MessageHeader *) conn->received_buf)-> |
456 | received_buf)->size))) | 456 | size))) |
457 | conn->msg_complete = GNUNET_YES; | 457 | conn->msg_complete = GNUNET_YES; |
458 | } | 458 | } |
459 | 459 | ||
@@ -679,8 +679,8 @@ write_test (void *cls, size_t size, void *buf) | |||
679 | msg->type = htons (GNUNET_MESSAGE_TYPE_TEST); | 679 | msg->type = htons (GNUNET_MESSAGE_TYPE_TEST); |
680 | msg->size = htons (sizeof (struct GNUNET_MessageHeader)); | 680 | msg->size = htons (sizeof (struct GNUNET_MessageHeader)); |
681 | GNUNET_CLIENT_receive (conn, &confirm_handler, conn, | 681 | GNUNET_CLIENT_receive (conn, &confirm_handler, conn, |
682 | GNUNET_TIME_absolute_get_remaining (conn-> | 682 | GNUNET_TIME_absolute_get_remaining |
683 | test_deadline)); | 683 | (conn->test_deadline)); |
684 | return sizeof (struct GNUNET_MessageHeader); | 684 | return sizeof (struct GNUNET_MessageHeader); |
685 | } | 685 | } |
686 | 686 | ||
@@ -902,7 +902,8 @@ GNUNET_CLIENT_service_test (const char *service, | |||
902 | * @param buf where to write them | 902 | * @param buf where to write them |
903 | * @return number of bytes written to buf | 903 | * @return number of bytes written to buf |
904 | */ | 904 | */ |
905 | static size_t client_notify (void *cls, size_t size, void *buf); | 905 | static size_t |
906 | client_notify (void *cls, size_t size, void *buf); | ||
906 | 907 | ||
907 | 908 | ||
908 | /** | 909 | /** |
diff --git a/src/util/connection.c b/src/util/connection.c index 39cb1dde2..9aeca9096 100644 --- a/src/util/connection.c +++ b/src/util/connection.c | |||
@@ -506,8 +506,8 @@ GNUNET_CONNECTION_get_address (struct GNUNET_CONNECTION_Handle *sock, | |||
506 | * @param cls our connection handle | 506 | * @param cls our connection handle |
507 | * @param tc task context describing why we are here | 507 | * @param tc task context describing why we are here |
508 | */ | 508 | */ |
509 | static void receive_again (void *cls, | 509 | static void |
510 | const struct GNUNET_SCHEDULER_TaskContext *tc); | 510 | receive_again (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); |
511 | 511 | ||
512 | 512 | ||
513 | /** | 513 | /** |
@@ -619,8 +619,8 @@ destroy_continuation (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
619 | * @param cls our connection handle | 619 | * @param cls our connection handle |
620 | * @param tc task context describing why we are here | 620 | * @param tc task context describing why we are here |
621 | */ | 621 | */ |
622 | static void transmit_ready (void *cls, | 622 | static void |
623 | const struct GNUNET_SCHEDULER_TaskContext *tc); | 623 | transmit_ready (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); |
624 | 624 | ||
625 | 625 | ||
626 | /** | 626 | /** |
@@ -867,13 +867,13 @@ try_connect_using_address (void *cls, const struct sockaddr *addr, | |||
867 | if (h->nth.notify_ready != NULL) | 867 | if (h->nth.notify_ready != NULL) |
868 | delay = | 868 | delay = |
869 | GNUNET_TIME_relative_min (delay, | 869 | GNUNET_TIME_relative_min (delay, |
870 | GNUNET_TIME_absolute_get_remaining (h->nth. | 870 | GNUNET_TIME_absolute_get_remaining (h-> |
871 | transmit_timeout)); | 871 | nth.transmit_timeout)); |
872 | if (h->receiver != NULL) | 872 | if (h->receiver != NULL) |
873 | delay = | 873 | delay = |
874 | GNUNET_TIME_relative_min (delay, | 874 | GNUNET_TIME_relative_min (delay, |
875 | GNUNET_TIME_absolute_get_remaining (h-> | 875 | GNUNET_TIME_absolute_get_remaining |
876 | receive_timeout)); | 876 | (h->receive_timeout)); |
877 | ap->task = | 877 | ap->task = |
878 | GNUNET_SCHEDULER_add_write_net (delay, ap->sock, | 878 | GNUNET_SCHEDULER_add_write_net (delay, ap->sock, |
879 | &connect_probe_continuation, ap); | 879 | &connect_probe_continuation, ap); |
@@ -1152,9 +1152,8 @@ receive_ready (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
1152 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1152 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1153 | "Receive from `%s' encounters error: time out by %llums... (%p)\n", | 1153 | "Receive from `%s' encounters error: time out by %llums... (%p)\n", |
1154 | GNUNET_a2s (sh->addr, sh->addrlen), | 1154 | GNUNET_a2s (sh->addr, sh->addrlen), |
1155 | GNUNET_TIME_absolute_get_duration (sh-> | 1155 | GNUNET_TIME_absolute_get_duration (sh->receive_timeout). |
1156 | receive_timeout).rel_value, | 1156 | rel_value, sh); |
1157 | sh); | ||
1158 | #endif | 1157 | #endif |
1159 | signal_timeout (sh); | 1158 | signal_timeout (sh); |
1160 | return; | 1159 | return; |
diff --git a/src/util/container_heap.c b/src/util/container_heap.c index ef6bcc892..059a5b253 100644 --- a/src/util/container_heap.c +++ b/src/util/container_heap.c | |||
@@ -292,11 +292,8 @@ insert_node (struct GNUNET_CONTAINER_Heap *heap, | |||
292 | 292 | ||
293 | GNUNET_assert (node->parent == NULL); | 293 | GNUNET_assert (node->parent == NULL); |
294 | while ((heap->order == GNUNET_CONTAINER_HEAP_ORDER_MAX) ? (pos->cost >= | 294 | while ((heap->order == GNUNET_CONTAINER_HEAP_ORDER_MAX) ? (pos->cost >= |
295 | node-> | 295 | node->cost) |
296 | cost) : (pos-> | 296 | : (pos->cost <= node->cost)) |
297 | cost <= | ||
298 | node-> | ||
299 | cost)) | ||
300 | { | 297 | { |
301 | /* node is descendent of pos */ | 298 | /* node is descendent of pos */ |
302 | pos->tree_size += (1 + node->tree_size); | 299 | pos->tree_size += (1 + node->tree_size); |
diff --git a/src/util/container_meta_data.c b/src/util/container_meta_data.c index c67e96dac..eb515e8fb 100644 --- a/src/util/container_meta_data.c +++ b/src/util/container_meta_data.c | |||
@@ -1165,9 +1165,9 @@ GNUNET_CONTAINER_meta_data_deserialize (const char *input, size_t size) | |||
1165 | else | 1165 | else |
1166 | mime_type = &mdata[left]; | 1166 | mime_type = &mdata[left]; |
1167 | GNUNET_CONTAINER_meta_data_insert (md, plugin_name, | 1167 | GNUNET_CONTAINER_meta_data_insert (md, plugin_name, |
1168 | (enum EXTRACTOR_MetaType) ntohl (ent. | 1168 | (enum EXTRACTOR_MetaType) |
1169 | type), | 1169 | ntohl (ent.type), format, mime_type, |
1170 | format, mime_type, meta_data, dlen); | 1170 | meta_data, dlen); |
1171 | } | 1171 | } |
1172 | GNUNET_free_non_null (data); | 1172 | GNUNET_free_non_null (data); |
1173 | return md; | 1173 | return md; |
diff --git a/src/util/crypto_rsa.c b/src/util/crypto_rsa.c index 3607998e4..ec46b486c 100644 --- a/src/util/crypto_rsa.c +++ b/src/util/crypto_rsa.c | |||
@@ -218,9 +218,9 @@ GNUNET_CRYPTO_rsa_key_get_public (const struct GNUNET_CRYPTO_RsaPrivateKey | |||
218 | size = GNUNET_CRYPTO_RSA_KEY_LENGTH - GNUNET_CRYPTO_RSA_DATA_ENCODING_LENGTH; | 218 | size = GNUNET_CRYPTO_RSA_KEY_LENGTH - GNUNET_CRYPTO_RSA_DATA_ENCODING_LENGTH; |
219 | GNUNET_assert (0 == | 219 | GNUNET_assert (0 == |
220 | gcry_mpi_print (GCRYMPI_FMT_USG, | 220 | gcry_mpi_print (GCRYMPI_FMT_USG, |
221 | &pub-> | 221 | &pub->key |
222 | key[GNUNET_CRYPTO_RSA_DATA_ENCODING_LENGTH], | 222 | [GNUNET_CRYPTO_RSA_DATA_ENCODING_LENGTH], size, |
223 | size, &size, skey[1])); | 223 | &size, skey[1])); |
224 | adjust (&pub->key[GNUNET_CRYPTO_RSA_DATA_ENCODING_LENGTH], size, | 224 | adjust (&pub->key[GNUNET_CRYPTO_RSA_DATA_ENCODING_LENGTH], size, |
225 | GNUNET_CRYPTO_RSA_KEY_LENGTH - | 225 | GNUNET_CRYPTO_RSA_KEY_LENGTH - |
226 | GNUNET_CRYPTO_RSA_DATA_ENCODING_LENGTH); | 226 | GNUNET_CRYPTO_RSA_DATA_ENCODING_LENGTH); |
diff --git a/src/util/disk.h b/src/util/disk.h index b60150f3a..2c128745f 100644 --- a/src/util/disk.h +++ b/src/util/disk.h | |||
@@ -37,7 +37,8 @@ | |||
37 | * @param dst_len length of dst | 37 | * @param dst_len length of dst |
38 | * @return GNUNET_OK on success, GNUNET_SYSERR otherwise | 38 | * @return GNUNET_OK on success, GNUNET_SYSERR otherwise |
39 | */ | 39 | */ |
40 | int GNUNET_DISK_internal_file_handle_ (const struct GNUNET_DISK_FileHandle *fh, | 40 | int |
41 | void *dst, size_t dst_len); | 41 | GNUNET_DISK_internal_file_handle_ (const struct GNUNET_DISK_FileHandle *fh, |
42 | void *dst, size_t dst_len); | ||
42 | 43 | ||
43 | #endif /* GNUNET_DISK_H_ */ | 44 | #endif /* GNUNET_DISK_H_ */ |
diff --git a/src/util/getopt.c b/src/util/getopt.c index db81d1c3d..eb79db757 100644 --- a/src/util/getopt.c +++ b/src/util/getopt.c | |||
@@ -194,7 +194,8 @@ static char *posixly_correct; | |||
194 | /* Avoid depending on library functions or files | 194 | /* Avoid depending on library functions or files |
195 | whose names are inconsistent. */ | 195 | whose names are inconsistent. */ |
196 | 196 | ||
197 | char *getenv (); | 197 | char * |
198 | getenv (); | ||
198 | 199 | ||
199 | static char * | 200 | static char * |
200 | my_index (str, chr) | 201 | my_index (str, chr) |
@@ -218,7 +219,8 @@ my_index (str, chr) | |||
218 | #if !defined (__STDC__) || !__STDC__ | 219 | #if !defined (__STDC__) || !__STDC__ |
219 | /* gcc with -traditional declares the built-in strlen to return int, | 220 | /* gcc with -traditional declares the built-in strlen to return int, |
220 | and has done so at least since version 2.4.5. -- rms. */ | 221 | and has done so at least since version 2.4.5. -- rms. */ |
221 | extern int strlen (const char *); | 222 | extern int |
223 | strlen (const char *); | ||
222 | #endif /* not __STDC__ */ | 224 | #endif /* not __STDC__ */ |
223 | #endif /* __GNUC__ */ | 225 | #endif /* __GNUC__ */ |
224 | 226 | ||
@@ -283,7 +285,8 @@ text_set_element (__libc_subinit, store_args_and_env); | |||
283 | the new indices of the non-options in ARGV after they are moved. */ | 285 | the new indices of the non-options in ARGV after they are moved. */ |
284 | 286 | ||
285 | #if defined (__STDC__) && __STDC__ | 287 | #if defined (__STDC__) && __STDC__ |
286 | static void exchange (char **); | 288 | static void |
289 | exchange (char **); | ||
287 | #endif | 290 | #endif |
288 | 291 | ||
289 | static void | 292 | static void |
@@ -370,7 +373,8 @@ exchange (argv) | |||
370 | /* Initialize the internal data when the first call is made. */ | 373 | /* Initialize the internal data when the first call is made. */ |
371 | 374 | ||
372 | #if defined (__STDC__) && __STDC__ | 375 | #if defined (__STDC__) && __STDC__ |
373 | static const char *_getopt_initialize (int, char *const *, const char *); | 376 | static const char * |
377 | _getopt_initialize (int, char *const *, const char *); | ||
374 | #endif | 378 | #endif |
375 | static const char * | 379 | static const char * |
376 | _getopt_initialize (argc, argv, optstring) | 380 | _getopt_initialize (argc, argv, optstring) |
diff --git a/src/util/os_network.c b/src/util/os_network.c index 21376f94c..b55789c99 100644 --- a/src/util/os_network.c +++ b/src/util/os_network.c | |||
@@ -135,8 +135,9 @@ GNUNET_OS_network_interfaces_list (GNUNET_OS_NetworkInterfaceProcessor proc, | |||
135 | pTable->table[dwIfIdx].dwPhysAddrLen); | 135 | pTable->table[dwIfIdx].dwPhysAddrLen); |
136 | 136 | ||
137 | snprintf (szEntry, 1000, "%s (%s - %I64u)", | 137 | snprintf (szEntry, 1000, "%s (%s - %I64u)", |
138 | pszIfName ? pszIfName : (char *) pTable->table[dwIfIdx]. | 138 | pszIfName ? pszIfName : (char *) pTable-> |
139 | bDescr, inet_ntop (AF_INET, &dwIP, dst, INET_ADDRSTRLEN), | 139 | table[dwIfIdx].bDescr, inet_ntop (AF_INET, &dwIP, dst, |
140 | INET_ADDRSTRLEN), | ||
140 | *((unsigned long long *) bPhysAddr)); | 141 | *((unsigned long long *) bPhysAddr)); |
141 | szEntry[1000] = 0; | 142 | szEntry[1000] = 0; |
142 | 143 | ||
diff --git a/src/util/os_priority.c b/src/util/os_priority.c index d27642a58..55a728ce6 100644 --- a/src/util/os_priority.c +++ b/src/util/os_priority.c | |||
@@ -63,10 +63,9 @@ parent_control_handler (void *cls, | |||
63 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "`%s' invoked because of %d\n", | 63 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "`%s' invoked because of %d\n", |
64 | __FUNCTION__, tc->reason); | 64 | __FUNCTION__, tc->reason); |
65 | #endif | 65 | #endif |
66 | if (tc-> | 66 | if (tc->reason & |
67 | reason & (GNUNET_SCHEDULER_REASON_SHUTDOWN | | 67 | (GNUNET_SCHEDULER_REASON_SHUTDOWN | GNUNET_SCHEDULER_REASON_TIMEOUT | |
68 | GNUNET_SCHEDULER_REASON_TIMEOUT | | 68 | GNUNET_SCHEDULER_REASON_PREREQ_DONE)) |
69 | GNUNET_SCHEDULER_REASON_PREREQ_DONE)) | ||
70 | { | 69 | { |
71 | GNUNET_DISK_npipe_close (control_pipe); | 70 | GNUNET_DISK_npipe_close (control_pipe); |
72 | } | 71 | } |
diff --git a/src/util/peer.c b/src/util/peer.c index 62fa0e2f2..cd5444a19 100644 --- a/src/util/peer.c +++ b/src/util/peer.c | |||
@@ -181,8 +181,8 @@ GNUNET_PEER_decrement_rcs (const GNUNET_PEER_Id *ids, unsigned int count) | |||
181 | { | 181 | { |
182 | GNUNET_break (GNUNET_OK == | 182 | GNUNET_break (GNUNET_OK == |
183 | GNUNET_CONTAINER_multihashmap_remove (map, | 183 | GNUNET_CONTAINER_multihashmap_remove (map, |
184 | &table[id].id. | 184 | &table[id]. |
185 | hashPubKey, | 185 | id.hashPubKey, |
186 | (void *) (long) id)); | 186 | (void *) (long) id)); |
187 | table[id].pid = free_list_start; | 187 | table[id].pid = free_list_start; |
188 | free_list_start = id; | 188 | free_list_start = id; |
@@ -210,8 +210,8 @@ GNUNET_PEER_change_rc (GNUNET_PEER_Id id, int delta) | |||
210 | { | 210 | { |
211 | GNUNET_break (GNUNET_OK == | 211 | GNUNET_break (GNUNET_OK == |
212 | GNUNET_CONTAINER_multihashmap_remove (map, | 212 | GNUNET_CONTAINER_multihashmap_remove (map, |
213 | &table[id].id. | 213 | &table[id]. |
214 | hashPubKey, | 214 | id.hashPubKey, |
215 | (void *) (long) id)); | 215 | (void *) (long) id)); |
216 | table[id].pid = free_list_start; | 216 | table[id].pid = free_list_start; |
217 | free_list_start = id; | 217 | free_list_start = id; |
diff --git a/src/util/perf_crypto_hash.c b/src/util/perf_crypto_hash.c index 689781835..d883776b4 100644 --- a/src/util/perf_crypto_hash.c +++ b/src/util/perf_crypto_hash.c | |||
@@ -58,12 +58,12 @@ main (int argc, char *argv[]) | |||
58 | start = GNUNET_TIME_absolute_get (); | 58 | start = GNUNET_TIME_absolute_get (); |
59 | perfHash (); | 59 | perfHash (); |
60 | printf ("Hash perf took %llu ms\n", | 60 | printf ("Hash perf took %llu ms\n", |
61 | (unsigned long long) GNUNET_TIME_absolute_get_duration (start). | 61 | (unsigned long long) |
62 | rel_value); | 62 | GNUNET_TIME_absolute_get_duration (start).rel_value); |
63 | GAUGER ("UTIL", "Cryptographic hashing", | 63 | GAUGER ("UTIL", "Cryptographic hashing", |
64 | 1024 * 64 * 1024 / (1 + | 64 | 1024 * 64 * 1024 / (1 + |
65 | GNUNET_TIME_absolute_get_duration (start). | 65 | GNUNET_TIME_absolute_get_duration |
66 | rel_value), "kb/s"); | 66 | (start).rel_value), "kb/s"); |
67 | return 0; | 67 | return 0; |
68 | } | 68 | } |
69 | 69 | ||
diff --git a/src/util/resolver_api.c b/src/util/resolver_api.c index 3aa8bff9c..3607ce67f 100644 --- a/src/util/resolver_api.c +++ b/src/util/resolver_api.c | |||
@@ -318,7 +318,8 @@ no_resolve (const struct sockaddr *sa, socklen_t salen) | |||
318 | /** | 318 | /** |
319 | * Adjust exponential back-off and reconnect to the service. | 319 | * Adjust exponential back-off and reconnect to the service. |
320 | */ | 320 | */ |
321 | static void reconnect (); | 321 | static void |
322 | reconnect (); | ||
322 | 323 | ||
323 | 324 | ||
324 | /** | 325 | /** |
@@ -326,7 +327,8 @@ static void reconnect (); | |||
326 | * | 327 | * |
327 | * @param h handle to the resolver | 328 | * @param h handle to the resolver |
328 | */ | 329 | */ |
329 | static void process_requests (); | 330 | static void |
331 | process_requests (); | ||
330 | 332 | ||
331 | 333 | ||
332 | /** | 334 | /** |
diff --git a/src/util/scheduler.c b/src/util/scheduler.c index 844531b37..52824d8b3 100644 --- a/src/util/scheduler.c +++ b/src/util/scheduler.c | |||
@@ -656,9 +656,9 @@ run_ready (struct GNUNET_NETWORK_FDSet *rs, struct GNUNET_NETWORK_FDSet *ws) | |||
656 | { | 656 | { |
657 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 657 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
658 | "Task %llu took %llums to be scheduled\n", pos->id, | 658 | "Task %llu took %llums to be scheduled\n", pos->id, |
659 | (unsigned long long) GNUNET_TIME_absolute_get_duration (pos-> | 659 | (unsigned long long) |
660 | start_time). | 660 | GNUNET_TIME_absolute_get_duration |
661 | rel_value); | 661 | (pos->start_time).rel_value); |
662 | } | 662 | } |
663 | #endif | 663 | #endif |
664 | tc.reason = pos->reason; | 664 | tc.reason = pos->reason; |
diff --git a/src/util/server.c b/src/util/server.c index 504391bc7..31d298e3a 100644 --- a/src/util/server.c +++ b/src/util/server.c | |||
@@ -611,9 +611,9 @@ warn_no_receive_done (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
611 | _ | 611 | _ |
612 | ("Processing code for message of type %u did not call GNUNET_SERVER_receive_done after %llums\n"), | 612 | ("Processing code for message of type %u did not call GNUNET_SERVER_receive_done after %llums\n"), |
613 | (unsigned int) client->warn_type, | 613 | (unsigned int) client->warn_type, |
614 | (unsigned long long) GNUNET_TIME_absolute_get_duration (client-> | 614 | (unsigned long long) |
615 | warn_start). | 615 | GNUNET_TIME_absolute_get_duration |
616 | rel_value); | 616 | (client->warn_start).rel_value); |
617 | } | 617 | } |
618 | 618 | ||
619 | 619 | ||
@@ -730,9 +730,9 @@ GNUNET_SERVER_inject (struct GNUNET_SERVER_Handle *server, | |||
730 | * @param addrlen length of addr | 730 | * @param addrlen length of addr |
731 | * @param errCode code indicating errors receiving, 0 for success | 731 | * @param errCode code indicating errors receiving, 0 for success |
732 | */ | 732 | */ |
733 | static void process_incoming (void *cls, const void *buf, size_t available, | 733 | static void |
734 | const struct sockaddr *addr, socklen_t addrlen, | 734 | process_incoming (void *cls, const void *buf, size_t available, |
735 | int errCode); | 735 | const struct sockaddr *addr, socklen_t addrlen, int errCode); |
736 | 736 | ||
737 | 737 | ||
738 | /** | 738 | /** |
diff --git a/src/util/server_nc.c b/src/util/server_nc.c index a1cb43f00..a5ee7e0d6 100644 --- a/src/util/server_nc.c +++ b/src/util/server_nc.c | |||
@@ -381,8 +381,8 @@ do_unicast (struct GNUNET_SERVER_NotificationContext *nc, | |||
381 | if (client->th == NULL) | 381 | if (client->th == NULL) |
382 | client->th = | 382 | client->th = |
383 | GNUNET_SERVER_notify_transmit_ready (client->client, | 383 | GNUNET_SERVER_notify_transmit_ready (client->client, |
384 | ntohs (client->pending_head->msg-> | 384 | ntohs (client->pending_head-> |
385 | size), | 385 | msg->size), |
386 | GNUNET_TIME_UNIT_FOREVER_REL, | 386 | GNUNET_TIME_UNIT_FOREVER_REL, |
387 | &transmit_message, client); | 387 | &transmit_message, client); |
388 | } | 388 | } |
diff --git a/src/util/test_crypto_ksk.c b/src/util/test_crypto_ksk.c index d4340f3ea..2789f5edb 100644 --- a/src/util/test_crypto_ksk.c +++ b/src/util/test_crypto_ksk.c | |||
@@ -168,8 +168,8 @@ testEncryptDecrypt (struct GNUNET_CRYPTO_RsaPrivateKey *hostkey) | |||
168 | } | 168 | } |
169 | } | 169 | } |
170 | printf ("%d RSA encrypt/decrypt operations %llums (%d failures)\n", ITER, | 170 | printf ("%d RSA encrypt/decrypt operations %llums (%d failures)\n", ITER, |
171 | (unsigned long long) GNUNET_TIME_absolute_get_duration (start). | 171 | (unsigned long long) |
172 | rel_value, ok); | 172 | GNUNET_TIME_absolute_get_duration (start).rel_value, ok); |
173 | if (ok == 0) | 173 | if (ok == 0) |
174 | return GNUNET_OK; | 174 | return GNUNET_OK; |
175 | else | 175 | else |
@@ -218,8 +218,8 @@ testSignVerify (struct GNUNET_CRYPTO_RsaPrivateKey *hostkey) | |||
218 | } | 218 | } |
219 | } | 219 | } |
220 | printf ("%d RSA sign/verify operations %llums\n", ITER, | 220 | printf ("%d RSA sign/verify operations %llums\n", ITER, |
221 | (unsigned long long) GNUNET_TIME_absolute_get_duration (start). | 221 | (unsigned long long) |
222 | rel_value); | 222 | GNUNET_TIME_absolute_get_duration (start).rel_value); |
223 | return ok; | 223 | return ok; |
224 | } | 224 | } |
225 | 225 | ||
diff --git a/src/util/test_crypto_rsa.c b/src/util/test_crypto_rsa.c index bf058d285..f26a76a38 100644 --- a/src/util/test_crypto_rsa.c +++ b/src/util/test_crypto_rsa.c | |||
@@ -82,8 +82,8 @@ testEncryptDecrypt () | |||
82 | } | 82 | } |
83 | } | 83 | } |
84 | printf ("%d RSA encrypt/decrypt operations %llums (%d failures)\n", ITER, | 84 | printf ("%d RSA encrypt/decrypt operations %llums (%d failures)\n", ITER, |
85 | (unsigned long long) GNUNET_TIME_absolute_get_duration (start). | 85 | (unsigned long long) |
86 | rel_value, ok); | 86 | GNUNET_TIME_absolute_get_duration (start).rel_value, ok); |
87 | GNUNET_CRYPTO_rsa_key_free (hostkey); | 87 | GNUNET_CRYPTO_rsa_key_free (hostkey); |
88 | if (ok == 0) | 88 | if (ok == 0) |
89 | return GNUNET_OK; | 89 | return GNUNET_OK; |
@@ -121,8 +121,8 @@ testEncryptPerformance () | |||
121 | } | 121 | } |
122 | } | 122 | } |
123 | printf ("%d RSA encrypt operations %llu ms (%d failures)\n", ITER, | 123 | printf ("%d RSA encrypt operations %llu ms (%d failures)\n", ITER, |
124 | (unsigned long long) GNUNET_TIME_absolute_get_duration (start). | 124 | (unsigned long long) |
125 | rel_value, ok); | 125 | GNUNET_TIME_absolute_get_duration (start).rel_value, ok); |
126 | GNUNET_CRYPTO_rsa_key_free (hostkey); | 126 | GNUNET_CRYPTO_rsa_key_free (hostkey); |
127 | if (ok != 0) | 127 | if (ok != 0) |
128 | return GNUNET_SYSERR; | 128 | return GNUNET_SYSERR; |
@@ -178,8 +178,8 @@ testEncryptDecryptSK () | |||
178 | } | 178 | } |
179 | } | 179 | } |
180 | printf ("%d RSA encrypt/decrypt SK operations %llums (%d failures)\n", ITER, | 180 | printf ("%d RSA encrypt/decrypt SK operations %llums (%d failures)\n", ITER, |
181 | (unsigned long long) GNUNET_TIME_absolute_get_duration (start). | 181 | (unsigned long long) |
182 | rel_value, ok); | 182 | GNUNET_TIME_absolute_get_duration (start).rel_value, ok); |
183 | GNUNET_CRYPTO_rsa_key_free (hostkey); | 183 | GNUNET_CRYPTO_rsa_key_free (hostkey); |
184 | if (ok != 0) | 184 | if (ok != 0) |
185 | return GNUNET_SYSERR; | 185 | return GNUNET_SYSERR; |
@@ -232,8 +232,8 @@ testSignVerify () | |||
232 | } | 232 | } |
233 | } | 233 | } |
234 | printf ("%d RSA sign/verify operations %llums\n", ITER, | 234 | printf ("%d RSA sign/verify operations %llums\n", ITER, |
235 | (unsigned long long) GNUNET_TIME_absolute_get_duration (start). | 235 | (unsigned long long) |
236 | rel_value); | 236 | GNUNET_TIME_absolute_get_duration (start).rel_value); |
237 | GNUNET_CRYPTO_rsa_key_free (hostkey); | 237 | GNUNET_CRYPTO_rsa_key_free (hostkey); |
238 | return ok; | 238 | return ok; |
239 | } | 239 | } |
@@ -268,8 +268,8 @@ testSignPerformance () | |||
268 | } | 268 | } |
269 | } | 269 | } |
270 | printf ("%d RSA sign operations %llu ms\n", ITER, | 270 | printf ("%d RSA sign operations %llu ms\n", ITER, |
271 | (unsigned long long) GNUNET_TIME_absolute_get_duration (start). | 271 | (unsigned long long) |
272 | rel_value); | 272 | GNUNET_TIME_absolute_get_duration (start).rel_value); |
273 | GNUNET_CRYPTO_rsa_key_free (hostkey); | 273 | GNUNET_CRYPTO_rsa_key_free (hostkey); |
274 | return ok; | 274 | return ok; |
275 | } | 275 | } |
diff --git a/src/util/test_os_network.c b/src/util/test_os_network.c index 583a5fb82..315f97d97 100644 --- a/src/util/test_os_network.c +++ b/src/util/test_os_network.c | |||
@@ -45,9 +45,9 @@ proc (void *cls, const char *name, int isDefault, const struct sockaddr *addr, | |||
45 | 45 | ||
46 | inet_ntop (addr->sa_family, | 46 | inet_ntop (addr->sa_family, |
47 | (addr->sa_family == | 47 | (addr->sa_family == |
48 | AF_INET) ? (void *) &((struct sockaddr_in *) addr)-> | 48 | AF_INET) ? (void *) &((struct sockaddr_in *) addr)->sin_addr |
49 | sin_addr : (void *) &((struct sockaddr_in6 *) addr)->sin6_addr, | 49 | : (void *) &((struct sockaddr_in6 *) addr)->sin6_addr, buf, |
50 | buf, sizeof (buf)); | 50 | sizeof (buf)); |
51 | if ((0 == strcmp ("::1", buf)) || (0 == strcmp ("127.0.0.1", buf))) | 51 | if ((0 == strcmp ("::1", buf)) || (0 == strcmp ("127.0.0.1", buf))) |
52 | *ok = 0; | 52 | *ok = 0; |
53 | return GNUNET_OK; | 53 | return GNUNET_OK; |
diff --git a/src/util/test_time.c b/src/util/test_time.c index 6a05b698c..788884fcc 100644 --- a/src/util/test_time.c +++ b/src/util/test_time.c | |||
@@ -108,8 +108,8 @@ check () | |||
108 | GNUNET_assert (GNUNET_TIME_absolute_get_difference (future, now).rel_value == | 108 | GNUNET_assert (GNUNET_TIME_absolute_get_difference (future, now).rel_value == |
109 | 0); | 109 | 0); |
110 | 110 | ||
111 | GNUNET_assert (GNUNET_TIME_absolute_get_difference (zero, forever). | 111 | GNUNET_assert (GNUNET_TIME_absolute_get_difference (zero, forever).rel_value |
112 | rel_value == forever.abs_value); | 112 | == forever.abs_value); |
113 | 113 | ||
114 | past.abs_value = now.abs_value - 1000000; | 114 | past.abs_value = now.abs_value - 1000000; |
115 | rel = GNUNET_TIME_absolute_get_duration (future); | 115 | rel = GNUNET_TIME_absolute_get_duration (future); |
@@ -153,8 +153,7 @@ check () | |||
153 | 153 | ||
154 | GNUNET_assert (forever.abs_value == | 154 | GNUNET_assert (forever.abs_value == |
155 | GNUNET_TIME_absolute_subtract (forever, | 155 | GNUNET_TIME_absolute_subtract (forever, |
156 | GNUNET_TIME_UNIT_MINUTES). | 156 | GNUNET_TIME_UNIT_MINUTES).abs_value); |
157 | abs_value); | ||
158 | /*check absolute subtract */ | 157 | /*check absolute subtract */ |
159 | now.abs_value = 50000; | 158 | now.abs_value = 50000; |
160 | rel.rel_value = 100000; | 159 | rel.rel_value = 100000; |