diff options
author | Christian Fuchs <christian.fuchs@cfuchs.net> | 2013-11-11 17:32:48 +0000 |
---|---|---|
committer | Christian Fuchs <christian.fuchs@cfuchs.net> | 2013-11-11 17:32:48 +0000 |
commit | c7954a8ae4bd0e745de626e22b72328e7b2491f4 (patch) | |
tree | af1c4ff37b84d6244756a8024e170352c98e4cda /src/set/gnunet-service-set_intersection.c | |
parent | 74d9e28db4e0e515ec17c5fdd1994f6f18377c7b (diff) | |
download | gnunet-c7954a8ae4bd0e745de626e22b72328e7b2491f4.tar.gz gnunet-c7954a8ae4bd0e745de626e22b72328e7b2491f4.zip |
added many comments
documented set-union state "machine"
removed many deprecated struct-members from state, ops-spec
improved doxygen-compliant
Diffstat (limited to 'src/set/gnunet-service-set_intersection.c')
-rw-r--r-- | src/set/gnunet-service-set_intersection.c | 46 |
1 files changed, 5 insertions, 41 deletions
diff --git a/src/set/gnunet-service-set_intersection.c b/src/set/gnunet-service-set_intersection.c index 0e0450bd1..de5198b9c 100644 --- a/src/set/gnunet-service-set_intersection.c +++ b/src/set/gnunet-service-set_intersection.c | |||
@@ -58,22 +58,6 @@ enum IntersectionOperationPhase | |||
58 | struct OperationState | 58 | struct OperationState |
59 | { | 59 | { |
60 | /** | 60 | /** |
61 | * Tunnel to the remote peer. | ||
62 | */ | ||
63 | struct GNUNET_MESH_Tunnel *tunnel; | ||
64 | |||
65 | /** | ||
66 | * Detail information about the set operation, | ||
67 | * including the set to use. | ||
68 | */ | ||
69 | struct OperationSpecification *spec; | ||
70 | |||
71 | /** | ||
72 | * Message queue for the peer. | ||
73 | */ | ||
74 | struct GNUNET_MQ_Handle *mq; | ||
75 | |||
76 | /** | ||
77 | * The bf we currently receive | 61 | * The bf we currently receive |
78 | */ | 62 | */ |
79 | struct GNUNET_CONTAINER_BloomFilter *remote_bf; | 63 | struct GNUNET_CONTAINER_BloomFilter *remote_bf; |
@@ -93,12 +77,6 @@ struct OperationState | |||
93 | * was created. | 77 | * was created. |
94 | */ | 78 | */ |
95 | unsigned int generation_created; | 79 | unsigned int generation_created; |
96 | |||
97 | /** | ||
98 | * Set state of the set that this operation | ||
99 | * belongs to. | ||
100 | */ | ||
101 | struct Set *set; | ||
102 | 80 | ||
103 | /** | 81 | /** |
104 | * Maps element-id-hashes to 'elements in our set'. | 82 | * Maps element-id-hashes to 'elements in our set'. |
@@ -134,24 +112,6 @@ struct OperationState | |||
134 | }; | 112 | }; |
135 | 113 | ||
136 | 114 | ||
137 | /** | ||
138 | * Extra state required for efficient set intersection. | ||
139 | */ | ||
140 | struct SetState | ||
141 | { | ||
142 | /** | ||
143 | * Evaluate operations are held in | ||
144 | * a linked list. | ||
145 | */ | ||
146 | struct OperationState *ops_head; | ||
147 | |||
148 | /** | ||
149 | * Evaluate operations are held in | ||
150 | * a linked list. | ||
151 | */ | ||
152 | struct OperationState *ops_tail; | ||
153 | }; | ||
154 | |||
155 | 115 | ||
156 | /** | 116 | /** |
157 | * Destroy a intersection operation, and free all resources | 117 | * Destroy a intersection operation, and free all resources |
@@ -739,7 +699,11 @@ finish_and_destroy (struct Operation *op) | |||
739 | send_done_and_destroy (op); | 699 | send_done_and_destroy (op); |
740 | } | 700 | } |
741 | 701 | ||
742 | 702 | /** | |
703 | * handler for peer-disconnects, notifies the client about the aborted operation | ||
704 | * | ||
705 | * @param op the destroyed operation | ||
706 | */ | ||
743 | static void | 707 | static void |
744 | intersection_peer_disconnect (struct Operation *op) | 708 | intersection_peer_disconnect (struct Operation *op) |
745 | { | 709 | { |