diff options
author | Martin Schanzenbach <mschanzenbach@posteo.de> | 2012-10-30 06:17:19 +0000 |
---|---|---|
committer | Martin Schanzenbach <mschanzenbach@posteo.de> | 2012-10-30 06:17:19 +0000 |
commit | 8c786c49c21bade1f302203bce58cb00c3ee6045 (patch) | |
tree | d5e09b4ef5b6d19741754f45a89be629db3bdf54 | |
parent | e57204ad72a33b14a2319498afc29ffea9ba0704 (diff) | |
download | gnunet-8c786c49c21bade1f302203bce58cb00c3ee6045.tar.gz gnunet-8c786c49c21bade1f302203bce58cb00c3ee6045.zip |
-cleanup
-rw-r--r-- | src/gns/gnunet-service-gns_resolver.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/gns/gnunet-service-gns_resolver.c b/src/gns/gnunet-service-gns_resolver.c index 7391efbf8..40efc8bd8 100644 --- a/src/gns/gnunet-service-gns_resolver.c +++ b/src/gns/gnunet-service-gns_resolver.c | |||
@@ -1063,7 +1063,7 @@ process_record_result_dht (void* cls, | |||
1063 | return; | 1063 | return; |
1064 | } | 1064 | } |
1065 | 1065 | ||
1066 | for (i=0; i<num_records; i++) | 1066 | for (i = 0; i < num_records; i++) |
1067 | { | 1067 | { |
1068 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1068 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1069 | "GNS_PHASE_REC-%llu: Got name: %s (wanted %s)\n", | 1069 | "GNS_PHASE_REC-%llu: Got name: %s (wanted %s)\n", |
@@ -1080,9 +1080,7 @@ process_record_result_dht (void* cls, | |||
1080 | 1080 | ||
1081 | if ((strcmp (name, rh->name) == 0) && | 1081 | if ((strcmp (name, rh->name) == 0) && |
1082 | (rd[i].record_type == rlh->record_type)) | 1082 | (rd[i].record_type == rlh->record_type)) |
1083 | { | ||
1084 | rh->answered++; | 1083 | rh->answered++; |
1085 | } | ||
1086 | 1084 | ||
1087 | } | 1085 | } |
1088 | 1086 | ||
@@ -1122,9 +1120,9 @@ process_record_result_dht (void* cls, | |||
1122 | 1120 | ||
1123 | 1121 | ||
1124 | if (0 < rh->answered) | 1122 | if (0 < rh->answered) |
1125 | rh->proc (rh->proc_cls, rh, num_records, rd); | 1123 | rh->proc (rh->proc_cls, rh, num_records, rd); |
1126 | else | 1124 | else |
1127 | rh->proc (rh->proc_cls, rh, 0, NULL); | 1125 | rh->proc (rh->proc_cls, rh, 0, NULL); |
1128 | } | 1126 | } |
1129 | 1127 | ||
1130 | } | 1128 | } |
@@ -1255,9 +1253,7 @@ process_record_result_ns (void* cls, | |||
1255 | rh->status |= RSL_RECORD_EXISTS; | 1253 | rh->status |= RSL_RECORD_EXISTS; |
1256 | 1254 | ||
1257 | if (remaining_time.rel_value == 0) | 1255 | if (remaining_time.rel_value == 0) |
1258 | { | ||
1259 | rh->status |= RSL_RECORD_EXPIRED; | 1256 | rh->status |= RSL_RECORD_EXPIRED; |
1260 | } | ||
1261 | } | 1257 | } |
1262 | 1258 | ||
1263 | if (rd_count == 0) | 1259 | if (rd_count == 0) |
@@ -1282,7 +1278,7 @@ process_record_result_ns (void* cls, | |||
1282 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 1278 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
1283 | "GNS_PHASE_REC-%llu: Processing additional result %s from namestore\n", | 1279 | "GNS_PHASE_REC-%llu: Processing additional result %s from namestore\n", |
1284 | rh->id, name); | 1280 | rh->id, name); |
1285 | for (i=0; i<rd_count;i++) | 1281 | for (i = 0; i < rd_count;i++) |
1286 | { | 1282 | { |
1287 | if (rd[i].record_type != rlh->record_type) | 1283 | if (rd[i].record_type != rlh->record_type) |
1288 | continue; | 1284 | continue; |
@@ -1338,11 +1334,9 @@ static void | |||
1338 | process_record_result_vpn (void* cls, int af, const void *address) | 1334 | process_record_result_vpn (void* cls, int af, const void *address) |
1339 | { | 1335 | { |
1340 | struct ResolverHandle *rh = cls; | 1336 | struct ResolverHandle *rh = cls; |
1341 | struct RecordLookupHandle *rlh; | 1337 | struct RecordLookupHandle *rlh = rh->proc_cls; |
1342 | struct GNUNET_NAMESTORE_RecordData rd; | 1338 | struct GNUNET_NAMESTORE_RecordData rd; |
1343 | 1339 | ||
1344 | rlh = rh->proc_cls; | ||
1345 | |||
1346 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 1340 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
1347 | "GNS_PHASE_REC_VPN-%llu: Got answer from VPN to query!\n", | 1341 | "GNS_PHASE_REC_VPN-%llu: Got answer from VPN to query!\n", |
1348 | rh->id); | 1342 | rh->id); |