diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-11-11 11:05:29 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-11-11 11:05:29 +0000 |
commit | 1b18069ef2567ffe0994c799d1d179329d629ca9 (patch) | |
tree | 187639305dfb68861d7391648a3ae33329e2a6ad /src/core | |
parent | 9ab4762f15c31781e369db9d1358697f243ee650 (diff) | |
download | gnunet-1b18069ef2567ffe0994c799d1d179329d629ca9.tar.gz gnunet-1b18069ef2567ffe0994c799d1d179329d629ca9.zip |
adding argument to GNUNET_CORE_connect -- not yet implemented
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/core_api.c | 8 | ||||
-rw-r--r-- | src/core/test_core_api.c | 4 | ||||
-rw-r--r-- | src/core/test_core_api_reliability.c | 4 | ||||
-rw-r--r-- | src/core/test_core_api_start_only.c | 4 | ||||
-rw-r--r-- | src/core/test_core_quota_compliance.c | 4 |
5 files changed, 16 insertions, 8 deletions
diff --git a/src/core/core_api.c b/src/core/core_api.c index cb5ba3ecb..a1e6aea65 100644 --- a/src/core/core_api.c +++ b/src/core/core_api.c | |||
@@ -129,6 +129,11 @@ struct GNUNET_CORE_Handle | |||
129 | GNUNET_SCHEDULER_TaskIdentifier reconnect_task; | 129 | GNUNET_SCHEDULER_TaskIdentifier reconnect_task; |
130 | 130 | ||
131 | /** | 131 | /** |
132 | * Number of messages we should queue per target. | ||
133 | */ | ||
134 | unsigned int queue_size; | ||
135 | |||
136 | /** | ||
132 | * Number of entries in the handlers array. | 137 | * Number of entries in the handlers array. |
133 | */ | 138 | */ |
134 | unsigned int hcnt; | 139 | unsigned int hcnt; |
@@ -722,6 +727,7 @@ transmit_start (void *cls, size_t size, void *buf) | |||
722 | * complete (or fail) asynchronously. | 727 | * complete (or fail) asynchronously. |
723 | * | 728 | * |
724 | * @param cfg configuration to use | 729 | * @param cfg configuration to use |
730 | * @param queue_size size of the per-peer message queue | ||
725 | * @param timeout after how long should we give up trying to connect to the core service? | 731 | * @param timeout after how long should we give up trying to connect to the core service? |
726 | * @param cls closure for the various callbacks that follow (including handlers in the handlers array) | 732 | * @param cls closure for the various callbacks that follow (including handlers in the handlers array) |
727 | * @param init callback to call on timeout or once we have successfully | 733 | * @param init callback to call on timeout or once we have successfully |
@@ -743,6 +749,7 @@ transmit_start (void *cls, size_t size, void *buf) | |||
743 | */ | 749 | */ |
744 | struct GNUNET_CORE_Handle * | 750 | struct GNUNET_CORE_Handle * |
745 | GNUNET_CORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, | 751 | GNUNET_CORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, |
752 | unsigned int queue_size, | ||
746 | struct GNUNET_TIME_Relative timeout, | 753 | struct GNUNET_TIME_Relative timeout, |
747 | void *cls, | 754 | void *cls, |
748 | GNUNET_CORE_StartupCallback init, | 755 | GNUNET_CORE_StartupCallback init, |
@@ -769,6 +776,7 @@ GNUNET_CORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
769 | h->inbound_hdr_only = inbound_hdr_only; | 776 | h->inbound_hdr_only = inbound_hdr_only; |
770 | h->outbound_hdr_only = outbound_hdr_only; | 777 | h->outbound_hdr_only = outbound_hdr_only; |
771 | h->handlers = handlers; | 778 | h->handlers = handlers; |
779 | h->queue_size = queue_size; | ||
772 | h->client_notifications = GNUNET_CLIENT_connect ("core", cfg); | 780 | h->client_notifications = GNUNET_CLIENT_connect ("core", cfg); |
773 | if (h->client_notifications == NULL) | 781 | if (h->client_notifications == NULL) |
774 | { | 782 | { |
diff --git a/src/core/test_core_api.c b/src/core/test_core_api.c index 65b09c835..129184587 100644 --- a/src/core/test_core_api.c +++ b/src/core/test_core_api.c | |||
@@ -219,7 +219,7 @@ init_notify (void *cls, | |||
219 | GNUNET_assert (ok == 2); | 219 | GNUNET_assert (ok == 2); |
220 | OKPP; | 220 | OKPP; |
221 | /* connect p2 */ | 221 | /* connect p2 */ |
222 | GNUNET_CORE_connect (p2.cfg, | 222 | GNUNET_CORE_connect (p2.cfg, 1, |
223 | TIMEOUT, | 223 | TIMEOUT, |
224 | &p2, | 224 | &p2, |
225 | &init_notify, | 225 | &init_notify, |
@@ -310,7 +310,7 @@ run (void *cls, | |||
310 | OKPP; | 310 | OKPP; |
311 | setup_peer (&p1, "test_core_api_peer1.conf"); | 311 | setup_peer (&p1, "test_core_api_peer1.conf"); |
312 | setup_peer (&p2, "test_core_api_peer2.conf"); | 312 | setup_peer (&p2, "test_core_api_peer2.conf"); |
313 | GNUNET_CORE_connect (p1.cfg, | 313 | GNUNET_CORE_connect (p1.cfg, 1, |
314 | TIMEOUT, | 314 | TIMEOUT, |
315 | &p1, | 315 | &p1, |
316 | &init_notify, | 316 | &init_notify, |
diff --git a/src/core/test_core_api_reliability.c b/src/core/test_core_api_reliability.c index da67bb4d4..f22a9022e 100644 --- a/src/core/test_core_api_reliability.c +++ b/src/core/test_core_api_reliability.c | |||
@@ -365,7 +365,7 @@ init_notify (void *cls, | |||
365 | GNUNET_assert (ok == 2); | 365 | GNUNET_assert (ok == 2); |
366 | OKPP; | 366 | OKPP; |
367 | /* connect p2 */ | 367 | /* connect p2 */ |
368 | GNUNET_CORE_connect (p2.cfg, | 368 | GNUNET_CORE_connect (p2.cfg, 1, |
369 | TIMEOUT, | 369 | TIMEOUT, |
370 | &p2, | 370 | &p2, |
371 | &init_notify, | 371 | &init_notify, |
@@ -455,7 +455,7 @@ run (void *cls, | |||
455 | OKPP; | 455 | OKPP; |
456 | setup_peer (&p1, "test_core_api_peer1.conf"); | 456 | setup_peer (&p1, "test_core_api_peer1.conf"); |
457 | setup_peer (&p2, "test_core_api_peer2.conf"); | 457 | setup_peer (&p2, "test_core_api_peer2.conf"); |
458 | GNUNET_CORE_connect (p1.cfg, | 458 | GNUNET_CORE_connect (p1.cfg, 1, |
459 | TIMEOUT, | 459 | TIMEOUT, |
460 | &p1, | 460 | &p1, |
461 | &init_notify, | 461 | &init_notify, |
diff --git a/src/core/test_core_api_start_only.c b/src/core/test_core_api_start_only.c index da7217f39..e39179196 100644 --- a/src/core/test_core_api_start_only.c +++ b/src/core/test_core_api_start_only.c | |||
@@ -125,7 +125,7 @@ init_notify (void *cls, | |||
125 | if (cls == &p1) | 125 | if (cls == &p1) |
126 | { | 126 | { |
127 | /* connect p2 */ | 127 | /* connect p2 */ |
128 | GNUNET_CORE_connect (p2.cfg, | 128 | GNUNET_CORE_connect (p2.cfg, 1, |
129 | TIMEOUT, | 129 | TIMEOUT, |
130 | &p2, | 130 | &p2, |
131 | &init_notify, | 131 | &init_notify, |
@@ -172,7 +172,7 @@ run (void *cls, | |||
172 | OKPP; | 172 | OKPP; |
173 | setup_peer (&p1, "test_core_api_peer1.conf"); | 173 | setup_peer (&p1, "test_core_api_peer1.conf"); |
174 | setup_peer (&p2, "test_core_api_peer2.conf"); | 174 | setup_peer (&p2, "test_core_api_peer2.conf"); |
175 | GNUNET_CORE_connect (p1.cfg, | 175 | GNUNET_CORE_connect (p1.cfg, 1, |
176 | TIMEOUT, | 176 | TIMEOUT, |
177 | &p1, | 177 | &p1, |
178 | &init_notify, | 178 | &init_notify, |
diff --git a/src/core/test_core_quota_compliance.c b/src/core/test_core_quota_compliance.c index 822dc2c46..5a3e3dc14 100644 --- a/src/core/test_core_quota_compliance.c +++ b/src/core/test_core_quota_compliance.c | |||
@@ -452,7 +452,7 @@ init_notify (void *cls, | |||
452 | GNUNET_assert (ok == 2); | 452 | GNUNET_assert (ok == 2); |
453 | OKPP; | 453 | OKPP; |
454 | /* connect p2 */ | 454 | /* connect p2 */ |
455 | GNUNET_CORE_connect (p2.cfg, | 455 | GNUNET_CORE_connect (p2.cfg, 1, |
456 | TIMEOUT, | 456 | TIMEOUT, |
457 | &p2, | 457 | &p2, |
458 | &init_notify, | 458 | &init_notify, |
@@ -533,7 +533,7 @@ run (void *cls, | |||
533 | OKPP; | 533 | OKPP; |
534 | setup_peer (&p1, "test_core_quota_peer1.conf"); | 534 | setup_peer (&p1, "test_core_quota_peer1.conf"); |
535 | setup_peer (&p2, "test_core_quota_peer2.conf"); | 535 | setup_peer (&p2, "test_core_quota_peer2.conf"); |
536 | GNUNET_CORE_connect (p1.cfg, | 536 | GNUNET_CORE_connect (p1.cfg, 1, |
537 | TIMEOUT, | 537 | TIMEOUT, |
538 | &p1, | 538 | &p1, |
539 | &init_notify, | 539 | &init_notify, |