[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-wget] [PATCH 7/8] Remove defensive assert in cookies.c
From: |
Darshit Shah |
Subject: |
[Bug-wget] [PATCH 7/8] Remove defensive assert in cookies.c |
Date: |
Sat, 22 Nov 2014 14:52:21 +0530 |
---
src/ChangeLog | 5 +++++
src/cookies.c | 8 +++++++-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/ChangeLog b/src/ChangeLog
index 4a2b1b9..c0d6466 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,10 @@
2014-11-22 Darshit Shah <address@hidden>
+ * cookies.c (discard_matching_cookie): Replace defensive assert with a
+ logical check and error message
+
+2014-11-22 Darshit Shah <address@hidden>
+
* wget.h: Make extern declaration for program_argstring.
* warc.c: Remove extern declaration
* test.c: Make program_argstring a char *, instead of const char *.
diff --git a/src/cookies.c b/src/cookies.c
index 365f8d5..aaec52b 100644
--- a/src/cookies.c
+++ b/src/cookies.c
@@ -304,7 +304,13 @@ discard_matching_cookie (struct cookie_jar *jar, struct
cookie *cookie)
res = hash_table_get_pair (jar->chains, victim->domain,
&chain_key, NULL);
- assert (res != 0);
+
+ if (res == 0)
+ {
+ logprintf (LOG_VERBOSE, _("Unable to get cookie for %s"),
+ victim->domain);
+ DEBUGP(("Cookie details not found in Hash Table."));
+ }
if (!victim->next)
{
/* VICTIM was the only cookie in the chain. Destroy the
--
2.1.3
- Re: [Bug-wget] [PATCH 2/8] Add extern declaration for version.c strings, (continued)
- [Bug-wget] [PATCH 1/8] Mark unused paramter in utils.c, Darshit Shah, 2014/11/22
- [Bug-wget] [PATCH 3/8] Fix missing extern declaration error for build_info.pl, Darshit Shah, 2014/11/22
- [Bug-wget] [PATCH 5/8] Make extern declaration for program_name, Darshit Shah, 2014/11/22
- [Bug-wget] [PATCH 4/8] Declare extern numurls in common header, Darshit Shah, 2014/11/22
- [Bug-wget] [PATCH 6/8] Add extern declaration for program_arsgstring, Darshit Shah, 2014/11/22
- [Bug-wget] [PATCH 7/8] Remove defensive assert in cookies.c,
Darshit Shah <=
- [Bug-wget] [PATCH 8/8] Supplement logical assumption assert with error message, Darshit Shah, 2014/11/22
- Re: [Bug-wget] Fix various compiler warnings, Tim Rühsen, 2014/11/22
- Re: [Bug-wget] Fix various compiler warnings, Giuseppe Scrivano, 2014/11/24