diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-12-01 19:17:19 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-12-01 19:17:19 +0000 |
commit | 1528d8e538df6d54ac3e3bbacfdd676e4fe7a009 (patch) | |
tree | 31ffb46ab9471989c0f18aa169b29dbc18c93762 /src/transport/transport_api.c | |
parent | dd98aced2a1d779a6aecf5fc2994834c1e48b95e (diff) | |
download | gnunet-1528d8e538df6d54ac3e3bbacfdd676e4fe7a009.tar.gz gnunet-1528d8e538df6d54ac3e3bbacfdd676e4fe7a009.zip |
indent
Diffstat (limited to 'src/transport/transport_api.c')
-rw-r--r-- | src/transport/transport_api.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/transport/transport_api.c b/src/transport/transport_api.c index e9307c3ec..b0154ea78 100644 --- a/src/transport/transport_api.c +++ b/src/transport/transport_api.c | |||
@@ -1139,7 +1139,11 @@ neighbour_free (struct NeighbourList *n) | |||
1139 | n->transmit_handle.notify = NULL; | 1139 | n->transmit_handle.notify = NULL; |
1140 | } | 1140 | } |
1141 | */ | 1141 | */ |
1142 | 1142 | /* NATE: if the above is not needed, then clearly this assertion | |
1143 | should hold (I've checked the code and I'm pretty sure this is | ||
1144 | true. -CG | ||
1145 | FIXME: remove above comments once we've seen tests pass with the assert... */ | ||
1146 | GNUNET_assert (n->transmit_handle.notify_delay_task == GNUNET_SCHEDULER_NO_TASK); | ||
1143 | GNUNET_assert (n->transmit_handle.notify == NULL); | 1147 | GNUNET_assert (n->transmit_handle.notify == NULL); |
1144 | h = n->h; | 1148 | h = n->h; |
1145 | #if DEBUG_TRANSPORT | 1149 | #if DEBUG_TRANSPORT |
@@ -1150,8 +1154,10 @@ neighbour_free (struct NeighbourList *n) | |||
1150 | GNUNET_break (n->is_connected == GNUNET_NO); | 1154 | GNUNET_break (n->is_connected == GNUNET_NO); |
1151 | GNUNET_break (n->transmit_stage == TS_NEW); | 1155 | GNUNET_break (n->transmit_stage == TS_NEW); |
1152 | 1156 | ||
1153 | GNUNET_assert(GNUNET_YES == GNUNET_CONTAINER_multihashmap_remove(h->neighbours, &n->id.hashPubKey, n)); | 1157 | GNUNET_assert(GNUNET_YES == |
1154 | 1158 | GNUNET_CONTAINER_multihashmap_remove(h->neighbours, | |
1159 | &n->id.hashPubKey, | ||
1160 | n)); | ||
1155 | GNUNET_free (n); | 1161 | GNUNET_free (n); |
1156 | } | 1162 | } |
1157 | 1163 | ||
@@ -1208,6 +1214,7 @@ forget_neighbours (void *cls, | |||
1208 | void *value) | 1214 | void *value) |
1209 | { | 1215 | { |
1210 | struct NeighbourList *n = value; | 1216 | struct NeighbourList *n = value; |
1217 | |||
1211 | #if DEBUG_TRANSPORT_DISCONNECT | 1218 | #if DEBUG_TRANSPORT_DISCONNECT |
1212 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1219 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1213 | "Disconnecting due to reconnect being called\n"); | 1220 | "Disconnecting due to reconnect being called\n"); |
@@ -1218,6 +1225,7 @@ forget_neighbours (void *cls, | |||
1218 | return GNUNET_YES; | 1225 | return GNUNET_YES; |
1219 | } | 1226 | } |
1220 | 1227 | ||
1228 | |||
1221 | /** | 1229 | /** |
1222 | * Try again to connect to transport service. | 1230 | * Try again to connect to transport service. |
1223 | * | 1231 | * |
@@ -1238,7 +1246,9 @@ reconnect (void *cls, | |||
1238 | return; | 1246 | return; |
1239 | } | 1247 | } |
1240 | /* Forget about all neighbours that we used to be connected to */ | 1248 | /* Forget about all neighbours that we used to be connected to */ |
1241 | GNUNET_CONTAINER_multihashmap_iterate(h->neighbours, &forget_neighbours, NULL); | 1249 | GNUNET_CONTAINER_multihashmap_iterate(h->neighbours, |
1250 | &forget_neighbours, | ||
1251 | NULL); | ||
1242 | 1252 | ||
1243 | #if DEBUG_TRANSPORT | 1253 | #if DEBUG_TRANSPORT |
1244 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1254 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |