diff options
author | Bart Polot <bart@net.in.tum.de> | 2014-07-21 00:15:21 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2014-07-21 00:15:21 +0000 |
commit | cd806ab8dc55774a64ed25b453757f2d9569535f (patch) | |
tree | 198ebbc252ff29b35fcf600b48e3b2e1db8fab1e /src/cadet | |
parent | 5e6a45f88f934e01e25c4042ada3ec7964572e8f (diff) | |
download | gnunet-cd806ab8dc55774a64ed25b453757f2d9569535f.tar.gz gnunet-cd806ab8dc55774a64ed25b453757f2d9569535f.zip |
- doxygen, code formatting
Diffstat (limited to 'src/cadet')
-rw-r--r-- | src/cadet/gnunet-service-cadet_connection.c | 7 | ||||
-rw-r--r-- | src/cadet/gnunet-service-cadet_peer.c | 11 | ||||
-rw-r--r-- | src/cadet/gnunet-service-cadet_peer.h | 14 |
3 files changed, 27 insertions, 5 deletions
diff --git a/src/cadet/gnunet-service-cadet_connection.c b/src/cadet/gnunet-service-cadet_connection.c index 604b9ad4d..eff147a29 100644 --- a/src/cadet/gnunet-service-cadet_connection.c +++ b/src/cadet/gnunet-service-cadet_connection.c | |||
@@ -1114,13 +1114,12 @@ connection_unlock_queue (struct CadetConnection *c, int fwd) | |||
1114 | { | 1114 | { |
1115 | struct CadetPeer *peer; | 1115 | struct CadetPeer *peer; |
1116 | 1116 | ||
1117 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 1117 | LOG (GNUNET_ERROR_TYPE_DEBUG, "connection_unlock_queue %s on %s\n", |
1118 | "connection_unlock_queue %s on %s\n", | 1118 | GC_f2s (fwd), GCC_2s (c)); |
1119 | GC_f2s (fwd), GCC_2s (c)); | ||
1120 | 1119 | ||
1121 | if (GCC_is_terminal (c, fwd)) | 1120 | if (GCC_is_terminal (c, fwd)) |
1122 | { | 1121 | { |
1123 | LOG (GNUNET_ERROR_TYPE_DEBUG, " is terminal!\n"); | 1122 | LOG (GNUNET_ERROR_TYPE_DEBUG, " is terminal, can unlock!\n"); |
1124 | return; | 1123 | return; |
1125 | } | 1124 | } |
1126 | 1125 | ||
diff --git a/src/cadet/gnunet-service-cadet_peer.c b/src/cadet/gnunet-service-cadet_peer.c index d1ef331de..fdd79abcd 100644 --- a/src/cadet/gnunet-service-cadet_peer.c +++ b/src/cadet/gnunet-service-cadet_peer.c | |||
@@ -1428,7 +1428,16 @@ GCP_connection_pop (struct CadetPeer *peer, struct CadetConnection *c) | |||
1428 | return NULL; | 1428 | return NULL; |
1429 | } | 1429 | } |
1430 | 1430 | ||
1431 | 1431 | /** | |
1432 | * Unlock a possibly locked queue for a connection. | ||
1433 | * | ||
1434 | * If there is a message that can be sent on this connection, call core for it. | ||
1435 | * Otherwise (if core transmit is already called or there is no sendable | ||
1436 | * message) do nothing. | ||
1437 | * | ||
1438 | * @param peer Peer who keeps the queue. | ||
1439 | * @param c Connection whose messages to unlock. | ||
1440 | */ | ||
1432 | void | 1441 | void |
1433 | GCP_queue_unlock (struct CadetPeer *peer, struct CadetConnection *c) | 1442 | GCP_queue_unlock (struct CadetPeer *peer, struct CadetConnection *c) |
1434 | { | 1443 | { |
diff --git a/src/cadet/gnunet-service-cadet_peer.h b/src/cadet/gnunet-service-cadet_peer.h index 240e70526..b7297d101 100644 --- a/src/cadet/gnunet-service-cadet_peer.h +++ b/src/cadet/gnunet-service-cadet_peer.h | |||
@@ -169,6 +169,10 @@ GCP_queue_cancel (struct CadetPeer *peer, struct CadetConnection *c); | |||
169 | /** | 169 | /** |
170 | * Get the first message for a connection and unqueue it. | 170 | * Get the first message for a connection and unqueue it. |
171 | * | 171 | * |
172 | * If the message was the last in the connection and the destruction flag | ||
173 | * was set, the connection will be freed by the continuation called by this | ||
174 | * function, and @c c will be INVALID after the call. | ||
175 | * | ||
172 | * @param peer Neighboring peer. | 176 | * @param peer Neighboring peer. |
173 | * @param c Connection. | 177 | * @param c Connection. |
174 | * | 178 | * |
@@ -177,6 +181,16 @@ GCP_queue_cancel (struct CadetPeer *peer, struct CadetConnection *c); | |||
177 | struct GNUNET_MessageHeader * | 181 | struct GNUNET_MessageHeader * |
178 | GCP_connection_pop (struct CadetPeer *peer, struct CadetConnection *c); | 182 | GCP_connection_pop (struct CadetPeer *peer, struct CadetConnection *c); |
179 | 183 | ||
184 | /** | ||
185 | * Unlock a possibly locked queue for a connection. | ||
186 | * | ||
187 | * If there is a message that can be sent on this connection, call core for it. | ||
188 | * Otherwise (if core transmit is already called or there is no sendable | ||
189 | * message) do nothing. | ||
190 | * | ||
191 | * @param peer Peer who keeps the queue. | ||
192 | * @param c Connection whose messages to unlock. | ||
193 | */ | ||
180 | void | 194 | void |
181 | GCP_queue_unlock (struct CadetPeer *peer, struct CadetConnection *c); | 195 | GCP_queue_unlock (struct CadetPeer *peer, struct CadetConnection *c); |
182 | 196 | ||