Re: [Bug-wget] [GSoC Update] Week 2

2017-06-17 Thread Evgeny Grin
On 17.06.2017 22:22, Didik Setiawan wrote: > On Sat, Jun 17, 2017 at 01:30:57PM +0300, Evgeny Grin wrote: >> > >> You can combine second and third methods: > > I use this combination. > >> --- >> int port_num; >> >> if(0) {} >> #if MHD_VERSION >=

Re: [Bug-wget] [GSoC Update] Week 2

2017-06-17 Thread Didik Setiawan
On Sat, Jun 17, 2017 at 01:30:57PM +0300, Evgeny Grin wrote: > > On 17.06.2017 11:36, Tim Rühsen wrote: > > > All you need is the socket descriptor. How to call getsockname() + > > getnameinfo() to retrieve the port number you see in libwget/net.c/ > > wget_tcp_get_local_port(). > > > > If MHD

Re: [Bug-wget] [GSoC Update] Week 2

2017-06-17 Thread Tim Rühsen
On Samstag, 17. Juni 2017 13:53:06 CEST Didik Setiawan wrote: > On Tue, Jun 13, 2017 at 06:37:27PM +0200, Darshit Shah wrote: > > > - http_server_port still hardcoded. > > > > This is important. The port should be a random number. Usually, passing 0 > > in the port number makes the kernel

Re: [Bug-wget] [GSoC Update] Week 2

2017-06-17 Thread Didik Setiawan
On Tue, Jun 13, 2017 at 06:37:27PM +0200, Darshit Shah wrote: > > - http_server_port still hardcoded. > This is important. The port should be a random number. Usually, passing 0 in > the port number makes the kernel choose an open one for you. > > Having a randomised port is important to ensure