diff options
Diffstat (limited to 'src/messenger/gnunet-service-messenger_room.c')
-rw-r--r-- | src/messenger/gnunet-service-messenger_room.c | 142 |
1 files changed, 96 insertions, 46 deletions
diff --git a/src/messenger/gnunet-service-messenger_room.c b/src/messenger/gnunet-service-messenger_room.c index 73e94908f..920abb10e 100644 --- a/src/messenger/gnunet-service-messenger_room.c +++ b/src/messenger/gnunet-service-messenger_room.c | |||
@@ -43,7 +43,8 @@ static void | |||
43 | idle_request_room_messages (void *cls); | 43 | idle_request_room_messages (void *cls); |
44 | 44 | ||
45 | struct GNUNET_MESSENGER_SrvRoom* | 45 | struct GNUNET_MESSENGER_SrvRoom* |
46 | create_room (struct GNUNET_MESSENGER_SrvHandle *handle, const struct GNUNET_HashCode *key) | 46 | create_room (struct GNUNET_MESSENGER_SrvHandle *handle, |
47 | const struct GNUNET_HashCode *key) | ||
47 | { | 48 | { |
48 | GNUNET_assert((handle) && (key)); | 49 | GNUNET_assert((handle) && (key)); |
49 | 50 | ||
@@ -78,7 +79,9 @@ create_room (struct GNUNET_MESSENGER_SrvHandle *handle, const struct GNUNET_Hash | |||
78 | } | 79 | } |
79 | 80 | ||
80 | static int | 81 | static int |
81 | iterate_destroy_tunnels (void *cls, const struct GNUNET_PeerIdentity *key, void *value) | 82 | iterate_destroy_tunnels (void *cls, |
83 | const struct GNUNET_PeerIdentity *key, | ||
84 | void *value) | ||
82 | { | 85 | { |
83 | struct GNUNET_MESSENGER_SrvTunnel *tunnel = value; | 86 | struct GNUNET_MESSENGER_SrvTunnel *tunnel = value; |
84 | destroy_tunnel (tunnel); | 87 | destroy_tunnel (tunnel); |
@@ -150,7 +153,8 @@ get_room_operation_store (struct GNUNET_MESSENGER_SrvRoom *room) | |||
150 | } | 153 | } |
151 | 154 | ||
152 | static int | 155 | static int |
153 | send_room_info (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SrvHandle *handle, | 156 | send_room_info (struct GNUNET_MESSENGER_SrvRoom *room, |
157 | struct GNUNET_MESSENGER_SrvHandle *handle, | ||
154 | struct GNUNET_MESSENGER_SrvTunnel *tunnel) | 158 | struct GNUNET_MESSENGER_SrvTunnel *tunnel) |
155 | { | 159 | { |
156 | if ((!handle) || (!is_tunnel_connected (tunnel))) | 160 | if ((!handle) || (!is_tunnel_connected (tunnel))) |
@@ -160,7 +164,9 @@ send_room_info (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_S | |||
160 | } | 164 | } |
161 | 165 | ||
162 | static void* | 166 | static void* |
163 | callback_room_connect (void *cls, struct GNUNET_CADET_Channel *channel, const struct GNUNET_PeerIdentity *source) | 167 | callback_room_connect (void *cls, |
168 | struct GNUNET_CADET_Channel *channel, | ||
169 | const struct GNUNET_PeerIdentity *source) | ||
164 | { | 170 | { |
165 | struct GNUNET_MESSENGER_SrvRoom *room = cls; | 171 | struct GNUNET_MESSENGER_SrvRoom *room = cls; |
166 | 172 | ||
@@ -197,7 +203,8 @@ callback_room_connect (void *cls, struct GNUNET_CADET_Channel *channel, const st | |||
197 | } | 203 | } |
198 | 204 | ||
199 | static int | 205 | static int |
200 | join_room (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SrvHandle *handle, | 206 | join_room (struct GNUNET_MESSENGER_SrvRoom *room, |
207 | struct GNUNET_MESSENGER_SrvHandle *handle, | ||
201 | struct GNUNET_MESSENGER_Member *member) | 208 | struct GNUNET_MESSENGER_Member *member) |
202 | { | 209 | { |
203 | GNUNET_assert((room) && (handle) && (member)); | 210 | GNUNET_assert((room) && (handle) && (member)); |
@@ -228,8 +235,10 @@ struct GNUNET_MESSENGER_MemberNotify | |||
228 | }; | 235 | }; |
229 | 236 | ||
230 | static void | 237 | static void |
231 | notify_about_members (struct GNUNET_MESSENGER_MemberNotify *notify, struct GNUNET_MESSENGER_MemberSession *session, | 238 | notify_about_members (struct GNUNET_MESSENGER_MemberNotify *notify, |
232 | struct GNUNET_CONTAINER_MultiHashMap *map, int check_permission) | 239 | struct GNUNET_MESSENGER_MemberSession *session, |
240 | struct GNUNET_CONTAINER_MultiHashMap *map, | ||
241 | int check_permission) | ||
233 | { | 242 | { |
234 | if (session->prev) | 243 | if (session->prev) |
235 | notify_about_members (notify, session->prev, map, GNUNET_YES); | 244 | notify_about_members (notify, session->prev, map, GNUNET_YES); |
@@ -258,7 +267,8 @@ notify_about_members (struct GNUNET_MESSENGER_MemberNotify *notify, struct GNUNE | |||
258 | } | 267 | } |
259 | 268 | ||
260 | static int | 269 | static int |
261 | iterate_notify_about_members (void *cls, const struct GNUNET_IDENTITY_PublicKey *public_key, | 270 | iterate_notify_about_members (void *cls, |
271 | const struct GNUNET_IDENTITY_PublicKey *public_key, | ||
262 | struct GNUNET_MESSENGER_MemberSession *session) | 272 | struct GNUNET_MESSENGER_MemberSession *session) |
263 | { | 273 | { |
264 | struct GNUNET_MESSENGER_MemberNotify *notify = cls; | 274 | struct GNUNET_MESSENGER_MemberNotify *notify = cls; |
@@ -275,7 +285,8 @@ iterate_notify_about_members (void *cls, const struct GNUNET_IDENTITY_PublicKey | |||
275 | } | 285 | } |
276 | 286 | ||
277 | static int | 287 | static int |
278 | join_room_locally (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SrvHandle *handle) | 288 | join_room_locally (struct GNUNET_MESSENGER_SrvRoom *room, |
289 | struct GNUNET_MESSENGER_SrvHandle *handle) | ||
279 | { | 290 | { |
280 | const struct GNUNET_ShortHashCode *member_id = get_handle_member_id (handle, get_room_key(room)); | 291 | const struct GNUNET_ShortHashCode *member_id = get_handle_member_id (handle, get_room_key(room)); |
281 | 292 | ||
@@ -306,16 +317,20 @@ join_room_locally (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGE | |||
306 | } | 317 | } |
307 | 318 | ||
308 | extern int | 319 | extern int |
309 | check_tunnel_message (void *cls, const struct GNUNET_MessageHeader *header); | 320 | check_tunnel_message (void *cls, |
321 | const struct GNUNET_MessageHeader *header); | ||
310 | 322 | ||
311 | extern void | 323 | extern void |
312 | handle_tunnel_message (void *cls, const struct GNUNET_MessageHeader *header); | 324 | handle_tunnel_message (void *cls, |
325 | const struct GNUNET_MessageHeader *header); | ||
313 | 326 | ||
314 | extern void | 327 | extern void |
315 | callback_tunnel_disconnect (void *cls, const struct GNUNET_CADET_Channel *channel); | 328 | callback_tunnel_disconnect (void *cls, |
329 | const struct GNUNET_CADET_Channel *channel); | ||
316 | 330 | ||
317 | int | 331 | int |
318 | open_room (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SrvHandle *handle) | 332 | open_room (struct GNUNET_MESSENGER_SrvRoom *room, |
333 | struct GNUNET_MESSENGER_SrvHandle *handle) | ||
319 | { | 334 | { |
320 | GNUNET_assert((room) && (handle)); | 335 | GNUNET_assert((room) && (handle)); |
321 | 336 | ||
@@ -366,7 +381,8 @@ exit_open_room: | |||
366 | } | 381 | } |
367 | 382 | ||
368 | int | 383 | int |
369 | enter_room_at (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SrvHandle *handle, | 384 | enter_room_at (struct GNUNET_MESSENGER_SrvRoom *room, |
385 | struct GNUNET_MESSENGER_SrvHandle *handle, | ||
370 | const struct GNUNET_PeerIdentity *door) | 386 | const struct GNUNET_PeerIdentity *door) |
371 | { | 387 | { |
372 | GNUNET_assert((room) && (handle) && (door)); | 388 | GNUNET_assert((room) && (handle) && (door)); |
@@ -404,8 +420,11 @@ enter_room_at (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_Sr | |||
404 | } | 420 | } |
405 | 421 | ||
406 | struct GNUNET_MQ_Envelope* | 422 | struct GNUNET_MQ_Envelope* |
407 | pack_room_message (const struct GNUNET_MESSENGER_SrvRoom *room, const struct GNUNET_MESSENGER_SrvHandle *handle, | 423 | pack_room_message (const struct GNUNET_MESSENGER_SrvRoom *room, |
408 | struct GNUNET_MESSENGER_Message *message, struct GNUNET_HashCode *hash, int mode) | 424 | const struct GNUNET_MESSENGER_SrvHandle *handle, |
425 | struct GNUNET_MESSENGER_Message *message, | ||
426 | struct GNUNET_HashCode *hash, | ||
427 | int mode) | ||
409 | { | 428 | { |
410 | GNUNET_assert((room) && (handle) && (message) && (hash)); | 429 | GNUNET_assert((room) && (handle) && (message) && (hash)); |
411 | 430 | ||
@@ -432,7 +451,9 @@ struct GNUNET_MESSENGER_ClosureSendRoom | |||
432 | }; | 451 | }; |
433 | 452 | ||
434 | static int | 453 | static int |
435 | iterate_send_room_message (void *cls, const struct GNUNET_PeerIdentity *key, void *value) | 454 | iterate_send_room_message (void *cls, |
455 | const struct GNUNET_PeerIdentity *key, | ||
456 | void *value) | ||
436 | { | 457 | { |
437 | struct GNUNET_MESSENGER_SrvTunnel *tunnel = value; | 458 | struct GNUNET_MESSENGER_SrvTunnel *tunnel = value; |
438 | 459 | ||
@@ -466,14 +487,18 @@ iterate_send_room_message (void *cls, const struct GNUNET_PeerIdentity *key, voi | |||
466 | 487 | ||
467 | int | 488 | int |
468 | update_room_message (struct GNUNET_MESSENGER_SrvRoom *room, | 489 | update_room_message (struct GNUNET_MESSENGER_SrvRoom *room, |
469 | struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash); | 490 | struct GNUNET_MESSENGER_Message *message, |
491 | const struct GNUNET_HashCode *hash); | ||
470 | 492 | ||
471 | void | 493 | void |
472 | callback_room_handle_message (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SrvHandle *handle, | 494 | callback_room_handle_message (struct GNUNET_MESSENGER_SrvRoom *room, |
473 | const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash); | 495 | struct GNUNET_MESSENGER_SrvHandle *handle, |
496 | const struct GNUNET_MESSENGER_Message *message, | ||
497 | const struct GNUNET_HashCode *hash); | ||
474 | 498 | ||
475 | int | 499 | int |
476 | send_room_message (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SrvHandle *handle, | 500 | send_room_message (struct GNUNET_MESSENGER_SrvRoom *room, |
501 | struct GNUNET_MESSENGER_SrvHandle *handle, | ||
477 | struct GNUNET_MESSENGER_Message *message) | 502 | struct GNUNET_MESSENGER_Message *message) |
478 | { | 503 | { |
479 | GNUNET_assert((room) && (handle)); | 504 | GNUNET_assert((room) && (handle)); |
@@ -530,8 +555,10 @@ send_room_message (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGE | |||
530 | } | 555 | } |
531 | 556 | ||
532 | void | 557 | void |
533 | forward_room_message (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SrvTunnel *tunnel, | 558 | forward_room_message (struct GNUNET_MESSENGER_SrvRoom *room, |
534 | struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash) | 559 | struct GNUNET_MESSENGER_SrvTunnel *tunnel, |
560 | struct GNUNET_MESSENGER_Message *message, | ||
561 | const struct GNUNET_HashCode *hash) | ||
535 | { | 562 | { |
536 | GNUNET_assert((room) && (tunnel)); | 563 | GNUNET_assert((room) && (tunnel)); |
537 | 564 | ||
@@ -554,7 +581,8 @@ forward_room_message (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSE | |||
554 | } | 581 | } |
555 | 582 | ||
556 | void | 583 | void |
557 | check_room_peer_status (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SrvTunnel *tunnel) | 584 | check_room_peer_status (struct GNUNET_MESSENGER_SrvRoom *room, |
585 | struct GNUNET_MESSENGER_SrvTunnel *tunnel) | ||
558 | { | 586 | { |
559 | if (!room->peer_message) | 587 | if (!room->peer_message) |
560 | return; | 588 | return; |
@@ -592,7 +620,8 @@ resend_peer_message: | |||
592 | } | 620 | } |
593 | 621 | ||
594 | void | 622 | void |
595 | merge_room_last_messages (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SrvHandle *handle) | 623 | merge_room_last_messages (struct GNUNET_MESSENGER_SrvRoom *room, |
624 | struct GNUNET_MESSENGER_SrvHandle *handle) | ||
596 | { | 625 | { |
597 | GNUNET_assert(room); | 626 | GNUNET_assert(room); |
598 | 627 | ||
@@ -612,7 +641,8 @@ merge_next: | |||
612 | } | 641 | } |
613 | 642 | ||
614 | void | 643 | void |
615 | callback_room_deletion (struct GNUNET_MESSENGER_SrvRoom *room, const struct GNUNET_HashCode *hash) | 644 | callback_room_deletion (struct GNUNET_MESSENGER_SrvRoom *room, |
645 | const struct GNUNET_HashCode *hash) | ||
616 | { | 646 | { |
617 | if (GNUNET_OK != delete_store_message (get_room_message_store(room), hash)) | 647 | if (GNUNET_OK != delete_store_message (get_room_message_store(room), hash)) |
618 | { | 648 | { |
@@ -622,7 +652,8 @@ callback_room_deletion (struct GNUNET_MESSENGER_SrvRoom *room, const struct GNUN | |||
622 | } | 652 | } |
623 | 653 | ||
624 | void | 654 | void |
625 | callback_room_merge (struct GNUNET_MESSENGER_SrvRoom *room, const struct GNUNET_HashCode *hash) | 655 | callback_room_merge (struct GNUNET_MESSENGER_SrvRoom *room, |
656 | const struct GNUNET_HashCode *hash) | ||
626 | { | 657 | { |
627 | if (!room->host) | 658 | if (!room->host) |
628 | return; | 659 | return; |
@@ -631,8 +662,10 @@ callback_room_merge (struct GNUNET_MESSENGER_SrvRoom *room, const struct GNUNET_ | |||
631 | } | 662 | } |
632 | 663 | ||
633 | int | 664 | int |
634 | delete_room_message (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_MemberSession *session, | 665 | delete_room_message (struct GNUNET_MESSENGER_SrvRoom *room, |
635 | const struct GNUNET_HashCode *hash, const struct GNUNET_TIME_Relative delay) | 666 | struct GNUNET_MESSENGER_MemberSession *session, |
667 | const struct GNUNET_HashCode *hash, | ||
668 | const struct GNUNET_TIME_Relative delay) | ||
636 | { | 669 | { |
637 | GNUNET_assert((room) && (session) && (hash)); | 670 | GNUNET_assert((room) && (session) && (hash)); |
638 | 671 | ||
@@ -687,7 +720,8 @@ get_room_key (const struct GNUNET_MESSENGER_SrvRoom *room) | |||
687 | } | 720 | } |
688 | 721 | ||
689 | const struct GNUNET_MESSENGER_SrvTunnel* | 722 | const struct GNUNET_MESSENGER_SrvTunnel* |
690 | get_room_tunnel (const struct GNUNET_MESSENGER_SrvRoom *room, const struct GNUNET_PeerIdentity *peer) | 723 | get_room_tunnel (const struct GNUNET_MESSENGER_SrvRoom *room, |
724 | const struct GNUNET_PeerIdentity *peer) | ||
691 | { | 725 | { |
692 | GNUNET_assert((room) && (peer)); | 726 | GNUNET_assert((room) && (peer)); |
693 | 727 | ||
@@ -695,9 +729,11 @@ get_room_tunnel (const struct GNUNET_MESSENGER_SrvRoom *room, const struct GNUNE | |||
695 | } | 729 | } |
696 | 730 | ||
697 | static int | 731 | static int |
698 | request_room_message_step (struct GNUNET_MESSENGER_SrvRoom *room, const struct GNUNET_HashCode *hash, | 732 | request_room_message_step (struct GNUNET_MESSENGER_SrvRoom *room, |
733 | const struct GNUNET_HashCode *hash, | ||
699 | const struct GNUNET_MESSENGER_MemberSession *session, | 734 | const struct GNUNET_MESSENGER_MemberSession *session, |
700 | GNUNET_MESSENGER_MessageRequestCallback callback, void* cls) | 735 | GNUNET_MESSENGER_MessageRequestCallback callback, |
736 | void* cls) | ||
701 | { | 737 | { |
702 | struct GNUNET_MESSENGER_MessageStore *message_store = get_room_message_store(room); | 738 | struct GNUNET_MESSENGER_MessageStore *message_store = get_room_message_store(room); |
703 | 739 | ||
@@ -732,9 +768,11 @@ forward: | |||
732 | } | 768 | } |
733 | 769 | ||
734 | int | 770 | int |
735 | request_room_message (struct GNUNET_MESSENGER_SrvRoom *room, const struct GNUNET_HashCode *hash, | 771 | request_room_message (struct GNUNET_MESSENGER_SrvRoom *room, |
772 | const struct GNUNET_HashCode *hash, | ||
736 | const struct GNUNET_MESSENGER_MemberSession *session, | 773 | const struct GNUNET_MESSENGER_MemberSession *session, |
737 | GNUNET_MESSENGER_MessageRequestCallback callback, void* cls) | 774 | GNUNET_MESSENGER_MessageRequestCallback callback, |
775 | void* cls) | ||
738 | { | 776 | { |
739 | GNUNET_assert((room) && (hash)); | 777 | GNUNET_assert((room) && (hash)); |
740 | 778 | ||
@@ -747,7 +785,8 @@ request_room_message (struct GNUNET_MESSENGER_SrvRoom *room, const struct GNUNET | |||
747 | } | 785 | } |
748 | 786 | ||
749 | void | 787 | void |
750 | callback_room_disconnect (struct GNUNET_MESSENGER_SrvRoom *room, void *cls) | 788 | callback_room_disconnect (struct GNUNET_MESSENGER_SrvRoom *room, |
789 | void *cls) | ||
751 | { | 790 | { |
752 | struct GNUNET_MESSENGER_SrvTunnel *tunnel = cls; | 791 | struct GNUNET_MESSENGER_SrvTunnel *tunnel = cls; |
753 | 792 | ||
@@ -766,8 +805,10 @@ callback_room_disconnect (struct GNUNET_MESSENGER_SrvRoom *room, void *cls) | |||
766 | } | 805 | } |
767 | 806 | ||
768 | int | 807 | int |
769 | callback_verify_room_message (struct GNUNET_MESSENGER_SrvRoom *room, void *cls, | 808 | callback_verify_room_message (struct GNUNET_MESSENGER_SrvRoom *room, |
770 | struct GNUNET_MESSENGER_Message *message, struct GNUNET_HashCode *hash) | 809 | void *cls, |
810 | struct GNUNET_MESSENGER_Message *message, | ||
811 | struct GNUNET_HashCode *hash) | ||
771 | { | 812 | { |
772 | if (GNUNET_MESSENGER_KIND_UNKNOWN == message->header.kind) | 813 | if (GNUNET_MESSENGER_KIND_UNKNOWN == message->header.kind) |
773 | { | 814 | { |
@@ -826,8 +867,10 @@ idle_request_room_messages (void *cls) | |||
826 | } | 867 | } |
827 | 868 | ||
828 | void | 869 | void |
829 | solve_room_member_collisions (struct GNUNET_MESSENGER_SrvRoom *room, const struct GNUNET_IDENTITY_PublicKey *public_key, | 870 | solve_room_member_collisions (struct GNUNET_MESSENGER_SrvRoom *room, |
830 | const struct GNUNET_ShortHashCode *member_id, struct GNUNET_TIME_Absolute timestamp) | 871 | const struct GNUNET_IDENTITY_PublicKey *public_key, |
872 | const struct GNUNET_ShortHashCode *member_id, | ||
873 | struct GNUNET_TIME_Absolute timestamp) | ||
831 | { | 874 | { |
832 | GNUNET_assert ((room) && (public_key) && (member_id)); | 875 | GNUNET_assert ((room) && (public_key) && (member_id)); |
833 | 876 | ||
@@ -945,7 +988,8 @@ finish_handling: | |||
945 | 988 | ||
946 | int | 989 | int |
947 | update_room_message (struct GNUNET_MESSENGER_SrvRoom *room, | 990 | update_room_message (struct GNUNET_MESSENGER_SrvRoom *room, |
948 | struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash) | 991 | struct GNUNET_MESSENGER_Message *message, |
992 | const struct GNUNET_HashCode *hash) | ||
949 | { | 993 | { |
950 | GNUNET_assert((room) && (message) && (hash)); | 994 | GNUNET_assert((room) && (message) && (hash)); |
951 | 995 | ||
@@ -1008,7 +1052,8 @@ struct GNUNET_MESSENGER_MemberUpdate | |||
1008 | }; | 1052 | }; |
1009 | 1053 | ||
1010 | static int | 1054 | static int |
1011 | iterate_update_member_sessions (void *cls, const struct GNUNET_IDENTITY_PublicKey *public_key, | 1055 | iterate_update_member_sessions (void *cls, |
1056 | const struct GNUNET_IDENTITY_PublicKey *public_key, | ||
1012 | struct GNUNET_MESSENGER_MemberSession *session) | 1057 | struct GNUNET_MESSENGER_MemberSession *session) |
1013 | { | 1058 | { |
1014 | struct GNUNET_MESSENGER_MemberUpdate *update = cls; | 1059 | struct GNUNET_MESSENGER_MemberUpdate *update = cls; |
@@ -1030,11 +1075,14 @@ iterate_update_member_sessions (void *cls, const struct GNUNET_IDENTITY_PublicKe | |||
1030 | } | 1075 | } |
1031 | 1076 | ||
1032 | static void | 1077 | static void |
1033 | remove_room_member_session (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_MemberSession *session); | 1078 | remove_room_member_session (struct GNUNET_MESSENGER_SrvRoom *room, |
1079 | struct GNUNET_MESSENGER_MemberSession *session); | ||
1034 | 1080 | ||
1035 | void | 1081 | void |
1036 | callback_room_handle_message (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SrvHandle *handle, | 1082 | callback_room_handle_message (struct GNUNET_MESSENGER_SrvRoom *room, |
1037 | const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash) | 1083 | struct GNUNET_MESSENGER_SrvHandle *handle, |
1084 | const struct GNUNET_MESSENGER_Message *message, | ||
1085 | const struct GNUNET_HashCode *hash) | ||
1038 | { | 1086 | { |
1039 | struct GNUNET_MESSENGER_MemberStore *member_store = get_room_member_store(room); | 1087 | struct GNUNET_MESSENGER_MemberStore *member_store = get_room_member_store(room); |
1040 | struct GNUNET_MESSENGER_Member *member = get_store_member_of(member_store, message); | 1088 | struct GNUNET_MESSENGER_Member *member = get_store_member_of(member_store, message); |
@@ -1113,7 +1161,8 @@ callback_room_handle_message (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUN | |||
1113 | } | 1161 | } |
1114 | 1162 | ||
1115 | static void | 1163 | static void |
1116 | get_room_data_subdir (struct GNUNET_MESSENGER_SrvRoom *room, char **dir) | 1164 | get_room_data_subdir (struct GNUNET_MESSENGER_SrvRoom *room, |
1165 | char **dir) | ||
1117 | { | 1166 | { |
1118 | GNUNET_assert((room) && (dir)); | 1167 | GNUNET_assert((room) && (dir)); |
1119 | 1168 | ||
@@ -1178,7 +1227,8 @@ save_room (struct GNUNET_MESSENGER_SrvRoom *room) | |||
1178 | } | 1227 | } |
1179 | 1228 | ||
1180 | static void | 1229 | static void |
1181 | remove_room_member_session (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_MemberSession *session) | 1230 | remove_room_member_session (struct GNUNET_MESSENGER_SrvRoom *room, |
1231 | struct GNUNET_MESSENGER_MemberSession *session) | ||
1182 | { | 1232 | { |
1183 | GNUNET_assert ((room) && (session)); | 1233 | GNUNET_assert ((room) && (session)); |
1184 | 1234 | ||