Re: [Bug-wget] further help needed!!

2018-05-08 Thread Darshit Shah
Hi,

Please do not create a separate thread when replying to a previous email.
It makes it hard for us to keep track of the context.

Answering inline...

* Sameeran Joshi  [180506 16:16]:
> thanks for u r help!@Darshit Shah
> 1.GOAL:To learn the internal logic of simple wget command 'wget
> www.google.com' and get acquainted with the code base of any open source
> project

This command looks simple, but in reality a lot goes on underneath.
If you're interested in the logic, I would suggest you start from the main()
function in `src/wget.c` and follow the logic. Dig deeper into any function
call which you think leads to downloading the web-page.

Hint: The actual download is always done on a separate thread. Look for the
thread function calls.

>
> 2.how do you come to know which directory contains what and does what,

Usually, we try to keep the naming pretty accurate. So, if you see a directory
called, `libwget`, it contains the source for "libwget". Similarly, if a file
is called, "http_highlevel.c", then there's a fairly good chance that the file
contains the highlevel HTTP API. Now, what is highlevel may be ambiguous, but
that is something you'll just have to look for.

In general, follow the names.

>  2.A.while looking at /docs I found it dosen't contain the documentation
> which tells you about the structure and use of functions

Run `make` first. It will build the libwget API documentation.

>  2.B.googling out gives me this
> https://www.gnu.org/software/wget/manual/wget.html#Wgetrc-Location
> which too tells about the use of wget
> 
That's for Wget 1.x, not Wget2. 

>   SO WHERE DO I FIND THE CORRECT DOCUMENTATION FOR DEVELOPERS?

Firstly, please remember that on the internet, ALL CAPS is considered shouting
and it generally frowned upon.

Specifically what kind of documentation are you looking for? If you simply want
to use the libwget API, you can take a look at 
https://gnuwget.gitlab.io/wget2/reference/

This should also serve as decent documentation for understanding what function
does what.

You can build this documentation locally using `make` as well.

> 3.Are there any kind of algorithms or flowcharts describing the working of
> the file?,as it would be easy rather to dive into code to understand it
> better.

Sadly, nope. We don't have any design documentation. You'll just have to wade
through the code to figure it out. If you're stuck on something, you can ask on
the mailing lists / IRC.

Any help / efforts on improving the documentation are definitely appreciated :)

-- 
Thanking You,
Darshit Shah
PGP Fingerprint: 7845 120B 07CB D8D6 ECE5 FF2B 2A17 43ED A91A 35B6


signature.asc
Description: PGP signature


Re: [Bug-wget] Need help

2018-05-08 Thread Darshit Shah
Hi,

Apart from from Tim has already mentioned, please also consider:

1. Do not create a new mail thread for every email. Please use the same thread
   for logically connected mails. I do not wish to go searching for the context
   your email through my inbox.

2. Like I've mentioned before, responses may take in the order of days. You
   sent a message less than 2 days ago and it was ambiguously worded.

We are a team on volunteers doing this in our spare time. Sometimes, no one has
any time to look into the matters for GNU Wget since we have a day job to work
on. Please keep patient, and if your queries haven't been answered after 2+
days, just send a little reminder, *on the same thread*.

* Sameeran Joshi  [180508 05:53]:
> Hi,I have sent emails on mailing list regarding some doubts,they aren't
> replied so generally how many days does it take for reply from
> maintainers,as I am newbie I thought no one is replying to mails,but one of
> my friend told to ask on mailing list may be the people are busy.
> Thanku

-- 
Thanking You,
Darshit Shah
PGP Fingerprint: 7845 120B 07CB D8D6 ECE5 FF2B 2A17 43ED A91A 35B6


signature.asc
Description: PGP signature


Re: [Bug-wget] Need help

2018-05-08 Thread Tim Rühsen
Hi Sameeran,

people only answer questions if the know the answer.


Your original email was quite confusing. At least I didn't understand
your problem and thus didn't answer. Try to be precise and if possible
add an example or your error output (the relevant parts).

With Best Regards, Tim



On 05/08/2018 05:52 AM, Sameeran Joshi wrote:
> Hi,I have sent emails on mailing list regarding some doubts,they aren't
> replied so generally how many days does it take for reply from
> maintainers,as I am newbie I thought no one is replying to mails,but one of
> my friend told to ask on mailing list may be the people are busy.
> Thanku
> 



signature.asc
Description: OpenPGP digital signature


Re: [Bug-wget] Wget not ignoring the return value of a void function in 1.19.5

2018-05-08 Thread Tim Rühsen
On 05/08/2018 09:16 AM, Josef Moellers wrote:
> Hi,
> 
> While trying to upgrade to 1.19.5, we found a bug in wget (src/host.c)
> where the (non-existing) return value of a void function is assigned to
> a variable.
> 
> A patch is appended.

Thanks,

setting timer to NULL is not needed here.

I'll amended and pushed the patch.

With Best Regards, Tim



signature.asc
Description: OpenPGP digital signature


[Bug-wget] Wget not ignoring the return value of a void function in 1.19.5

2018-05-08 Thread Josef Moellers
Hi,

While trying to upgrade to 1.19.5, we found a bug in wget (src/host.c)
where the (non-existing) return value of a void function is assigned to
a variable.

A patch is appended.

Josef
Index: wget-1.19.5/src/host.c
===
--- wget-1.19.5.orig/src/host.c
+++ wget-1.19.5/src/host.c
@@ -732,7 +732,10 @@ wait_ares (ares_channel channel)
 ares_process (channel, _fds, _fds);
 }
   if (timer)
-timer = ptimer_destroy (timer);
+  {
+ptimer_destroy (timer);
+timer = NULL;
+  }
 }
 
 static void