diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-10-07 11:08:40 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-10-07 11:08:40 +0000 |
commit | 93522adc0728de13e94a7b13730781345144e434 (patch) | |
tree | 5e8389010559b5c326909bba7d8b18b858eeab35 /src/core | |
parent | a3247ccf829ff52285721529bbcba00a0da39dcd (diff) | |
download | gnunet-93522adc0728de13e94a7b13730781345144e434.tar.gz gnunet-93522adc0728de13e94a7b13730781345144e434.zip |
removing 'publicKey' argument from CORE init callback
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/core.h | 2 | ||||
-rw-r--r-- | src/core/core_api.c | 6 | ||||
-rw-r--r-- | src/core/gnunet-service-core.c | 3 | ||||
-rw-r--r-- | src/core/gnunet-service-core_clients.c | 2 | ||||
-rw-r--r-- | src/core/test_core_api.c | 3 | ||||
-rw-r--r-- | src/core/test_core_api_preferences.c | 3 | ||||
-rw-r--r-- | src/core/test_core_api_reliability.c | 3 | ||||
-rw-r--r-- | src/core/test_core_api_start_only.c | 3 | ||||
-rw-r--r-- | src/core/test_core_quota_compliance.c | 3 |
9 files changed, 10 insertions, 18 deletions
diff --git a/src/core/core.h b/src/core/core.h index 17a4c8fd4..8c208a2ed 100644 --- a/src/core/core.h +++ b/src/core/core.h | |||
@@ -95,7 +95,7 @@ struct InitReplyMessage | |||
95 | /** | 95 | /** |
96 | * Public key of the local peer. | 96 | * Public key of the local peer. |
97 | */ | 97 | */ |
98 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded publicKey; | 98 | struct GNUNET_PeerIdentity my_identity; |
99 | 99 | ||
100 | }; | 100 | }; |
101 | 101 | ||
diff --git a/src/core/core_api.c b/src/core/core_api.c index 3624a6e7f..24013b7cf 100644 --- a/src/core/core_api.c +++ b/src/core/core_api.c | |||
@@ -870,9 +870,7 @@ main_notify_handler (void *cls, const struct GNUNET_MessageHeader *msg) | |||
870 | trigger_next_request (h, GNUNET_NO); | 870 | trigger_next_request (h, GNUNET_NO); |
871 | } | 871 | } |
872 | h->retry_backoff = GNUNET_TIME_UNIT_MILLISECONDS; | 872 | h->retry_backoff = GNUNET_TIME_UNIT_MILLISECONDS; |
873 | GNUNET_CRYPTO_hash (&m->publicKey, | 873 | h->me = m->my_identity; |
874 | sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), | ||
875 | &h->me.hashPubKey); | ||
876 | if (NULL != (init = h->init)) | 874 | if (NULL != (init = h->init)) |
877 | { | 875 | { |
878 | /* mark so we don't call init on reconnect */ | 876 | /* mark so we don't call init on reconnect */ |
@@ -882,7 +880,7 @@ main_notify_handler (void *cls, const struct GNUNET_MessageHeader *msg) | |||
882 | "Connected to core service of peer `%s'.\n", | 880 | "Connected to core service of peer `%s'.\n", |
883 | GNUNET_i2s (&h->me)); | 881 | GNUNET_i2s (&h->me)); |
884 | #endif | 882 | #endif |
885 | init (h->cls, h, &h->me, &m->publicKey); | 883 | init (h->cls, h, &h->me); |
886 | } | 884 | } |
887 | else | 885 | else |
888 | { | 886 | { |
diff --git a/src/core/gnunet-service-core.c b/src/core/gnunet-service-core.c index 76ed02d2f..34b35f92a 100644 --- a/src/core/gnunet-service-core.c +++ b/src/core/gnunet-service-core.c | |||
@@ -1393,8 +1393,7 @@ handle_client_init (void *cls, struct GNUNET_SERVER_Client *client, | |||
1393 | irm.header.size = htons (sizeof (struct InitReplyMessage)); | 1393 | irm.header.size = htons (sizeof (struct InitReplyMessage)); |
1394 | irm.header.type = htons (GNUNET_MESSAGE_TYPE_CORE_INIT_REPLY); | 1394 | irm.header.type = htons (GNUNET_MESSAGE_TYPE_CORE_INIT_REPLY); |
1395 | irm.reserved = htonl (0); | 1395 | irm.reserved = htonl (0); |
1396 | memcpy (&irm.publicKey, &my_public_key, | 1396 | irm.my_identity = my_identity; |
1397 | sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded)); | ||
1398 | #if DEBUG_CORE_CLIENT | 1397 | #if DEBUG_CORE_CLIENT |
1399 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending `%s' message to client.\n", | 1398 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending `%s' message to client.\n", |
1400 | "INIT_REPLY"); | 1399 | "INIT_REPLY"); |
diff --git a/src/core/gnunet-service-core_clients.c b/src/core/gnunet-service-core_clients.c index 7b884f44f..94fecb4ca 100644 --- a/src/core/gnunet-service-core_clients.c +++ b/src/core/gnunet-service-core_clients.c | |||
@@ -289,7 +289,7 @@ handle_client_init (void *cls, struct GNUNET_SERVER_Client *client, | |||
289 | irm.header.size = htons (sizeof (struct InitReplyMessage)); | 289 | irm.header.size = htons (sizeof (struct InitReplyMessage)); |
290 | irm.header.type = htons (GNUNET_MESSAGE_TYPE_CORE_INIT_REPLY); | 290 | irm.header.type = htons (GNUNET_MESSAGE_TYPE_CORE_INIT_REPLY); |
291 | irm.reserved = htonl (0); | 291 | irm.reserved = htonl (0); |
292 | irm.publicKey = GSC_my_public_key; | 292 | irm.my_identity = GSC_my_identity; |
293 | send_to_client (c, &irm.header, GNUNET_NO); | 293 | send_to_client (c, &irm.header, GNUNET_NO); |
294 | if (0 != (c->options & GNUNET_CORE_OPTION_SEND_CONNECT)) | 294 | if (0 != (c->options & GNUNET_CORE_OPTION_SEND_CONNECT)) |
295 | GSC_SESSIONS_notify_client_about_sessions (c); | 295 | GSC_SESSIONS_notify_client_about_sessions (c); |
diff --git a/src/core/test_core_api.c b/src/core/test_core_api.c index 3028f32b0..7695f9e86 100644 --- a/src/core/test_core_api.c +++ b/src/core/test_core_api.c | |||
@@ -283,8 +283,7 @@ connect_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
283 | 283 | ||
284 | static void | 284 | static void |
285 | init_notify (void *cls, struct GNUNET_CORE_Handle *server, | 285 | init_notify (void *cls, struct GNUNET_CORE_Handle *server, |
286 | const struct GNUNET_PeerIdentity *my_identity, | 286 | const struct GNUNET_PeerIdentity *my_identity) |
287 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *publicKey) | ||
288 | { | 287 | { |
289 | struct PeerContext *p = cls; | 288 | struct PeerContext *p = cls; |
290 | 289 | ||
diff --git a/src/core/test_core_api_preferences.c b/src/core/test_core_api_preferences.c index 3aeb92572..19d51ef60 100644 --- a/src/core/test_core_api_preferences.c +++ b/src/core/test_core_api_preferences.c | |||
@@ -346,8 +346,7 @@ ask_connect_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
346 | 346 | ||
347 | static void | 347 | static void |
348 | init_notify (void *cls, struct GNUNET_CORE_Handle *server, | 348 | init_notify (void *cls, struct GNUNET_CORE_Handle *server, |
349 | const struct GNUNET_PeerIdentity *my_identity, | 349 | const struct GNUNET_PeerIdentity *my_identity) |
350 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *publicKey) | ||
351 | { | 350 | { |
352 | struct PeerContext *p = cls; | 351 | struct PeerContext *p = cls; |
353 | 352 | ||
diff --git a/src/core/test_core_api_reliability.c b/src/core/test_core_api_reliability.c index 7627a32c0..a696c7cbd 100644 --- a/src/core/test_core_api_reliability.c +++ b/src/core/test_core_api_reliability.c | |||
@@ -365,8 +365,7 @@ static struct GNUNET_CORE_MessageHandler handlers[] = { | |||
365 | 365 | ||
366 | static void | 366 | static void |
367 | init_notify (void *cls, struct GNUNET_CORE_Handle *server, | 367 | init_notify (void *cls, struct GNUNET_CORE_Handle *server, |
368 | const struct GNUNET_PeerIdentity *my_identity, | 368 | const struct GNUNET_PeerIdentity *my_identity) |
369 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *publicKey) | ||
370 | { | 369 | { |
371 | struct PeerContext *p = cls; | 370 | struct PeerContext *p = cls; |
372 | 371 | ||
diff --git a/src/core/test_core_api_start_only.c b/src/core/test_core_api_start_only.c index ff4b564bf..6b1f3da1c 100644 --- a/src/core/test_core_api_start_only.c +++ b/src/core/test_core_api_start_only.c | |||
@@ -116,8 +116,7 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
116 | 116 | ||
117 | static void | 117 | static void |
118 | init_notify (void *cls, struct GNUNET_CORE_Handle *server, | 118 | init_notify (void *cls, struct GNUNET_CORE_Handle *server, |
119 | const struct GNUNET_PeerIdentity *my_identity, | 119 | const struct GNUNET_PeerIdentity *my_identity) |
120 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *publicKey) | ||
121 | { | 120 | { |
122 | struct PeerContext *p = cls; | 121 | struct PeerContext *p = cls; |
123 | 122 | ||
diff --git a/src/core/test_core_quota_compliance.c b/src/core/test_core_quota_compliance.c index 6f10635fe..5fce06b31 100644 --- a/src/core/test_core_quota_compliance.c +++ b/src/core/test_core_quota_compliance.c | |||
@@ -504,8 +504,7 @@ static struct GNUNET_CORE_MessageHandler handlers[] = { | |||
504 | 504 | ||
505 | static void | 505 | static void |
506 | init_notify (void *cls, struct GNUNET_CORE_Handle *server, | 506 | init_notify (void *cls, struct GNUNET_CORE_Handle *server, |
507 | const struct GNUNET_PeerIdentity *my_identity, | 507 | const struct GNUNET_PeerIdentity *my_identity) |
508 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *publicKey) | ||
509 | { | 508 | { |
510 | struct PeerContext *p = cls; | 509 | struct PeerContext *p = cls; |
511 | 510 | ||