EWGET: the new one

Discuss the technical details of Gargoyle and ongoing development

Moderator: Moderators

Post Reply
fra&co
Posts: 27
Joined: Mon Dec 07, 2009 5:21 pm

EWGET: the new one

Post 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
Last edited by fra&co on Sat Apr 03, 2010 8:44 am, edited 2 times in total.

fra&co
Posts: 27
Joined: Mon Dec 07, 2009 5:21 pm

Re: EWGET: the new one

Post 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();

Eric
Site Admin
Posts: 1443
Joined: Sat Jun 14, 2008 1:14 pm

Re: EWGET: the new one

Post 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.

Post Reply