diff options
author | Bart Polot <bart@net.in.tum.de> | 2014-05-07 12:07:50 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2014-05-07 12:07:50 +0000 |
commit | 5925392a4a7cedef74e19ceb65c829707c4508f8 (patch) | |
tree | 12d3a1a9e2d12df91e3dd9e2c17f353b798235d6 /src | |
parent | b3c9c0eae35e6419088b647791b85d0da93b1f4d (diff) | |
download | gnunet-5925392a4a7cedef74e19ceb65c829707c4508f8.tar.gz gnunet-5925392a4a7cedef74e19ceb65c829707c4508f8.zip |
- update renaming to new version of scalarproduct
Diffstat (limited to 'src')
-rw-r--r-- | src/scalarproduct/gnunet-service-scalarproduct.c | 90 |
1 files changed, 45 insertions, 45 deletions
diff --git a/src/scalarproduct/gnunet-service-scalarproduct.c b/src/scalarproduct/gnunet-service-scalarproduct.c index 75881afed..5c702d5e1 100644 --- a/src/scalarproduct/gnunet-service-scalarproduct.c +++ b/src/scalarproduct/gnunet-service-scalarproduct.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #include <gcrypt.h> | 28 | #include <gcrypt.h> |
29 | #include "gnunet_util_lib.h" | 29 | #include "gnunet_util_lib.h" |
30 | #include "gnunet_core_service.h" | 30 | #include "gnunet_core_service.h" |
31 | #include "gnunet_mesh_service.h" | 31 | #include "gnunet_cadet_service.h" |
32 | #include "gnunet_applications.h" | 32 | #include "gnunet_applications.h" |
33 | #include "gnunet_protocols.h" | 33 | #include "gnunet_protocols.h" |
34 | #include "gnunet_scalarproduct_service.h" | 34 | #include "gnunet_scalarproduct_service.h" |
@@ -205,7 +205,7 @@ struct ServiceSession | |||
205 | /** | 205 | /** |
206 | * My transmit handle for the current message to a alice/bob | 206 | * My transmit handle for the current message to a alice/bob |
207 | */ | 207 | */ |
208 | struct GNUNET_MESH_TransmitHandle * service_transmit_handle; | 208 | struct GNUNET_CADET_TransmitHandle * service_transmit_handle; |
209 | 209 | ||
210 | /** | 210 | /** |
211 | * My transmit handle for the current message to the client | 211 | * My transmit handle for the current message to the client |
@@ -213,9 +213,9 @@ struct ServiceSession | |||
213 | struct GNUNET_SERVER_TransmitHandle * client_transmit_handle; | 213 | struct GNUNET_SERVER_TransmitHandle * client_transmit_handle; |
214 | 214 | ||
215 | /** | 215 | /** |
216 | * channel-handle associated with our mesh handle | 216 | * channel-handle associated with our cadet handle |
217 | */ | 217 | */ |
218 | struct GNUNET_MESH_Channel * channel; | 218 | struct GNUNET_CADET_Channel * channel; |
219 | 219 | ||
220 | /** | 220 | /** |
221 | * Handle to a task that sends a msg to the our client | 221 | * Handle to a task that sends a msg to the our client |
@@ -262,7 +262,7 @@ const struct GNUNET_CONFIGURATION_Handle * cfg; | |||
262 | /** | 262 | /** |
263 | * Handle to the core service (NULL until we've connected to it). | 263 | * Handle to the core service (NULL until we've connected to it). |
264 | */ | 264 | */ |
265 | static struct GNUNET_MESH_Handle *my_mesh; | 265 | static struct GNUNET_CADET_Handle *my_cadet; |
266 | 266 | ||
267 | /** | 267 | /** |
268 | * The identity of this host. | 268 | * The identity of this host. |
@@ -312,7 +312,7 @@ static struct ServiceSession * from_service_head; | |||
312 | static struct ServiceSession * from_service_tail; | 312 | static struct ServiceSession * from_service_tail; |
313 | 313 | ||
314 | /** | 314 | /** |
315 | * Certain events (callbacks for server & mesh operations) must not be queued after shutdown. | 315 | * Certain events (callbacks for server & cadet operations) must not be queued after shutdown. |
316 | */ | 316 | */ |
317 | static int do_shutdown; | 317 | static int do_shutdown; |
318 | 318 | ||
@@ -542,9 +542,9 @@ handle_client_disconnect (void *cls, | |||
542 | if (!(session->role == BOB && 0/*//TODO: if session concluded*/)) { | 542 | if (!(session->role == BOB && 0/*//TODO: if session concluded*/)) { |
543 | //we MUST terminate any client message underway | 543 | //we MUST terminate any client message underway |
544 | if (session->service_transmit_handle && session->channel) | 544 | if (session->service_transmit_handle && session->channel) |
545 | GNUNET_MESH_notify_transmit_ready_cancel (session->service_transmit_handle); | 545 | GNUNET_CADET_notify_transmit_ready_cancel (session->service_transmit_handle); |
546 | if (session->channel && 0/* //TODO: waiting for service response */) | 546 | if (session->channel && 0/* //TODO: waiting for service response */) |
547 | GNUNET_MESH_channel_destroy (session->channel); | 547 | GNUNET_CADET_channel_destroy (session->channel); |
548 | } | 548 | } |
549 | if (GNUNET_SCHEDULER_NO_TASK != session->client_notification_task) { | 549 | if (GNUNET_SCHEDULER_NO_TASK != session->client_notification_task) { |
550 | GNUNET_SCHEDULER_cancel (session->client_notification_task); | 550 | GNUNET_SCHEDULER_cancel (session->client_notification_task); |
@@ -660,8 +660,8 @@ prepare_alices_cyrptodata_message (void *cls) | |||
660 | session->msg = (struct GNUNET_MessageHeader *) msg; | 660 | session->msg = (struct GNUNET_MessageHeader *) msg; |
661 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, _ ("Transmitting service request.\n")); | 661 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, _ ("Transmitting service request.\n")); |
662 | 662 | ||
663 | //transmit via mesh messaging | 663 | //transmit via cadet messaging |
664 | session->service_transmit_handle = GNUNET_MESH_notify_transmit_ready (session->channel, GNUNET_YES, | 664 | session->service_transmit_handle = GNUNET_CADET_notify_transmit_ready (session->channel, GNUNET_YES, |
665 | GNUNET_TIME_UNIT_FOREVER_REL, | 665 | GNUNET_TIME_UNIT_FOREVER_REL, |
666 | msg_length, | 666 | msg_length, |
667 | &do_send_message, | 667 | &do_send_message, |
@@ -717,7 +717,7 @@ prepare_bobs_cryptodata_message_multipart (void *cls) | |||
717 | session->transferred_element_count += todo_count; | 717 | session->transferred_element_count += todo_count; |
718 | session->msg = (struct GNUNET_MessageHeader *) msg; | 718 | session->msg = (struct GNUNET_MessageHeader *) msg; |
719 | session->service_transmit_handle = | 719 | session->service_transmit_handle = |
720 | GNUNET_MESH_notify_transmit_ready (session->channel, | 720 | GNUNET_CADET_notify_transmit_ready (session->channel, |
721 | GNUNET_YES, | 721 | GNUNET_YES, |
722 | GNUNET_TIME_UNIT_FOREVER_REL, | 722 | GNUNET_TIME_UNIT_FOREVER_REL, |
723 | msg_length, | 723 | msg_length, |
@@ -725,7 +725,7 @@ prepare_bobs_cryptodata_message_multipart (void *cls) | |||
725 | session); | 725 | session); |
726 | //disconnect our client | 726 | //disconnect our client |
727 | if (NULL == session->service_transmit_handle) { | 727 | if (NULL == session->service_transmit_handle) { |
728 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _ ("Could not send service-response message via mesh!)\n")); | 728 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _ ("Could not send service-response message via cadet!)\n")); |
729 | 729 | ||
730 | session->response->client_notification_task = | 730 | session->response->client_notification_task = |
731 | GNUNET_SCHEDULER_add_now (&prepare_client_end_notification, | 731 | GNUNET_SCHEDULER_add_now (&prepare_client_end_notification, |
@@ -805,7 +805,7 @@ prepare_bobs_cryptodata_message (void *cls, | |||
805 | 805 | ||
806 | session->msg = (struct GNUNET_MessageHeader *) msg; | 806 | session->msg = (struct GNUNET_MessageHeader *) msg; |
807 | session->service_transmit_handle = | 807 | session->service_transmit_handle = |
808 | GNUNET_MESH_notify_transmit_ready (session->channel, | 808 | GNUNET_CADET_notify_transmit_ready (session->channel, |
809 | GNUNET_YES, | 809 | GNUNET_YES, |
810 | GNUNET_TIME_UNIT_FOREVER_REL, | 810 | GNUNET_TIME_UNIT_FOREVER_REL, |
811 | msg_length, | 811 | msg_length, |
@@ -813,7 +813,7 @@ prepare_bobs_cryptodata_message (void *cls, | |||
813 | session); | 813 | session); |
814 | //disconnect our client | 814 | //disconnect our client |
815 | if (NULL == session->service_transmit_handle) { | 815 | if (NULL == session->service_transmit_handle) { |
816 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _ ("Could not send service-response message via mesh!)\n")); | 816 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _ ("Could not send service-response message via cadet!)\n")); |
817 | 817 | ||
818 | session->response->client_notification_task = | 818 | session->response->client_notification_task = |
819 | GNUNET_SCHEDULER_add_now (&prepare_client_end_notification, | 819 | GNUNET_SCHEDULER_add_now (&prepare_client_end_notification, |
@@ -1265,8 +1265,8 @@ prepare_alices_computation_request (struct ServiceSession * session) | |||
1265 | session->msg = (struct GNUNET_MessageHeader *) msg; | 1265 | session->msg = (struct GNUNET_MessageHeader *) msg; |
1266 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, _ ("Transmitting service request.\n")); | 1266 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, _ ("Transmitting service request.\n")); |
1267 | 1267 | ||
1268 | //transmit via mesh messaging | 1268 | //transmit via cadet messaging |
1269 | session->service_transmit_handle = GNUNET_MESH_notify_transmit_ready (session->channel, GNUNET_YES, | 1269 | session->service_transmit_handle = GNUNET_CADET_notify_transmit_ready (session->channel, GNUNET_YES, |
1270 | GNUNET_TIME_UNIT_FOREVER_REL, | 1270 | GNUNET_TIME_UNIT_FOREVER_REL, |
1271 | sizeof (struct GNUNET_SCALARPRODUCT_service_request), | 1271 | sizeof (struct GNUNET_SCALARPRODUCT_service_request), |
1272 | &do_send_message, | 1272 | &do_send_message, |
@@ -1330,8 +1330,8 @@ prepare_alices_cyrptodata_message_multipart (void *cls) | |||
1330 | session->msg = (struct GNUNET_MessageHeader *) msg; | 1330 | session->msg = (struct GNUNET_MessageHeader *) msg; |
1331 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, _ ("Transmitting service request.\n")); | 1331 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, _ ("Transmitting service request.\n")); |
1332 | 1332 | ||
1333 | //transmit via mesh messaging | 1333 | //transmit via cadet messaging |
1334 | session->service_transmit_handle = GNUNET_MESH_notify_transmit_ready (session->channel, GNUNET_YES, | 1334 | session->service_transmit_handle = GNUNET_CADET_notify_transmit_ready (session->channel, GNUNET_YES, |
1335 | GNUNET_TIME_UNIT_FOREVER_REL, | 1335 | GNUNET_TIME_UNIT_FOREVER_REL, |
1336 | msg_length, | 1336 | msg_length, |
1337 | &do_send_message, | 1337 | &do_send_message, |
@@ -1404,10 +1404,10 @@ client_request_complete_alice (struct ServiceSession * session) | |||
1404 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 1404 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
1405 | _ ("Creating new channel for session with key %s.\n"), | 1405 | _ ("Creating new channel for session with key %s.\n"), |
1406 | GNUNET_h2s (&session->session_id)); | 1406 | GNUNET_h2s (&session->session_id)); |
1407 | session->channel = GNUNET_MESH_channel_create (my_mesh, session, | 1407 | session->channel = GNUNET_CADET_channel_create (my_cadet, session, |
1408 | &session->peer, | 1408 | &session->peer, |
1409 | GNUNET_APPLICATION_TYPE_SCALARPRODUCT, | 1409 | GNUNET_APPLICATION_TYPE_SCALARPRODUCT, |
1410 | GNUNET_MESH_OPTION_RELIABLE); | 1410 | GNUNET_CADET_OPTION_RELIABLE); |
1411 | if (NULL == session->channel) { | 1411 | if (NULL == session->channel) { |
1412 | session->response->client_notification_task = | 1412 | session->response->client_notification_task = |
1413 | GNUNET_SCHEDULER_add_now (&prepare_client_end_notification, | 1413 | GNUNET_SCHEDULER_add_now (&prepare_client_end_notification, |
@@ -1628,9 +1628,9 @@ handle_client_message (void *cls, | |||
1628 | */ | 1628 | */ |
1629 | static void * | 1629 | static void * |
1630 | cb_channel_incoming (void *cls, | 1630 | cb_channel_incoming (void *cls, |
1631 | struct GNUNET_MESH_Channel *channel, | 1631 | struct GNUNET_CADET_Channel *channel, |
1632 | const struct GNUNET_PeerIdentity *initiator, | 1632 | const struct GNUNET_PeerIdentity *initiator, |
1633 | uint32_t port, enum GNUNET_MESH_ChannelOption options) | 1633 | uint32_t port, enum GNUNET_CADET_ChannelOption options) |
1634 | { | 1634 | { |
1635 | struct ServiceSession * c = GNUNET_new (struct ServiceSession); | 1635 | struct ServiceSession * c = GNUNET_new (struct ServiceSession); |
1636 | 1636 | ||
@@ -1649,16 +1649,16 @@ cb_channel_incoming (void *cls, | |||
1649 | * Function called whenever a channel is destroyed. Should clean up | 1649 | * Function called whenever a channel is destroyed. Should clean up |
1650 | * any associated state. | 1650 | * any associated state. |
1651 | * | 1651 | * |
1652 | * It must NOT call GNUNET_MESH_channel_destroy on the channel. | 1652 | * It must NOT call GNUNET_CADET_channel_destroy on the channel. |
1653 | * | 1653 | * |
1654 | * @param cls closure (set from GNUNET_MESH_connect) | 1654 | * @param cls closure (set from GNUNET_CADET_connect) |
1655 | * @param channel connection to the other end (henceforth invalid) | 1655 | * @param channel connection to the other end (henceforth invalid) |
1656 | * @param channel_ctx place where local state associated | 1656 | * @param channel_ctx place where local state associated |
1657 | * with the channel is stored | 1657 | * with the channel is stored |
1658 | */ | 1658 | */ |
1659 | static void | 1659 | static void |
1660 | cb_channel_destruction (void *cls, | 1660 | cb_channel_destruction (void *cls, |
1661 | const struct GNUNET_MESH_Channel *channel, | 1661 | const struct GNUNET_CADET_Channel *channel, |
1662 | void *channel_ctx) | 1662 | void *channel_ctx) |
1663 | { | 1663 | { |
1664 | struct ServiceSession * session = channel_ctx; | 1664 | struct ServiceSession * session = channel_ctx; |
@@ -1814,7 +1814,7 @@ compute_scalar_product (struct ServiceSession * session) | |||
1814 | /** | 1814 | /** |
1815 | * Handle a multipart-chunk of a request from another service to calculate a scalarproduct with us. | 1815 | * Handle a multipart-chunk of a request from another service to calculate a scalarproduct with us. |
1816 | * | 1816 | * |
1817 | * @param cls closure (set from #GNUNET_MESH_connect) | 1817 | * @param cls closure (set from #GNUNET_CADET_connect) |
1818 | * @param channel connection to the other end | 1818 | * @param channel connection to the other end |
1819 | * @param channel_ctx place to store local state associated with the channel | 1819 | * @param channel_ctx place to store local state associated with the channel |
1820 | * @param message the actual message | 1820 | * @param message the actual message |
@@ -1823,7 +1823,7 @@ compute_scalar_product (struct ServiceSession * session) | |||
1823 | */ | 1823 | */ |
1824 | static int | 1824 | static int |
1825 | handle_alices_cyrptodata_message_multipart (void *cls, | 1825 | handle_alices_cyrptodata_message_multipart (void *cls, |
1826 | struct GNUNET_MESH_Channel * channel, | 1826 | struct GNUNET_CADET_Channel * channel, |
1827 | void **channel_ctx, | 1827 | void **channel_ctx, |
1828 | const struct GNUNET_MessageHeader * message) | 1828 | const struct GNUNET_MessageHeader * message) |
1829 | { | 1829 | { |
@@ -1885,7 +1885,7 @@ except: | |||
1885 | /** | 1885 | /** |
1886 | * Handle a request from another service to calculate a scalarproduct with us. | 1886 | * Handle a request from another service to calculate a scalarproduct with us. |
1887 | * | 1887 | * |
1888 | * @param cls closure (set from #GNUNET_MESH_connect) | 1888 | * @param cls closure (set from #GNUNET_CADET_connect) |
1889 | * @param channel connection to the other end | 1889 | * @param channel connection to the other end |
1890 | * @param channel_ctx place to store local state associated with the channel | 1890 | * @param channel_ctx place to store local state associated with the channel |
1891 | * @param message the actual message | 1891 | * @param message the actual message |
@@ -1894,7 +1894,7 @@ except: | |||
1894 | */ | 1894 | */ |
1895 | static int | 1895 | static int |
1896 | handle_alices_cyrptodata_message (void *cls, | 1896 | handle_alices_cyrptodata_message (void *cls, |
1897 | struct GNUNET_MESH_Channel * channel, | 1897 | struct GNUNET_CADET_Channel * channel, |
1898 | void **channel_ctx, | 1898 | void **channel_ctx, |
1899 | const struct GNUNET_MessageHeader * message) | 1899 | const struct GNUNET_MessageHeader * message) |
1900 | { | 1900 | { |
@@ -1964,7 +1964,7 @@ invalid_msg: | |||
1964 | /** | 1964 | /** |
1965 | * Handle a request from another service to calculate a scalarproduct with us. | 1965 | * Handle a request from another service to calculate a scalarproduct with us. |
1966 | * | 1966 | * |
1967 | * @param cls closure (set from #GNUNET_MESH_connect) | 1967 | * @param cls closure (set from #GNUNET_CADET_connect) |
1968 | * @param channel connection to the other end | 1968 | * @param channel connection to the other end |
1969 | * @param channel_ctx place to store local state associated with the channel | 1969 | * @param channel_ctx place to store local state associated with the channel |
1970 | * @param message the actual message | 1970 | * @param message the actual message |
@@ -1973,7 +1973,7 @@ invalid_msg: | |||
1973 | */ | 1973 | */ |
1974 | static int | 1974 | static int |
1975 | handle_alices_computation_request (void *cls, | 1975 | handle_alices_computation_request (void *cls, |
1976 | struct GNUNET_MESH_Channel * channel, | 1976 | struct GNUNET_CADET_Channel * channel, |
1977 | void **channel_ctx, | 1977 | void **channel_ctx, |
1978 | const struct GNUNET_MessageHeader * message) | 1978 | const struct GNUNET_MessageHeader * message) |
1979 | { | 1979 | { |
@@ -2078,7 +2078,7 @@ invalid_msg: | |||
2078 | /** | 2078 | /** |
2079 | * Handle a multipart chunk of a response we got from another service we wanted to calculate a scalarproduct with. | 2079 | * Handle a multipart chunk of a response we got from another service we wanted to calculate a scalarproduct with. |
2080 | * | 2080 | * |
2081 | * @param cls closure (set from #GNUNET_MESH_connect) | 2081 | * @param cls closure (set from #GNUNET_CADET_connect) |
2082 | * @param channel connection to the other end | 2082 | * @param channel connection to the other end |
2083 | * @param channel_ctx place to store local state associated with the channel | 2083 | * @param channel_ctx place to store local state associated with the channel |
2084 | * @param message the actual message | 2084 | * @param message the actual message |
@@ -2087,7 +2087,7 @@ invalid_msg: | |||
2087 | */ | 2087 | */ |
2088 | static int | 2088 | static int |
2089 | handle_bobs_cryptodata_multipart (void *cls, | 2089 | handle_bobs_cryptodata_multipart (void *cls, |
2090 | struct GNUNET_MESH_Channel * channel, | 2090 | struct GNUNET_CADET_Channel * channel, |
2091 | void **channel_ctx, | 2091 | void **channel_ctx, |
2092 | const struct GNUNET_MessageHeader * message) | 2092 | const struct GNUNET_MessageHeader * message) |
2093 | { | 2093 | { |
@@ -2150,7 +2150,7 @@ invalid_msg: | |||
2150 | /** | 2150 | /** |
2151 | * Handle a response we got from another service we wanted to calculate a scalarproduct with. | 2151 | * Handle a response we got from another service we wanted to calculate a scalarproduct with. |
2152 | * | 2152 | * |
2153 | * @param cls closure (set from #GNUNET_MESH_connect) | 2153 | * @param cls closure (set from #GNUNET_CADET_connect) |
2154 | * @param channel connection to the other end | 2154 | * @param channel connection to the other end |
2155 | * @param channel_ctx place to store local state associated with the channel | 2155 | * @param channel_ctx place to store local state associated with the channel |
2156 | * @param message the actual message | 2156 | * @param message the actual message |
@@ -2159,7 +2159,7 @@ invalid_msg: | |||
2159 | */ | 2159 | */ |
2160 | static int | 2160 | static int |
2161 | handle_bobs_cryptodata_message (void *cls, | 2161 | handle_bobs_cryptodata_message (void *cls, |
2162 | struct GNUNET_MESH_Channel * channel, | 2162 | struct GNUNET_CADET_Channel * channel, |
2163 | void **channel_ctx, | 2163 | void **channel_ctx, |
2164 | const struct GNUNET_MessageHeader * message) | 2164 | const struct GNUNET_MessageHeader * message) |
2165 | { | 2165 | { |
@@ -2247,7 +2247,7 @@ shutdown_task (void *cls, | |||
2247 | // terminate all owned open channels. | 2247 | // terminate all owned open channels. |
2248 | for (session = from_client_head; NULL != session; session = session->next) { | 2248 | for (session = from_client_head; NULL != session; session = session->next) { |
2249 | if ((0/*//TODO: not finalized*/) && (NULL != session->channel)) { | 2249 | if ((0/*//TODO: not finalized*/) && (NULL != session->channel)) { |
2250 | GNUNET_MESH_channel_destroy (session->channel); | 2250 | GNUNET_CADET_channel_destroy (session->channel); |
2251 | session->channel = NULL; | 2251 | session->channel = NULL; |
2252 | } | 2252 | } |
2253 | if (GNUNET_SCHEDULER_NO_TASK != session->client_notification_task) { | 2253 | if (GNUNET_SCHEDULER_NO_TASK != session->client_notification_task) { |
@@ -2261,13 +2261,13 @@ shutdown_task (void *cls, | |||
2261 | } | 2261 | } |
2262 | for (session = from_service_head; NULL != session; session = session->next) | 2262 | for (session = from_service_head; NULL != session; session = session->next) |
2263 | if (NULL != session->channel) { | 2263 | if (NULL != session->channel) { |
2264 | GNUNET_MESH_channel_destroy (session->channel); | 2264 | GNUNET_CADET_channel_destroy (session->channel); |
2265 | session->channel = NULL; | 2265 | session->channel = NULL; |
2266 | } | 2266 | } |
2267 | 2267 | ||
2268 | if (my_mesh) { | 2268 | if (my_cadet) { |
2269 | GNUNET_MESH_disconnect (my_mesh); | 2269 | GNUNET_CADET_disconnect (my_cadet); |
2270 | my_mesh = NULL; | 2270 | my_cadet = NULL; |
2271 | } | 2271 | } |
2272 | } | 2272 | } |
2273 | 2273 | ||
@@ -2290,7 +2290,7 @@ run (void *cls, | |||
2290 | {&handle_client_message_multipart, NULL, GNUNET_MESSAGE_TYPE_SCALARPRODUCT_CLIENT_MUTLIPART, 0}, | 2290 | {&handle_client_message_multipart, NULL, GNUNET_MESSAGE_TYPE_SCALARPRODUCT_CLIENT_MUTLIPART, 0}, |
2291 | {NULL, NULL, 0, 0} | 2291 | {NULL, NULL, 0, 0} |
2292 | }; | 2292 | }; |
2293 | static const struct GNUNET_MESH_MessageHandler mesh_handlers[] = { | 2293 | static const struct GNUNET_CADET_MessageHandler cadet_handlers[] = { |
2294 | { &handle_alices_computation_request, GNUNET_MESSAGE_TYPE_SCALARPRODUCT_ALICE_CRYPTODATA, 0}, | 2294 | { &handle_alices_computation_request, GNUNET_MESSAGE_TYPE_SCALARPRODUCT_ALICE_CRYPTODATA, 0}, |
2295 | { &handle_alices_cyrptodata_message, GNUNET_MESSAGE_TYPE_SCALARPRODUCT_ALICE_CRYPTODATA, 0}, | 2295 | { &handle_alices_cyrptodata_message, GNUNET_MESSAGE_TYPE_SCALARPRODUCT_ALICE_CRYPTODATA, 0}, |
2296 | { &handle_alices_cyrptodata_message_multipart, GNUNET_MESSAGE_TYPE_SCALARPRODUCT_ALICE_CRYPTODATA_MULTIPART, 0}, | 2296 | { &handle_alices_cyrptodata_message_multipart, GNUNET_MESSAGE_TYPE_SCALARPRODUCT_ALICE_CRYPTODATA_MULTIPART, 0}, |
@@ -2319,12 +2319,12 @@ run (void *cls, | |||
2319 | GNUNET_break (GNUNET_OK == | 2319 | GNUNET_break (GNUNET_OK == |
2320 | GNUNET_CRYPTO_get_peer_identity (c, | 2320 | GNUNET_CRYPTO_get_peer_identity (c, |
2321 | &me)); | 2321 | &me)); |
2322 | my_mesh = GNUNET_MESH_connect (c, NULL, | 2322 | my_cadet = GNUNET_CADET_connect (c, NULL, |
2323 | &cb_channel_incoming, | 2323 | &cb_channel_incoming, |
2324 | &cb_channel_destruction, | 2324 | &cb_channel_destruction, |
2325 | mesh_handlers, ports); | 2325 | cadet_handlers, ports); |
2326 | if (!my_mesh) { | 2326 | if (!my_cadet) { |
2327 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _ ("Connect to MESH failed\n")); | 2327 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _ ("Connect to CADET failed\n")); |
2328 | GNUNET_SCHEDULER_shutdown (); | 2328 | GNUNET_SCHEDULER_shutdown (); |
2329 | return; | 2329 | return; |
2330 | } | 2330 | } |