diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-06-04 13:24:23 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-06-04 13:24:23 +0000 |
commit | 11aa37c567414b05c08e4eefac5e8f3df69e7e3d (patch) | |
tree | 27361406e1985e32f69f78c06a0e8cbc76947ed3 /src/fs/gnunet-service-fs_pr.c | |
parent | efe824206c806a535acb63d94acda5d406a3e359 (diff) | |
download | gnunet-11aa37c567414b05c08e4eefac5e8f3df69e7e3d.tar.gz gnunet-11aa37c567414b05c08e4eefac5e8f3df69e7e3d.zip |
-rename stream->mesh in comments and symbols
Diffstat (limited to 'src/fs/gnunet-service-fs_pr.c')
-rw-r--r-- | src/fs/gnunet-service-fs_pr.c | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/src/fs/gnunet-service-fs_pr.c b/src/fs/gnunet-service-fs_pr.c index 8bcc96b05..de7a729b6 100644 --- a/src/fs/gnunet-service-fs_pr.c +++ b/src/fs/gnunet-service-fs_pr.c | |||
@@ -64,7 +64,7 @@ | |||
64 | #define INSANE_STATISTICS GNUNET_NO | 64 | #define INSANE_STATISTICS GNUNET_NO |
65 | 65 | ||
66 | /** | 66 | /** |
67 | * If obtaining a block via stream fails, how often do we retry it before | 67 | * If obtaining a block via mesh fails, how often do we retry it before |
68 | * giving up for good (and sticking to non-anonymous transfer)? | 68 | * giving up for good (and sticking to non-anonymous transfer)? |
69 | */ | 69 | */ |
70 | #define STREAM_RETRY_MAX 3 | 70 | #define STREAM_RETRY_MAX 3 |
@@ -118,7 +118,7 @@ struct GSF_PendingRequest | |||
118 | /** | 118 | /** |
119 | * Stream request handle for this request (or NULL for none). | 119 | * Stream request handle for this request (or NULL for none). |
120 | */ | 120 | */ |
121 | struct GSF_StreamRequest *stream_request; | 121 | struct GSF_StreamRequest *mesh_request; |
122 | 122 | ||
123 | /** | 123 | /** |
124 | * Function to call upon completion of the local get | 124 | * Function to call upon completion of the local get |
@@ -173,10 +173,10 @@ struct GSF_PendingRequest | |||
173 | uint64_t first_uid; | 173 | uint64_t first_uid; |
174 | 174 | ||
175 | /** | 175 | /** |
176 | * How often have we retried this request via 'stream'? | 176 | * How often have we retried this request via 'mesh'? |
177 | * (used to bound overall retries). | 177 | * (used to bound overall retries). |
178 | */ | 178 | */ |
179 | unsigned int stream_retry_count; | 179 | unsigned int mesh_retry_count; |
180 | 180 | ||
181 | /** | 181 | /** |
182 | * Number of valid entries in the 'replies_seen' array. | 182 | * Number of valid entries in the 'replies_seen' array. |
@@ -626,10 +626,10 @@ clean_request (void *cls, const struct GNUNET_HashCode * key, void *value) | |||
626 | GNUNET_DHT_get_stop (pr->gh); | 626 | GNUNET_DHT_get_stop (pr->gh); |
627 | pr->gh = NULL; | 627 | pr->gh = NULL; |
628 | } | 628 | } |
629 | if (NULL != pr->stream_request) | 629 | if (NULL != pr->mesh_request) |
630 | { | 630 | { |
631 | GSF_stream_query_cancel (pr->stream_request); | 631 | GSF_mesh_query_cancel (pr->mesh_request); |
632 | pr->stream_request = NULL; | 632 | pr->mesh_request = NULL; |
633 | } | 633 | } |
634 | if (GNUNET_SCHEDULER_NO_TASK != pr->warn_task) | 634 | if (GNUNET_SCHEDULER_NO_TASK != pr->warn_task) |
635 | { | 635 | { |
@@ -683,10 +683,10 @@ GSF_pending_request_cancel_ (struct GSF_PendingRequest *pr, int full_cleanup) | |||
683 | GNUNET_DHT_get_stop (pr->gh); | 683 | GNUNET_DHT_get_stop (pr->gh); |
684 | pr->gh = NULL; | 684 | pr->gh = NULL; |
685 | } | 685 | } |
686 | if (NULL != pr->stream_request) | 686 | if (NULL != pr->mesh_request) |
687 | { | 687 | { |
688 | GSF_stream_query_cancel (pr->stream_request); | 688 | GSF_mesh_query_cancel (pr->mesh_request); |
689 | pr->stream_request = NULL; | 689 | pr->mesh_request = NULL; |
690 | } | 690 | } |
691 | if (GNUNET_SCHEDULER_NO_TASK != pr->warn_task) | 691 | if (GNUNET_SCHEDULER_NO_TASK != pr->warn_task) |
692 | { | 692 | { |
@@ -1136,7 +1136,7 @@ GSF_dht_lookup_ (struct GSF_PendingRequest *pr) | |||
1136 | 1136 | ||
1137 | 1137 | ||
1138 | /** | 1138 | /** |
1139 | * Function called with a reply from the stream. | 1139 | * Function called with a reply from the mesh. |
1140 | * | 1140 | * |
1141 | * @param cls the pending request struct | 1141 | * @param cls the pending request struct |
1142 | * @param type type of the block, ANY on error | 1142 | * @param type type of the block, ANY on error |
@@ -1145,7 +1145,7 @@ GSF_dht_lookup_ (struct GSF_PendingRequest *pr) | |||
1145 | * @param data reply block data, NULL on error | 1145 | * @param data reply block data, NULL on error |
1146 | */ | 1146 | */ |
1147 | static void | 1147 | static void |
1148 | stream_reply_proc (void *cls, | 1148 | mesh_reply_proc (void *cls, |
1149 | enum GNUNET_BLOCK_Type type, | 1149 | enum GNUNET_BLOCK_Type type, |
1150 | struct GNUNET_TIME_Absolute expiration, | 1150 | struct GNUNET_TIME_Absolute expiration, |
1151 | size_t data_size, | 1151 | size_t data_size, |
@@ -1155,22 +1155,22 @@ stream_reply_proc (void *cls, | |||
1155 | struct ProcessReplyClosure prq; | 1155 | struct ProcessReplyClosure prq; |
1156 | struct GNUNET_HashCode query; | 1156 | struct GNUNET_HashCode query; |
1157 | 1157 | ||
1158 | pr->stream_request = NULL; | 1158 | pr->mesh_request = NULL; |
1159 | if (GNUNET_BLOCK_TYPE_ANY == type) | 1159 | if (GNUNET_BLOCK_TYPE_ANY == type) |
1160 | { | 1160 | { |
1161 | GNUNET_break (NULL == data); | 1161 | GNUNET_break (NULL == data); |
1162 | GNUNET_break (0 == data_size); | 1162 | GNUNET_break (0 == data_size); |
1163 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1163 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1164 | "Error retrieiving block via stream\n"); | 1164 | "Error retrieiving block via mesh\n"); |
1165 | pr->stream_retry_count++; | 1165 | pr->mesh_retry_count++; |
1166 | if (pr->stream_retry_count >= STREAM_RETRY_MAX) | 1166 | if (pr->mesh_retry_count >= STREAM_RETRY_MAX) |
1167 | return; /* give up on stream */ | 1167 | return; /* give up on mesh */ |
1168 | /* retry -- without delay, as this is non-anonymous | 1168 | /* retry -- without delay, as this is non-anonymous |
1169 | and mesh/stream connect will take some time anyway */ | 1169 | and mesh/mesh connect will take some time anyway */ |
1170 | pr->stream_request = GSF_stream_query (pr->public_data.target, | 1170 | pr->mesh_request = GSF_mesh_query (pr->public_data.target, |
1171 | &pr->public_data.query, | 1171 | &pr->public_data.query, |
1172 | pr->public_data.type, | 1172 | pr->public_data.type, |
1173 | &stream_reply_proc, | 1173 | &mesh_reply_proc, |
1174 | pr); | 1174 | pr); |
1175 | return; | 1175 | return; |
1176 | } | 1176 | } |
@@ -1201,27 +1201,27 @@ stream_reply_proc (void *cls, | |||
1201 | 1201 | ||
1202 | 1202 | ||
1203 | /** | 1203 | /** |
1204 | * Consider downloading via stream (if possible) | 1204 | * Consider downloading via mesh (if possible) |
1205 | * | 1205 | * |
1206 | * @param pr the pending request to process | 1206 | * @param pr the pending request to process |
1207 | */ | 1207 | */ |
1208 | void | 1208 | void |
1209 | GSF_stream_lookup_ (struct GSF_PendingRequest *pr) | 1209 | GSF_mesh_lookup_ (struct GSF_PendingRequest *pr) |
1210 | { | 1210 | { |
1211 | if (0 != pr->public_data.anonymity_level) | 1211 | if (0 != pr->public_data.anonymity_level) |
1212 | return; | 1212 | return; |
1213 | if (0 == pr->public_data.target) | 1213 | if (0 == pr->public_data.target) |
1214 | { | 1214 | { |
1215 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1215 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1216 | "Cannot do stream-based download, target peer not known\n"); | 1216 | "Cannot do mesh-based download, target peer not known\n"); |
1217 | return; | 1217 | return; |
1218 | } | 1218 | } |
1219 | if (NULL != pr->stream_request) | 1219 | if (NULL != pr->mesh_request) |
1220 | return; | 1220 | return; |
1221 | pr->stream_request = GSF_stream_query (pr->public_data.target, | 1221 | pr->mesh_request = GSF_mesh_query (pr->public_data.target, |
1222 | &pr->public_data.query, | 1222 | &pr->public_data.query, |
1223 | pr->public_data.type, | 1223 | pr->public_data.type, |
1224 | &stream_reply_proc, | 1224 | &mesh_reply_proc, |
1225 | pr); | 1225 | pr); |
1226 | } | 1226 | } |
1227 | 1227 | ||
@@ -1550,7 +1550,7 @@ GSF_local_lookup_ (struct GSF_PendingRequest *pr, | |||
1550 | GSF_LocalLookupContinuation cont, void *cont_cls) | 1550 | GSF_LocalLookupContinuation cont, void *cont_cls) |
1551 | { | 1551 | { |
1552 | GNUNET_assert (NULL == pr->gh); | 1552 | GNUNET_assert (NULL == pr->gh); |
1553 | GNUNET_assert (NULL == pr->stream_request); | 1553 | GNUNET_assert (NULL == pr->mesh_request); |
1554 | GNUNET_assert (NULL == pr->llc_cont); | 1554 | GNUNET_assert (NULL == pr->llc_cont); |
1555 | pr->llc_cont = cont; | 1555 | pr->llc_cont = cont; |
1556 | pr->llc_cont_cls = cont_cls; | 1556 | pr->llc_cont_cls = cont_cls; |