aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-01-10 17:38:29 +0100
committerChristian Grothoff <christian@grothoff.org>2017-01-10 17:38:29 +0100
commitbf5f92d9429a556f68c950df7be3dc25907e0d6c (patch)
tree640b74c6a12a53ccac9925eb05b9e6d644d7e748 /src/core
parent06c0c503acd9d523d4d18eeac862222a744db2ab (diff)
downloadgnunet-bf5f92d9429a556f68c950df7be3dc25907e0d6c.tar.gz
gnunet-bf5f92d9429a556f68c950df7be3dc25907e0d6c.zip
rename connecT -> connect now that the old API is dead
Diffstat (limited to 'src/core')
-rw-r--r--src/core/core_api.c16
-rw-r--r--src/core/core_api_monitor_peers.c2
-rw-r--r--src/core/test_core_api.c6
-rw-r--r--src/core/test_core_api_reliability.c6
-rw-r--r--src/core/test_core_api_send_to_self.c4
-rw-r--r--src/core/test_core_api_start_only.c12
-rw-r--r--src/core/test_core_quota_compliance.c6
7 files changed, 26 insertions, 26 deletions
diff --git a/src/core/core_api.c b/src/core/core_api.c
index cf7924a0d..ace80b952 100644
--- a/src/core/core_api.c
+++ b/src/core/core_api.c
@@ -97,12 +97,12 @@ struct GNUNET_CORE_Handle
97 /** 97 /**
98 * Function to call whenever we're notified about a peer connecting. 98 * Function to call whenever we're notified about a peer connecting.
99 */ 99 */
100 GNUNET_CORE_ConnecTEventHandler connects; 100 GNUNET_CORE_ConnectEventHandler connects;
101 101
102 /** 102 /**
103 * Function to call whenever we're notified about a peer disconnecting. 103 * Function to call whenever we're notified about a peer disconnecting.
104 */ 104 */
105 GNUNET_CORE_DisconnecTEventHandler disconnects; 105 GNUNET_CORE_DisconnectEventHandler disconnects;
106 106
107 /** 107 /**
108 * Function handlers for messages of particular type. 108 * Function handlers for messages of particular type.
@@ -734,7 +734,7 @@ reconnect (struct GNUNET_CORE_Handle *h)
734 uint16_t *ts; 734 uint16_t *ts;
735 735
736 GNUNET_assert (NULL == h->mq); 736 GNUNET_assert (NULL == h->mq);
737 h->mq = GNUNET_CLIENT_connecT (h->cfg, 737 h->mq = GNUNET_CLIENT_connect (h->cfg,
738 "core", 738 "core",
739 handlers, 739 handlers,
740 &handle_mq_error, 740 &handle_mq_error,
@@ -773,11 +773,11 @@ reconnect (struct GNUNET_CORE_Handle *h)
773 * NULL on error (in this case, init is never called) 773 * NULL on error (in this case, init is never called)
774 */ 774 */
775struct GNUNET_CORE_Handle * 775struct GNUNET_CORE_Handle *
776GNUNET_CORE_connecT (const struct GNUNET_CONFIGURATION_Handle *cfg, 776GNUNET_CORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
777 void *cls, 777 void *cls,
778 GNUNET_CORE_StartupCallback init, 778 GNUNET_CORE_StartupCallback init,
779 GNUNET_CORE_ConnecTEventHandler connects, 779 GNUNET_CORE_ConnectEventHandler connects,
780 GNUNET_CORE_DisconnecTEventHandler disconnects, 780 GNUNET_CORE_DisconnectEventHandler disconnects,
781 const struct GNUNET_MQ_MessageHandler *handlers) 781 const struct GNUNET_MQ_MessageHandler *handlers)
782{ 782{
783 struct GNUNET_CORE_Handle *h; 783 struct GNUNET_CORE_Handle *h;
@@ -810,7 +810,7 @@ GNUNET_CORE_connecT (const struct GNUNET_CONFIGURATION_Handle *cfg,
810 reconnect (h); 810 reconnect (h);
811 if (NULL == h->mq) 811 if (NULL == h->mq)
812 { 812 {
813 GNUNET_CORE_disconnecT (h); 813 GNUNET_CORE_disconnect (h);
814 return NULL; 814 return NULL;
815 } 815 }
816 return h; 816 return h;
@@ -823,7 +823,7 @@ GNUNET_CORE_connecT (const struct GNUNET_CONFIGURATION_Handle *cfg,
823 * @param handle connection to core to disconnect 823 * @param handle connection to core to disconnect
824 */ 824 */
825void 825void
826GNUNET_CORE_disconnecT (struct GNUNET_CORE_Handle *handle) 826GNUNET_CORE_disconnect (struct GNUNET_CORE_Handle *handle)
827{ 827{
828 LOG (GNUNET_ERROR_TYPE_DEBUG, 828 LOG (GNUNET_ERROR_TYPE_DEBUG,
829 "Disconnecting from CORE service\n"); 829 "Disconnecting from CORE service\n");
diff --git a/src/core/core_api_monitor_peers.c b/src/core/core_api_monitor_peers.c
index 1455eb2b0..796fdb9d5 100644
--- a/src/core/core_api_monitor_peers.c
+++ b/src/core/core_api_monitor_peers.c
@@ -127,7 +127,7 @@ reconnect (struct GNUNET_CORE_MonitorHandle *mh)
127 if (NULL != mh->mq) 127 if (NULL != mh->mq)
128 GNUNET_MQ_destroy (mh->mq); 128 GNUNET_MQ_destroy (mh->mq);
129 /* FIXME: use backoff? */ 129 /* FIXME: use backoff? */
130 mh->mq = GNUNET_CLIENT_connecT (mh->cfg, 130 mh->mq = GNUNET_CLIENT_connect (mh->cfg,
131 "core", 131 "core",
132 handlers, 132 handlers,
133 &handle_mq_error, 133 &handle_mq_error,
diff --git a/src/core/test_core_api.c b/src/core/test_core_api.c
index e6a113b52..847ba6e75 100644
--- a/src/core/test_core_api.c
+++ b/src/core/test_core_api.c
@@ -92,7 +92,7 @@ terminate_peer (struct PeerContext *p)
92{ 92{
93 if (NULL != p->ch) 93 if (NULL != p->ch)
94 { 94 {
95 GNUNET_CORE_disconnecT (p->ch); 95 GNUNET_CORE_disconnect (p->ch);
96 p->ch = NULL; 96 p->ch = NULL;
97 } 97 }
98 if (NULL != p->ghh) 98 if (NULL != p->ghh)
@@ -243,7 +243,7 @@ init_notify (void *cls,
243 GNUNET_assert (ok == 2); 243 GNUNET_assert (ok == 2);
244 OKPP; 244 OKPP;
245 /* connect p2 */ 245 /* connect p2 */
246 p2.ch = GNUNET_CORE_connecT (p2.cfg, 246 p2.ch = GNUNET_CORE_connect (p2.cfg,
247 &p2, 247 &p2,
248 &init_notify, 248 &init_notify,
249 &connect_notify, 249 &connect_notify,
@@ -317,7 +317,7 @@ run (void *cls,
317 (GNUNET_TIME_UNIT_SECONDS, 300), 317 (GNUNET_TIME_UNIT_SECONDS, 300),
318 &terminate_task_error, NULL); 318 &terminate_task_error, NULL);
319 p1.ch = 319 p1.ch =
320 GNUNET_CORE_connecT (p1.cfg, 320 GNUNET_CORE_connect (p1.cfg,
321 &p1, 321 &p1,
322 &init_notify, 322 &init_notify,
323 &connect_notify, 323 &connect_notify,
diff --git a/src/core/test_core_api_reliability.c b/src/core/test_core_api_reliability.c
index cd2bcad83..900c9f732 100644
--- a/src/core/test_core_api_reliability.c
+++ b/src/core/test_core_api_reliability.c
@@ -103,7 +103,7 @@ terminate_peer (struct PeerContext *p)
103{ 103{
104 if (NULL != p->ch) 104 if (NULL != p->ch)
105 { 105 {
106 GNUNET_CORE_disconnecT (p->ch); 106 GNUNET_CORE_disconnect (p->ch);
107 p->ch = NULL; 107 p->ch = NULL;
108 } 108 }
109 if (NULL != p->ghh) 109 if (NULL != p->ghh)
@@ -341,7 +341,7 @@ init_notify (void *cls,
341 OKPP; 341 OKPP;
342 /* connect p2 */ 342 /* connect p2 */
343 GNUNET_assert (NULL != 343 GNUNET_assert (NULL !=
344 (p2.ch = GNUNET_CORE_connecT (p2.cfg, 344 (p2.ch = GNUNET_CORE_connect (p2.cfg,
345 &p2, 345 &p2,
346 &init_notify, 346 &init_notify,
347 &connect_notify, 347 &connect_notify,
@@ -464,7 +464,7 @@ run (void *cls,
464 NULL); 464 NULL);
465 465
466 GNUNET_assert (NULL != 466 GNUNET_assert (NULL !=
467 (p1.ch = GNUNET_CORE_connecT (p1.cfg, 467 (p1.ch = GNUNET_CORE_connect (p1.cfg,
468 &p1, 468 &p1,
469 &init_notify, 469 &init_notify,
470 &connect_notify, 470 &connect_notify,
diff --git a/src/core/test_core_api_send_to_self.c b/src/core/test_core_api_send_to_self.c
index d29da651b..5cfc8b35f 100644
--- a/src/core/test_core_api_send_to_self.c
+++ b/src/core/test_core_api_send_to_self.c
@@ -65,7 +65,7 @@ cleanup (void *cls)
65 } 65 }
66 if (NULL != core) 66 if (NULL != core)
67 { 67 {
68 GNUNET_CORE_disconnecT (core); 68 GNUNET_CORE_disconnect (core);
69 core = NULL; 69 core = NULL;
70 } 70 }
71 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 71 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -159,7 +159,7 @@ run (void *cls,
159 }; 159 };
160 160
161 core = 161 core =
162 GNUNET_CORE_connecT (cfg, 162 GNUNET_CORE_connect (cfg,
163 NULL, 163 NULL,
164 &init, 164 &init,
165 &connect_cb, 165 &connect_cb,
diff --git a/src/core/test_core_api_start_only.c b/src/core/test_core_api_start_only.c
index 6abc3cc89..31e300b14 100644
--- a/src/core/test_core_api_start_only.c
+++ b/src/core/test_core_api_start_only.c
@@ -74,9 +74,9 @@ static struct GNUNET_MQ_MessageHandler handlers[] = {
74static void 74static void
75shutdown_task (void *cls) 75shutdown_task (void *cls)
76{ 76{
77 GNUNET_CORE_disconnecT (p1.ch); 77 GNUNET_CORE_disconnect (p1.ch);
78 p1.ch = NULL; 78 p1.ch = NULL;
79 GNUNET_CORE_disconnecT (p2.ch); 79 GNUNET_CORE_disconnect (p2.ch);
80 p2.ch = NULL; 80 p2.ch = NULL;
81 ok = 0; 81 ok = 0;
82} 82}
@@ -91,7 +91,7 @@ init_notify (void *cls,
91 if (p == &p1) 91 if (p == &p1)
92 { 92 {
93 /* connect p2 */ 93 /* connect p2 */
94 p2.ch = GNUNET_CORE_connecT (p2.cfg, 94 p2.ch = GNUNET_CORE_connect (p2.cfg,
95 &p2, 95 &p2,
96 &init_notify, 96 &init_notify,
97 &connect_notify, 97 &connect_notify,
@@ -140,12 +140,12 @@ timeout_task (void *cls)
140 "Timeout.\n"); 140 "Timeout.\n");
141 if (NULL != p1.ch) 141 if (NULL != p1.ch)
142 { 142 {
143 GNUNET_CORE_disconnecT (p1.ch); 143 GNUNET_CORE_disconnect (p1.ch);
144 p1.ch = NULL; 144 p1.ch = NULL;
145 } 145 }
146 if (NULL != p2.ch) 146 if (NULL != p2.ch)
147 { 147 {
148 GNUNET_CORE_disconnecT (p2.ch); 148 GNUNET_CORE_disconnect (p2.ch);
149 p2.ch = NULL; 149 p2.ch = NULL;
150 } 150 }
151 ok = 42; 151 ok = 42;
@@ -168,7 +168,7 @@ run (void *cls,
168 TIMEOUT), 168 TIMEOUT),
169 &timeout_task, 169 &timeout_task,
170 NULL); 170 NULL);
171 p1.ch = GNUNET_CORE_connecT (p1.cfg, 171 p1.ch = GNUNET_CORE_connect (p1.cfg,
172 &p1, 172 &p1,
173 &init_notify, 173 &init_notify,
174 &connect_notify, 174 &connect_notify,
diff --git a/src/core/test_core_quota_compliance.c b/src/core/test_core_quota_compliance.c
index 4dee958f2..dcc33288d 100644
--- a/src/core/test_core_quota_compliance.c
+++ b/src/core/test_core_quota_compliance.c
@@ -117,7 +117,7 @@ terminate_peer (struct PeerContext *p)
117{ 117{
118 if (NULL != p->ch) 118 if (NULL != p->ch)
119 { 119 {
120 GNUNET_CORE_disconnecT (p->ch); 120 GNUNET_CORE_disconnect (p->ch);
121 p->ch = NULL; 121 p->ch = NULL;
122 } 122 }
123 if (NULL != p->ghh) 123 if (NULL != p->ghh)
@@ -480,7 +480,7 @@ init_notify (void *cls,
480 GNUNET_assert (ok == 2); 480 GNUNET_assert (ok == 2);
481 OKPP; 481 OKPP;
482 /* connect p2 */ 482 /* connect p2 */
483 p2.ch = GNUNET_CORE_connecT (p2.cfg, 483 p2.ch = GNUNET_CORE_connect (p2.cfg,
484 &p2, 484 &p2,
485 &init_notify, 485 &init_notify,
486 &connect_notify, 486 &connect_notify,
@@ -653,7 +653,7 @@ run (void *cls,
653 "WAN_QUOTA_OUT", 653 "WAN_QUOTA_OUT",
654 &current_quota_p2_out)); 654 &current_quota_p2_out));
655 655
656 p1.ch = GNUNET_CORE_connecT (p1.cfg, 656 p1.ch = GNUNET_CORE_connect (p1.cfg,
657 &p1, 657 &p1,
658 &init_notify, 658 &init_notify,
659 &connect_notify, 659 &connect_notify,