diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-10-06 20:55:28 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-10-06 20:55:28 +0000 |
commit | 61c39c60565b386e0e12ea669556b030e8cd7180 (patch) | |
tree | 59109aeab8297bdc996faca8c4e38ec7426c36cf /src/identity/identity_api.c | |
parent | 780eb09dd8040ecf8649d40ddf8314464e0fc48e (diff) | |
download | gnunet-61c39c60565b386e0e12ea669556b030e8cd7180.tar.gz gnunet-61c39c60565b386e0e12ea669556b030e8cd7180.zip |
-remove trailing whitespace
Diffstat (limited to 'src/identity/identity_api.c')
-rw-r--r-- | src/identity/identity_api.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/identity/identity_api.c b/src/identity/identity_api.c index 143f9e7e8..dc4613cdb 100644 --- a/src/identity/identity_api.c +++ b/src/identity/identity_api.c | |||
@@ -32,7 +32,7 @@ | |||
32 | 32 | ||
33 | #define LOG(kind,...) GNUNET_log_from (kind, "identity-api",__VA_ARGS__) | 33 | #define LOG(kind,...) GNUNET_log_from (kind, "identity-api",__VA_ARGS__) |
34 | 34 | ||
35 | /** | 35 | /** |
36 | * Handle for an ego. | 36 | * Handle for an ego. |
37 | */ | 37 | */ |
38 | struct GNUNET_IDENTITY_Ego | 38 | struct GNUNET_IDENTITY_Ego |
@@ -59,7 +59,7 @@ struct GNUNET_IDENTITY_Ego | |||
59 | }; | 59 | }; |
60 | 60 | ||
61 | 61 | ||
62 | /** | 62 | /** |
63 | * Handle for an operation with the identity service. | 63 | * Handle for an operation with the identity service. |
64 | */ | 64 | */ |
65 | struct GNUNET_IDENTITY_Operation | 65 | struct GNUNET_IDENTITY_Operation |
@@ -69,7 +69,7 @@ struct GNUNET_IDENTITY_Operation | |||
69 | * Main identity handle. | 69 | * Main identity handle. |
70 | */ | 70 | */ |
71 | struct GNUNET_IDENTITY_Handle *h; | 71 | struct GNUNET_IDENTITY_Handle *h; |
72 | 72 | ||
73 | /** | 73 | /** |
74 | * We keep operations in a DLL. | 74 | * We keep operations in a DLL. |
75 | */ | 75 | */ |
@@ -139,12 +139,12 @@ struct GNUNET_IDENTITY_Handle | |||
139 | 139 | ||
140 | /** | 140 | /** |
141 | * Head of active operations. | 141 | * Head of active operations. |
142 | */ | 142 | */ |
143 | struct GNUNET_IDENTITY_Operation *op_head; | 143 | struct GNUNET_IDENTITY_Operation *op_head; |
144 | 144 | ||
145 | /** | 145 | /** |
146 | * Tail of active operations. | 146 | * Tail of active operations. |
147 | */ | 147 | */ |
148 | struct GNUNET_IDENTITY_Operation *op_tail; | 148 | struct GNUNET_IDENTITY_Operation *op_tail; |
149 | 149 | ||
150 | /** | 150 | /** |
@@ -172,7 +172,7 @@ struct GNUNET_IDENTITY_Handle | |||
172 | 172 | ||
173 | /** | 173 | /** |
174 | * Obtain the ego representing 'anonymous' users. | 174 | * Obtain the ego representing 'anonymous' users. |
175 | * | 175 | * |
176 | * @return handle for the anonymous user, must not be freed | 176 | * @return handle for the anonymous user, must not be freed |
177 | */ | 177 | */ |
178 | const struct GNUNET_IDENTITY_Ego * | 178 | const struct GNUNET_IDENTITY_Ego * |
@@ -240,7 +240,7 @@ reschedule_connect (struct GNUNET_IDENTITY_Handle *h) | |||
240 | * @param msg message received, NULL on timeout or fatal error | 240 | * @param msg message received, NULL on timeout or fatal error |
241 | */ | 241 | */ |
242 | static void | 242 | static void |
243 | message_handler (void *cls, | 243 | message_handler (void *cls, |
244 | const struct GNUNET_MessageHeader *msg) | 244 | const struct GNUNET_MessageHeader *msg) |
245 | { | 245 | { |
246 | struct GNUNET_IDENTITY_Handle *h = cls; | 246 | struct GNUNET_IDENTITY_Handle *h = cls; |
@@ -307,7 +307,7 @@ message_handler (void *cls, | |||
307 | } | 307 | } |
308 | um = (const struct GNUNET_IDENTITY_UpdateMessage *) msg; | 308 | um = (const struct GNUNET_IDENTITY_UpdateMessage *) msg; |
309 | name_len = ntohs (um->name_len); | 309 | name_len = ntohs (um->name_len); |
310 | 310 | ||
311 | str = (const char *) &um[1]; | 311 | str = (const char *) &um[1]; |
312 | if ( (size != name_len + sizeof (struct GNUNET_IDENTITY_UpdateMessage)) || | 312 | if ( (size != name_len + sizeof (struct GNUNET_IDENTITY_UpdateMessage)) || |
313 | ( (0 != name_len) && | 313 | ( (0 != name_len) && |
@@ -369,7 +369,7 @@ message_handler (void *cls, | |||
369 | /* ego changed name */ | 369 | /* ego changed name */ |
370 | GNUNET_free (ego->name); | 370 | GNUNET_free (ego->name); |
371 | ego->name = GNUNET_strdup (str); | 371 | ego->name = GNUNET_strdup (str); |
372 | } | 372 | } |
373 | GNUNET_CLIENT_receive (h->client, &message_handler, h, | 373 | GNUNET_CLIENT_receive (h->client, &message_handler, h, |
374 | GNUNET_TIME_UNIT_FOREVER_REL); | 374 | GNUNET_TIME_UNIT_FOREVER_REL); |
375 | /* inform application about change */ | 375 | /* inform application about change */ |
@@ -456,14 +456,14 @@ transmit_next (struct GNUNET_IDENTITY_Handle *h); | |||
456 | * @return number of bytes copied to buf | 456 | * @return number of bytes copied to buf |
457 | */ | 457 | */ |
458 | static size_t | 458 | static size_t |
459 | send_next_message (void *cls, | 459 | send_next_message (void *cls, |
460 | size_t size, | 460 | size_t size, |
461 | void *buf) | 461 | void *buf) |
462 | { | 462 | { |
463 | struct GNUNET_IDENTITY_Handle *h = cls; | 463 | struct GNUNET_IDENTITY_Handle *h = cls; |
464 | struct GNUNET_IDENTITY_Operation *op = h->op_head; | 464 | struct GNUNET_IDENTITY_Operation *op = h->op_head; |
465 | size_t ret; | 465 | size_t ret; |
466 | 466 | ||
467 | h->th = NULL; | 467 | h->th = NULL; |
468 | if (NULL == op) | 468 | if (NULL == op) |
469 | return 0; | 469 | return 0; |
@@ -472,7 +472,7 @@ send_next_message (void *cls, | |||
472 | { | 472 | { |
473 | reschedule_connect (h); | 473 | reschedule_connect (h); |
474 | return 0; | 474 | return 0; |
475 | } | 475 | } |
476 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 476 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
477 | "Sending message of type %d to identity service\n", | 477 | "Sending message of type %d to identity service\n", |
478 | ntohs (op->msg->type)); | 478 | ntohs (op->msg->type)); |
@@ -543,7 +543,7 @@ reconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
543 | if ( (NULL == h->op_head) || | 543 | if ( (NULL == h->op_head) || |
544 | (GNUNET_MESSAGE_TYPE_IDENTITY_START != ntohs (h->op_head->msg->type)) ) | 544 | (GNUNET_MESSAGE_TYPE_IDENTITY_START != ntohs (h->op_head->msg->type)) ) |
545 | { | 545 | { |
546 | op = GNUNET_malloc (sizeof (struct GNUNET_IDENTITY_Operation) + | 546 | op = GNUNET_malloc (sizeof (struct GNUNET_IDENTITY_Operation) + |
547 | sizeof (struct GNUNET_MessageHeader)); | 547 | sizeof (struct GNUNET_MessageHeader)); |
548 | op->h = h; | 548 | op->h = h; |
549 | op->msg = (const struct GNUNET_MessageHeader *) &op[1]; | 549 | op->msg = (const struct GNUNET_MessageHeader *) &op[1]; |
@@ -633,7 +633,7 @@ GNUNET_IDENTITY_get (struct GNUNET_IDENTITY_Handle *id, | |||
633 | struct GNUNET_IDENTITY_GetDefaultMessage *gdm; | 633 | struct GNUNET_IDENTITY_GetDefaultMessage *gdm; |
634 | size_t slen; | 634 | size_t slen; |
635 | 635 | ||
636 | slen = strlen (service_name) + 1; | 636 | slen = strlen (service_name) + 1; |
637 | if (slen >= GNUNET_SERVER_MAX_MESSAGE_SIZE - sizeof (struct GNUNET_IDENTITY_GetDefaultMessage)) | 637 | if (slen >= GNUNET_SERVER_MAX_MESSAGE_SIZE - sizeof (struct GNUNET_IDENTITY_GetDefaultMessage)) |
638 | { | 638 | { |
639 | GNUNET_break (0); | 639 | GNUNET_break (0); |
@@ -641,7 +641,7 @@ GNUNET_IDENTITY_get (struct GNUNET_IDENTITY_Handle *id, | |||
641 | } | 641 | } |
642 | op = GNUNET_malloc (sizeof (struct GNUNET_IDENTITY_Operation) + | 642 | op = GNUNET_malloc (sizeof (struct GNUNET_IDENTITY_Operation) + |
643 | sizeof (struct GNUNET_IDENTITY_GetDefaultMessage) + | 643 | sizeof (struct GNUNET_IDENTITY_GetDefaultMessage) + |
644 | slen); | 644 | slen); |
645 | op->h = id; | 645 | op->h = id; |
646 | op->cb = cb; | 646 | op->cb = cb; |
647 | op->cls = cb_cls; | 647 | op->cls = cb_cls; |
@@ -691,7 +691,7 @@ GNUNET_IDENTITY_set (struct GNUNET_IDENTITY_Handle *id, | |||
691 | } | 691 | } |
692 | op = GNUNET_malloc (sizeof (struct GNUNET_IDENTITY_Operation) + | 692 | op = GNUNET_malloc (sizeof (struct GNUNET_IDENTITY_Operation) + |
693 | sizeof (struct GNUNET_IDENTITY_SetDefaultMessage) + | 693 | sizeof (struct GNUNET_IDENTITY_SetDefaultMessage) + |
694 | slen); | 694 | slen); |
695 | op->h = id; | 695 | op->h = id; |
696 | op->cont = cont; | 696 | op->cont = cont; |
697 | op->cls = cont_cls; | 697 | op->cls = cont_cls; |
@@ -713,7 +713,7 @@ GNUNET_IDENTITY_set (struct GNUNET_IDENTITY_Handle *id, | |||
713 | } | 713 | } |
714 | 714 | ||
715 | 715 | ||
716 | /** | 716 | /** |
717 | * Create a new identity with the given name. | 717 | * Create a new identity with the given name. |
718 | * | 718 | * |
719 | * @param id identity service to use | 719 | * @param id identity service to use |
@@ -744,7 +744,7 @@ GNUNET_IDENTITY_create (struct GNUNET_IDENTITY_Handle *id, | |||
744 | } | 744 | } |
745 | op = GNUNET_malloc (sizeof (struct GNUNET_IDENTITY_Operation) + | 745 | op = GNUNET_malloc (sizeof (struct GNUNET_IDENTITY_Operation) + |
746 | sizeof (struct GNUNET_IDENTITY_CreateRequestMessage) + | 746 | sizeof (struct GNUNET_IDENTITY_CreateRequestMessage) + |
747 | slen); | 747 | slen); |
748 | op->h = id; | 748 | op->h = id; |
749 | op->cont = cont; | 749 | op->cont = cont; |
750 | op->cls = cont_cls; | 750 | op->cls = cont_cls; |
@@ -767,7 +767,7 @@ GNUNET_IDENTITY_create (struct GNUNET_IDENTITY_Handle *id, | |||
767 | } | 767 | } |
768 | 768 | ||
769 | 769 | ||
770 | /** | 770 | /** |
771 | * Renames an existing identity. | 771 | * Renames an existing identity. |
772 | * | 772 | * |
773 | * @param id identity service to use | 773 | * @param id identity service to use |
@@ -824,7 +824,7 @@ GNUNET_IDENTITY_rename (struct GNUNET_IDENTITY_Handle *id, | |||
824 | } | 824 | } |
825 | 825 | ||
826 | 826 | ||
827 | /** | 827 | /** |
828 | * Delete an existing identity. | 828 | * Delete an existing identity. |
829 | * | 829 | * |
830 | * @param id identity service to use | 830 | * @param id identity service to use |
@@ -851,7 +851,7 @@ GNUNET_IDENTITY_delete (struct GNUNET_IDENTITY_Handle *id, | |||
851 | } | 851 | } |
852 | op = GNUNET_malloc (sizeof (struct GNUNET_IDENTITY_Operation) + | 852 | op = GNUNET_malloc (sizeof (struct GNUNET_IDENTITY_Operation) + |
853 | sizeof (struct GNUNET_IDENTITY_DeleteMessage) + | 853 | sizeof (struct GNUNET_IDENTITY_DeleteMessage) + |
854 | slen); | 854 | slen); |
855 | op->h = id; | 855 | op->h = id; |
856 | op->cont = cb; | 856 | op->cont = cb; |
857 | op->cls = cb_cls; | 857 | op->cls = cb_cls; |