diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-10-18 12:33:21 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-10-18 12:33:21 +0000 |
commit | 9cd0d5068f3341fe8451a61872894f28a5ac9047 (patch) | |
tree | 390b09e837978c1dbef176950b04f42ecf39e140 /src/ats | |
parent | 38d26a302cba9de8362960186b645e8f2133a538 (diff) | |
download | gnunet-9cd0d5068f3341fe8451a61872894f28a5ac9047.tar.gz gnunet-9cd0d5068f3341fe8451a61872894f28a5ac9047.zip |
rename 'struct Session' to 'struct GNUNET_ATS_Session' to satisfy naming conventions
Diffstat (limited to 'src/ats')
-rw-r--r-- | src/ats/ats.h | 2 | ||||
-rw-r--r-- | src/ats/ats_api_scheduling.c | 16 | ||||
-rw-r--r-- | src/ats/gnunet-service-ats_scheduling.c | 4 | ||||
-rw-r--r-- | src/ats/test_ats_lib.c | 18 |
4 files changed, 20 insertions, 20 deletions
diff --git a/src/ats/ats.h b/src/ats/ats.h index 7cad9e98e..3a7f28a64 100644 --- a/src/ats/ats.h +++ b/src/ats/ats.h | |||
@@ -218,7 +218,7 @@ struct AddressDestroyedMessage | |||
218 | * Message sent by ATS service to client to confirm that it is done | 218 | * Message sent by ATS service to client to confirm that it is done |
219 | * using the given session ID. | 219 | * using the given session ID. |
220 | */ | 220 | */ |
221 | struct SessionReleaseMessage | 221 | struct GNUNET_ATS_SessionReleaseMessage |
222 | { | 222 | { |
223 | /** | 223 | /** |
224 | * Type is #GNUNET_MESSAGE_TYPE_ATS_SESSION_RELEASE. | 224 | * Type is #GNUNET_MESSAGE_TYPE_ATS_SESSION_RELEASE. |
diff --git a/src/ats/ats_api_scheduling.c b/src/ats/ats_api_scheduling.c index a5dd0827c..d7a5a83a1 100644 --- a/src/ats/ats_api_scheduling.c +++ b/src/ats/ats_api_scheduling.c | |||
@@ -70,7 +70,7 @@ struct GNUNET_ATS_AddressRecord | |||
70 | * Session handle. NULL if we have an address but no | 70 | * Session handle. NULL if we have an address but no |
71 | * active session for this address. | 71 | * active session for this address. |
72 | */ | 72 | */ |
73 | struct Session *session; | 73 | struct GNUNET_ATS_Session *session; |
74 | 74 | ||
75 | /** | 75 | /** |
76 | * Performance data about the address. | 76 | * Performance data about the address. |
@@ -295,7 +295,7 @@ find_empty_session_slot (struct GNUNET_ATS_SchedulingHandle *sh) | |||
295 | */ | 295 | */ |
296 | static uint32_t | 296 | static uint32_t |
297 | find_session_id (struct GNUNET_ATS_SchedulingHandle *sh, | 297 | find_session_id (struct GNUNET_ATS_SchedulingHandle *sh, |
298 | struct Session *session, | 298 | struct GNUNET_ATS_Session *session, |
299 | const struct GNUNET_HELLO_Address *address) | 299 | const struct GNUNET_HELLO_Address *address) |
300 | { | 300 | { |
301 | uint32_t i; | 301 | uint32_t i; |
@@ -367,9 +367,9 @@ process_ats_session_release_message (void *cls, | |||
367 | const struct GNUNET_MessageHeader *msg) | 367 | const struct GNUNET_MessageHeader *msg) |
368 | { | 368 | { |
369 | struct GNUNET_ATS_SchedulingHandle *sh = cls; | 369 | struct GNUNET_ATS_SchedulingHandle *sh = cls; |
370 | const struct SessionReleaseMessage *srm; | 370 | const struct GNUNET_ATS_SessionReleaseMessage *srm; |
371 | 371 | ||
372 | srm = (const struct SessionReleaseMessage *) msg; | 372 | srm = (const struct GNUNET_ATS_SessionReleaseMessage *) msg; |
373 | /* Note: peer field in srm not necessary right now, | 373 | /* Note: peer field in srm not necessary right now, |
374 | but might be good to have in the future */ | 374 | but might be good to have in the future */ |
375 | release_session (sh, | 375 | release_session (sh, |
@@ -534,7 +534,7 @@ reconnect (struct GNUNET_ATS_SchedulingHandle *sh) | |||
534 | static const struct GNUNET_MQ_MessageHandler handlers[] = | 534 | static const struct GNUNET_MQ_MessageHandler handlers[] = |
535 | { { &process_ats_session_release_message, | 535 | { { &process_ats_session_release_message, |
536 | GNUNET_MESSAGE_TYPE_ATS_SESSION_RELEASE, | 536 | GNUNET_MESSAGE_TYPE_ATS_SESSION_RELEASE, |
537 | sizeof (struct SessionReleaseMessage) }, | 537 | sizeof (struct GNUNET_ATS_SessionReleaseMessage) }, |
538 | { &process_ats_address_suggestion_message, | 538 | { &process_ats_address_suggestion_message, |
539 | GNUNET_MESSAGE_TYPE_ATS_ADDRESS_SUGGESTION, | 539 | GNUNET_MESSAGE_TYPE_ATS_ADDRESS_SUGGESTION, |
540 | sizeof (struct AddressSuggestionMessage) }, | 540 | sizeof (struct AddressSuggestionMessage) }, |
@@ -659,7 +659,7 @@ GNUNET_ATS_scheduling_done (struct GNUNET_ATS_SchedulingHandle *sh) | |||
659 | struct GNUNET_ATS_AddressRecord * | 659 | struct GNUNET_ATS_AddressRecord * |
660 | GNUNET_ATS_address_add (struct GNUNET_ATS_SchedulingHandle *sh, | 660 | GNUNET_ATS_address_add (struct GNUNET_ATS_SchedulingHandle *sh, |
661 | const struct GNUNET_HELLO_Address *address, | 661 | const struct GNUNET_HELLO_Address *address, |
662 | struct Session *session, | 662 | struct GNUNET_ATS_Session *session, |
663 | const struct GNUNET_ATS_Properties *prop) | 663 | const struct GNUNET_ATS_Properties *prop) |
664 | { | 664 | { |
665 | struct GNUNET_ATS_AddressRecord *ar; | 665 | struct GNUNET_ATS_AddressRecord *ar; |
@@ -716,7 +716,7 @@ GNUNET_ATS_address_add (struct GNUNET_ATS_SchedulingHandle *sh, | |||
716 | */ | 716 | */ |
717 | void | 717 | void |
718 | GNUNET_ATS_address_add_session (struct GNUNET_ATS_AddressRecord *ar, | 718 | GNUNET_ATS_address_add_session (struct GNUNET_ATS_AddressRecord *ar, |
719 | struct Session *session) | 719 | struct GNUNET_ATS_Session *session) |
720 | { | 720 | { |
721 | GNUNET_break (NULL == ar->session); | 721 | GNUNET_break (NULL == ar->session); |
722 | ar->session = session; | 722 | ar->session = session; |
@@ -737,7 +737,7 @@ GNUNET_ATS_address_add_session (struct GNUNET_ATS_AddressRecord *ar, | |||
737 | */ | 737 | */ |
738 | int | 738 | int |
739 | GNUNET_ATS_address_del_session (struct GNUNET_ATS_AddressRecord *ar, | 739 | GNUNET_ATS_address_del_session (struct GNUNET_ATS_AddressRecord *ar, |
740 | struct Session *session) | 740 | struct GNUNET_ATS_Session *session) |
741 | { | 741 | { |
742 | GNUNET_assert (session == ar->session); | 742 | GNUNET_assert (session == ar->session); |
743 | ar->session = NULL; | 743 | ar->session = NULL; |
diff --git a/src/ats/gnunet-service-ats_scheduling.c b/src/ats/gnunet-service-ats_scheduling.c index 1aa96b861..fe472103c 100644 --- a/src/ats/gnunet-service-ats_scheduling.c +++ b/src/ats/gnunet-service-ats_scheduling.c | |||
@@ -232,7 +232,7 @@ GAS_handle_address_destroyed (void *cls, | |||
232 | const struct GNUNET_MessageHeader *message) | 232 | const struct GNUNET_MessageHeader *message) |
233 | { | 233 | { |
234 | const struct AddressDestroyedMessage *m; | 234 | const struct AddressDestroyedMessage *m; |
235 | struct SessionReleaseMessage srm; | 235 | struct GNUNET_ATS_SessionReleaseMessage srm; |
236 | 236 | ||
237 | m = (const struct AddressDestroyedMessage *) message; | 237 | m = (const struct AddressDestroyedMessage *) message; |
238 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 238 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -245,7 +245,7 @@ GAS_handle_address_destroyed (void *cls, | |||
245 | GAS_addresses_destroy (&m->peer, | 245 | GAS_addresses_destroy (&m->peer, |
246 | ntohl (m->session_id)); | 246 | ntohl (m->session_id)); |
247 | srm.header.type = ntohs (GNUNET_MESSAGE_TYPE_ATS_SESSION_RELEASE); | 247 | srm.header.type = ntohs (GNUNET_MESSAGE_TYPE_ATS_SESSION_RELEASE); |
248 | srm.header.size = ntohs (sizeof (struct SessionReleaseMessage)); | 248 | srm.header.size = ntohs (sizeof (struct GNUNET_ATS_SessionReleaseMessage)); |
249 | srm.session_id = m->session_id; | 249 | srm.session_id = m->session_id; |
250 | srm.peer = m->peer; | 250 | srm.peer = m->peer; |
251 | GNUNET_SERVER_notification_context_unicast (nc, | 251 | GNUNET_SERVER_notification_context_unicast (nc, |
diff --git a/src/ats/test_ats_lib.c b/src/ats/test_ats_lib.c index 314f19007..e191588bb 100644 --- a/src/ats/test_ats_lib.c +++ b/src/ats/test_ats_lib.c | |||
@@ -36,7 +36,7 @@ struct AddressSuggestData | |||
36 | /** | 36 | /** |
37 | * Which session were we given? | 37 | * Which session were we given? |
38 | */ | 38 | */ |
39 | struct Session *session; | 39 | struct GNUNET_ATS_Session *session; |
40 | 40 | ||
41 | /** | 41 | /** |
42 | * What address was assigned? | 42 | * What address was assigned? |
@@ -404,10 +404,10 @@ make_address (uint32_t pid, | |||
404 | /** | 404 | /** |
405 | * Our dummy sessions. | 405 | * Our dummy sessions. |
406 | */ | 406 | */ |
407 | struct Session | 407 | struct GNUNET_ATS_Session |
408 | { | 408 | { |
409 | /** | 409 | /** |
410 | * Field to avoid `0 == sizeof(struct Session)`. | 410 | * Field to avoid `0 == sizeof(struct GNUNET_ATS_Session)`. |
411 | */ | 411 | */ |
412 | unsigned int non_empty; | 412 | unsigned int non_empty; |
413 | }; | 413 | }; |
@@ -419,10 +419,10 @@ struct Session | |||
419 | * @param i which session number to return | 419 | * @param i which session number to return |
420 | * @return NULL if @a i is 0, otherwise a pointer unique to @a i | 420 | * @return NULL if @a i is 0, otherwise a pointer unique to @a i |
421 | */ | 421 | */ |
422 | static struct Session * | 422 | static struct GNUNET_ATS_Session * |
423 | make_session (unsigned int i) | 423 | make_session (unsigned int i) |
424 | { | 424 | { |
425 | struct Session *baseptr = NULL; | 425 | struct GNUNET_ATS_Session *baseptr = NULL; |
426 | 426 | ||
427 | if (0 == i) | 427 | if (0 == i) |
428 | return NULL; | 428 | return NULL; |
@@ -618,7 +618,7 @@ interpreter (void *cls, | |||
618 | case CMD_ADD_ADDRESS: | 618 | case CMD_ADD_ADDRESS: |
619 | { | 619 | { |
620 | struct GNUNET_HELLO_Address *addr; | 620 | struct GNUNET_HELLO_Address *addr; |
621 | struct Session *session; | 621 | struct GNUNET_ATS_Session *session; |
622 | 622 | ||
623 | addr = make_address (cmd->details.add_address.pid, | 623 | addr = make_address (cmd->details.add_address.pid, |
624 | cmd->details.add_address.addr_num, | 624 | cmd->details.add_address.addr_num, |
@@ -781,7 +781,7 @@ interpreter (void *cls, | |||
781 | case CMD_ADD_SESSION: | 781 | case CMD_ADD_SESSION: |
782 | { | 782 | { |
783 | struct Command *add; | 783 | struct Command *add; |
784 | struct Session *session; | 784 | struct GNUNET_ATS_Session *session; |
785 | 785 | ||
786 | add = find_command (CMD_ADD_ADDRESS, | 786 | add = find_command (CMD_ADD_ADDRESS, |
787 | cmd->details.add_session.add_label); | 787 | cmd->details.add_session.add_label); |
@@ -796,7 +796,7 @@ interpreter (void *cls, | |||
796 | { | 796 | { |
797 | struct Command *add_address; | 797 | struct Command *add_address; |
798 | struct Command *add_session; | 798 | struct Command *add_session; |
799 | struct Session *session; | 799 | struct GNUNET_ATS_Session *session; |
800 | 800 | ||
801 | add_session = find_command (CMD_ADD_SESSION, | 801 | add_session = find_command (CMD_ADD_SESSION, |
802 | cmd->details.del_session.add_session_label); | 802 | cmd->details.del_session.add_session_label); |
@@ -891,7 +891,7 @@ static void | |||
891 | address_suggest_cb (void *cls, | 891 | address_suggest_cb (void *cls, |
892 | const struct GNUNET_PeerIdentity *peer, | 892 | const struct GNUNET_PeerIdentity *peer, |
893 | const struct GNUNET_HELLO_Address *address, | 893 | const struct GNUNET_HELLO_Address *address, |
894 | struct Session *session, | 894 | struct GNUNET_ATS_Session *session, |
895 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, | 895 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, |
896 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in) | 896 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in) |
897 | { | 897 | { |