diff options
Diffstat (limited to 'src/messenger/messenger_api_contact_store.c')
-rw-r--r-- | src/messenger/messenger_api_contact_store.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/src/messenger/messenger_api_contact_store.c b/src/messenger/messenger_api_contact_store.c index 6a517c2e0..1c10a8fbf 100644 --- a/src/messenger/messenger_api_contact_store.c +++ b/src/messenger/messenger_api_contact_store.c | |||
@@ -38,7 +38,9 @@ init_contact_store (struct GNUNET_MESSENGER_ContactStore *store) | |||
38 | } | 38 | } |
39 | 39 | ||
40 | static int | 40 | static int |
41 | iterate_destroy_contacts (void *cls, const struct GNUNET_HashCode *key, void *value) | 41 | iterate_destroy_contacts (void *cls, |
42 | const struct GNUNET_HashCode *key, | ||
43 | void *value) | ||
42 | { | 44 | { |
43 | struct GNUNET_MESSENGER_Contact *contact = value; | 45 | struct GNUNET_MESSENGER_Contact *contact = value; |
44 | destroy_contact (contact); | 46 | destroy_contact (contact); |
@@ -58,7 +60,8 @@ clear_contact_store (struct GNUNET_MESSENGER_ContactStore *store) | |||
58 | } | 60 | } |
59 | 61 | ||
60 | static struct GNUNET_CONTAINER_MultiHashMap* | 62 | static struct GNUNET_CONTAINER_MultiHashMap* |
61 | select_store_contact_map (struct GNUNET_MESSENGER_ContactStore *store, const struct GNUNET_HashCode *context, | 63 | select_store_contact_map (struct GNUNET_MESSENGER_ContactStore *store, |
64 | const struct GNUNET_HashCode *context, | ||
62 | struct GNUNET_HashCode *hash) | 65 | struct GNUNET_HashCode *hash) |
63 | { | 66 | { |
64 | const struct GNUNET_IDENTITY_PublicKey *anonymous = get_anonymous_public_key (); | 67 | const struct GNUNET_IDENTITY_PublicKey *anonymous = get_anonymous_public_key (); |
@@ -76,7 +79,8 @@ select_store_contact_map (struct GNUNET_MESSENGER_ContactStore *store, const str | |||
76 | } | 79 | } |
77 | 80 | ||
78 | struct GNUNET_MESSENGER_Contact* | 81 | struct GNUNET_MESSENGER_Contact* |
79 | get_store_contact_raw (struct GNUNET_MESSENGER_ContactStore *store, const struct GNUNET_HashCode *context, | 82 | get_store_contact_raw (struct GNUNET_MESSENGER_ContactStore *store, |
83 | const struct GNUNET_HashCode *context, | ||
80 | const struct GNUNET_HashCode *key_hash) | 84 | const struct GNUNET_HashCode *key_hash) |
81 | { | 85 | { |
82 | GNUNET_assert ((store) && (store->contacts) && (context) && (key_hash)); | 86 | GNUNET_assert ((store) && (store->contacts) && (context) && (key_hash)); |
@@ -92,7 +96,8 @@ get_store_contact_raw (struct GNUNET_MESSENGER_ContactStore *store, const struct | |||
92 | } | 96 | } |
93 | 97 | ||
94 | struct GNUNET_MESSENGER_Contact* | 98 | struct GNUNET_MESSENGER_Contact* |
95 | get_store_contact (struct GNUNET_MESSENGER_ContactStore *store, const struct GNUNET_HashCode *context, | 99 | get_store_contact (struct GNUNET_MESSENGER_ContactStore *store, |
100 | const struct GNUNET_HashCode *context, | ||
96 | const struct GNUNET_IDENTITY_PublicKey *pubkey) | 101 | const struct GNUNET_IDENTITY_PublicKey *pubkey) |
97 | { | 102 | { |
98 | GNUNET_assert ((store) && (store->contacts) && (context) && (pubkey)); | 103 | GNUNET_assert ((store) && (store->contacts) && (context) && (pubkey)); |
@@ -130,8 +135,10 @@ get_store_contact (struct GNUNET_MESSENGER_ContactStore *store, const struct GNU | |||
130 | } | 135 | } |
131 | 136 | ||
132 | void | 137 | void |
133 | update_store_contact (struct GNUNET_MESSENGER_ContactStore *store, struct GNUNET_MESSENGER_Contact* contact, | 138 | update_store_contact (struct GNUNET_MESSENGER_ContactStore *store, |
134 | const struct GNUNET_HashCode *context, const struct GNUNET_HashCode *next_context, | 139 | struct GNUNET_MESSENGER_Contact* contact, |
140 | const struct GNUNET_HashCode *context, | ||
141 | const struct GNUNET_HashCode *next_context, | ||
135 | const struct GNUNET_IDENTITY_PublicKey *pubkey) | 142 | const struct GNUNET_IDENTITY_PublicKey *pubkey) |
136 | { | 143 | { |
137 | GNUNET_assert ((store) && (store->contacts) && (contact) && (pubkey)); | 144 | GNUNET_assert ((store) && (store->contacts) && (contact) && (pubkey)); |
@@ -163,7 +170,8 @@ update_store_contact (struct GNUNET_MESSENGER_ContactStore *store, struct GNUNET | |||
163 | } | 170 | } |
164 | 171 | ||
165 | void | 172 | void |
166 | remove_store_contact (struct GNUNET_MESSENGER_ContactStore *store, struct GNUNET_MESSENGER_Contact* contact, | 173 | remove_store_contact (struct GNUNET_MESSENGER_ContactStore *store, |
174 | struct GNUNET_MESSENGER_Contact* contact, | ||
167 | const struct GNUNET_HashCode *context) | 175 | const struct GNUNET_HashCode *context) |
168 | { | 176 | { |
169 | GNUNET_assert ((store) && (store->contacts) && (contact)); | 177 | GNUNET_assert ((store) && (store->contacts) && (contact)); |