Page 1 of 1

EWGET: the new one

Posted: Wed Mar 31, 2010 3:55 pm
by fra&co
I know this feature is present on latest trunk snapshots only (after last 1.2.1 release)

but i've seen that the main function on ewget.c file after updating is void and compiling the compiler warns about exit code value:
Code is like so:

Code: Select all

void main(int argc char **argv)
{
....
exit(0);
}
while following the standard unix, a filter should exit 0 if successfull and !=0 if unsuccessfull, so void should not be applied to the main()

Code: Select all

int main(int argc char **argv)
{
...
return 0;
}
the first version of the ewget.c was int main(), but the last has changed

Re: EWGET: the new one

Posted: Wed Mar 31, 2010 4:26 pm
by fra&co
another notice
as you can see, openssl 1.1.0 is out

I was trying to compile ewgetlib against latest openssl and I noticed another warning discarding pointer type here:

SSL_METHOD* meth;
as declared, now should be:
const SSL_METHOD* meth;

the piece of code is on initialize_connection_https()

Code: Select all

#ifdef HAVE_SSL

static void* initialize_connection_https(char* host, int port)
{
	ssl_connection_data* connection_data = NULL;
	int socket = tcp_connect(host, port);
	if(socket >= 0)
	{
		int initialized = -1;
		SSL* ssl = NULL;
		SSL_CTX *ctx = NULL;
		#ifdef USE_OPENSSL
			const SSL_METHOD* meth;
			SSL_library_init();
			SSL_load_error_strings();
			
			meth = SSLv23_method();

Re: EWGET: the new one

Posted: Sat Apr 10, 2010 1:05 pm
by Eric
FYI, both of your suggestions were incorporated into version 1.2.2 (released last weekend).

These two suggestions together constitute your second contribution -- one more and I'll grant you commit access.