From 6270643579b3496a2c51ef2c8abb0fb4b34726de Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 27 Jun 2012 09:59:46 +0200 Subject: [PATCH] Different diagnostic for no record and given checksum --- src/http_command.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/http_command.c b/src/http_command.c index 122bef5..cbca61b 100644 --- a/src/http_command.c +++ b/src/http_command.c @@ -990,18 +990,18 @@ static void show_record(struct http_channel *c, struct http_session *s) for (i = 0; r; r = r->next) if (v == r->checksum) break; + if (!r) + error(rs, PAZPAR2_RECORD_FAIL, "no record"); } else { int offset = atoi(offsetstr); for (i = 0; i < offset && r; r = r->next, i++) ; + if (!r) + error(rs, PAZPAR2_RECORD_FAIL, "no record at offset given"); } - if (!r) - { - error(rs, PAZPAR2_RECORD_FAIL, "no record at offset given"); - } - else + if (r) { http_channel_observer_t obs = http_add_observer(c, r->client, show_raw_reset); -- 1.7.10.4