diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/dht/Makefile.am | 1 | ||||
-rw-r--r-- | src/pq/pq_result_helper.c | 36 | ||||
-rw-r--r-- | src/psycutil/psyc_message.c | 1 | ||||
-rw-r--r-- | src/rps/test_rps.c | 2 | ||||
-rw-r--r-- | src/util/scheduler.c | 22 |
5 files changed, 32 insertions, 30 deletions
diff --git a/src/dht/Makefile.am b/src/dht/Makefile.am index d60ff62d6..c52ac93c7 100644 --- a/src/dht/Makefile.am +++ b/src/dht/Makefile.am | |||
@@ -204,6 +204,7 @@ EXTRA_DIST = \ | |||
204 | test_dht_multipeer.conf \ | 204 | test_dht_multipeer.conf \ |
205 | test_dht_2dtorus.conf \ | 205 | test_dht_2dtorus.conf \ |
206 | test_dht_line.conf \ | 206 | test_dht_line.conf \ |
207 | test_dht_tools.conf \ | ||
207 | test_dht_tools.py.in \ | 208 | test_dht_tools.py.in \ |
208 | test_dht_multipeer_topology.dat | 209 | test_dht_multipeer_topology.dat |
209 | 210 | ||
diff --git a/src/pq/pq_result_helper.c b/src/pq/pq_result_helper.c index 045fe74b1..d9fed26a6 100644 --- a/src/pq/pq_result_helper.c +++ b/src/pq/pq_result_helper.c | |||
@@ -100,8 +100,8 @@ extract_varsize_blob (void *cls, | |||
100 | idst = GNUNET_malloc (len); | 100 | idst = GNUNET_malloc (len); |
101 | *((void **) dst) = idst; | 101 | *((void **) dst) = idst; |
102 | GNUNET_memcpy (idst, | 102 | GNUNET_memcpy (idst, |
103 | res, | 103 | res, |
104 | len); | 104 | len); |
105 | return GNUNET_OK; | 105 | return GNUNET_OK; |
106 | } | 106 | } |
107 | 107 | ||
@@ -165,7 +165,7 @@ extract_fixed_blob (void *cls, | |||
165 | { | 165 | { |
166 | GNUNET_break (0); | 166 | GNUNET_break (0); |
167 | return GNUNET_SYSERR; | 167 | return GNUNET_SYSERR; |
168 | } | 168 | } |
169 | 169 | ||
170 | /* if a field is null, continue but | 170 | /* if a field is null, continue but |
171 | * remember that we now return a different result */ | 171 | * remember that we now return a different result */ |
@@ -182,8 +182,8 @@ extract_fixed_blob (void *cls, | |||
182 | fnum); | 182 | fnum); |
183 | GNUNET_assert (NULL != res); | 183 | GNUNET_assert (NULL != res); |
184 | GNUNET_memcpy (dst, | 184 | GNUNET_memcpy (dst, |
185 | res, | 185 | res, |
186 | len); | 186 | len); |
187 | return GNUNET_OK; | 187 | return GNUNET_OK; |
188 | } | 188 | } |
189 | 189 | ||
@@ -580,7 +580,7 @@ extract_uint16 (void *cls, | |||
580 | if (PQgetisnull (result, | 580 | if (PQgetisnull (result, |
581 | row, | 581 | row, |
582 | fnum)) | 582 | fnum)) |
583 | { | 583 | { |
584 | GNUNET_break (0); | 584 | GNUNET_break (0); |
585 | return GNUNET_SYSERR; | 585 | return GNUNET_SYSERR; |
586 | } | 586 | } |
@@ -590,6 +590,14 @@ extract_uint16 (void *cls, | |||
590 | GNUNET_break (0); | 590 | GNUNET_break (0); |
591 | return GNUNET_SYSERR; | 591 | return GNUNET_SYSERR; |
592 | } | 592 | } |
593 | if (sizeof (uint16_t) != | ||
594 | PQgetlength (result, | ||
595 | row, | ||
596 | fnum)) | ||
597 | { | ||
598 | GNUNET_break (0); | ||
599 | return GNUNET_SYSERR; | ||
600 | } | ||
593 | res = (uint16_t *) PQgetvalue (result, | 601 | res = (uint16_t *) PQgetvalue (result, |
594 | row, | 602 | row, |
595 | fnum); | 603 | fnum); |
@@ -663,6 +671,14 @@ extract_uint32 (void *cls, | |||
663 | GNUNET_break (0); | 671 | GNUNET_break (0); |
664 | return GNUNET_SYSERR; | 672 | return GNUNET_SYSERR; |
665 | } | 673 | } |
674 | if (sizeof (uint32_t) != | ||
675 | PQgetlength (result, | ||
676 | row, | ||
677 | fnum)) | ||
678 | { | ||
679 | GNUNET_break (0); | ||
680 | return GNUNET_SYSERR; | ||
681 | } | ||
666 | res = (uint32_t *) PQgetvalue (result, | 682 | res = (uint32_t *) PQgetvalue (result, |
667 | row, | 683 | row, |
668 | fnum); | 684 | fnum); |
@@ -736,6 +752,14 @@ extract_uint64 (void *cls, | |||
736 | GNUNET_break (0); | 752 | GNUNET_break (0); |
737 | return GNUNET_SYSERR; | 753 | return GNUNET_SYSERR; |
738 | } | 754 | } |
755 | if (sizeof (uint64_t) != | ||
756 | PQgetlength (result, | ||
757 | row, | ||
758 | fnum)) | ||
759 | { | ||
760 | GNUNET_break (0); | ||
761 | return GNUNET_SYSERR; | ||
762 | } | ||
739 | res = (uint64_t *) PQgetvalue (result, | 763 | res = (uint64_t *) PQgetvalue (result, |
740 | row, | 764 | row, |
741 | fnum); | 765 | fnum); |
diff --git a/src/psycutil/psyc_message.c b/src/psycutil/psyc_message.c index 3421fd0ba..3bd99425e 100644 --- a/src/psycutil/psyc_message.c +++ b/src/psycutil/psyc_message.c | |||
@@ -818,7 +818,6 @@ GNUNET_PSYC_transmit_cancel (struct GNUNET_PSYC_TransmitHandle *tmit) | |||
818 | 818 | ||
819 | /* FIXME */ | 819 | /* FIXME */ |
820 | struct GNUNET_MessageHeader msg; | 820 | struct GNUNET_MessageHeader msg; |
821 | msg.type = htons (GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_DATA); | ||
822 | msg.type = htons (GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_CANCEL); | 821 | msg.type = htons (GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_CANCEL); |
823 | msg.size = htons (sizeof (msg)); | 822 | msg.size = htons (sizeof (msg)); |
824 | transmit_queue_insert (tmit, &msg, GNUNET_YES); | 823 | transmit_queue_insert (tmit, &msg, GNUNET_YES); |
diff --git a/src/rps/test_rps.c b/src/rps/test_rps.c index 6189557f6..7d61ae6a1 100644 --- a/src/rps/test_rps.c +++ b/src/rps/test_rps.c | |||
@@ -1296,7 +1296,7 @@ manage_service_wrapper (unsigned int i, unsigned int j, | |||
1296 | enum PEER_ONLINE_DELTA delta, | 1296 | enum PEER_ONLINE_DELTA delta, |
1297 | double prob_go_on_off) | 1297 | double prob_go_on_off) |
1298 | { | 1298 | { |
1299 | struct OpListEntry *entry; | 1299 | struct OpListEntry *entry = NULL; |
1300 | uint32_t prob; | 1300 | uint32_t prob; |
1301 | 1301 | ||
1302 | /* make sure that management operation is not already scheduled */ | 1302 | /* make sure that management operation is not already scheduled */ |
diff --git a/src/util/scheduler.c b/src/util/scheduler.c index 279a4ed02..e92405a96 100644 --- a/src/util/scheduler.c +++ b/src/util/scheduler.c | |||
@@ -135,18 +135,6 @@ struct GNUNET_SCHEDULER_Task | |||
135 | unsigned int fds_len; | 135 | unsigned int fds_len; |
136 | 136 | ||
137 | /** | 137 | /** |
138 | * if this task is related to multiple FDs this array contains | ||
139 | * all FdInfo structs that were marked as ready by calling | ||
140 | * #GNUNET_SCHEDULER_task_ready | ||
141 | */ | ||
142 | struct GNUNET_SCHEDULER_FdInfo *ready_fds; | ||
143 | |||
144 | /** | ||
145 | * Size of the @e ready_fds array | ||
146 | */ | ||
147 | unsigned int ready_fds_len; | ||
148 | |||
149 | /** | ||
150 | * Do we own the network and file handles referenced by the FdInfo | 138 | * Do we own the network and file handles referenced by the FdInfo |
151 | * structs in the fds array. This will only be GNUNET_YES if the | 139 | * structs in the fds array. This will only be GNUNET_YES if the |
152 | * task was created by the #GNUNET_SCHEDULER_add_select function. | 140 | * task was created by the #GNUNET_SCHEDULER_add_select function. |
@@ -347,11 +335,6 @@ static struct GNUNET_SCHEDULER_Task *ready_tail[GNUNET_SCHEDULER_PRIORITY_COUNT] | |||
347 | static unsigned int ready_count; | 335 | static unsigned int ready_count; |
348 | 336 | ||
349 | /** | 337 | /** |
350 | * How many tasks have we run so far? | ||
351 | */ | ||
352 | static unsigned long long tasks_run; | ||
353 | |||
354 | /** | ||
355 | * Priority of the task running right now. Only | 338 | * Priority of the task running right now. Only |
356 | * valid while a task is running. | 339 | * valid while a task is running. |
357 | */ | 340 | */ |
@@ -561,10 +544,6 @@ destroy_task (struct GNUNET_SCHEDULER_Task *t) | |||
561 | { | 544 | { |
562 | GNUNET_array_grow (t->fds, t->fds_len, 0); | 545 | GNUNET_array_grow (t->fds, t->fds_len, 0); |
563 | } | 546 | } |
564 | if (t->ready_fds_len > 0) | ||
565 | { | ||
566 | GNUNET_array_grow (t->ready_fds, t->ready_fds_len, 0); | ||
567 | } | ||
568 | #if EXECINFO | 547 | #if EXECINFO |
569 | GNUNET_free (t->backtrace_strings); | 548 | GNUNET_free (t->backtrace_strings); |
570 | #endif | 549 | #endif |
@@ -2020,7 +1999,6 @@ GNUNET_SCHEDULER_run_from_driver (struct GNUNET_SCHEDULER_Handle *sh) | |||
2020 | active_task = NULL; | 1999 | active_task = NULL; |
2021 | dump_backtrace (pos); | 2000 | dump_backtrace (pos); |
2022 | destroy_task (pos); | 2001 | destroy_task (pos); |
2023 | tasks_run++; | ||
2024 | } | 2002 | } |
2025 | shutdown_if_no_lifeness (); | 2003 | shutdown_if_no_lifeness (); |
2026 | if (0 == ready_count) | 2004 | if (0 == ready_count) |