diff -Naur axel-1.0b/axel.c axel-1.0b-FIXED/axel.c --- axel-1.0b/axel.c 2002-05-03 14:45:11.000000000 +0200 +++ axel-1.0b-FIXED/axel.c 2007-03-15 01:14:15.000000000 +0100 @@ -444,7 +444,9 @@ /* Terminate any thread still running */ for( i = 0; i < axel->conf->num_connections; i ++ ) - pthread_cancel( *axel->conn[i].setup_thread ); + /* don't try to kill non existing thread */ + if ( *axel->conn[i].setup_thread != 0 ) + pthread_cancel( *axel->conn[i].setup_thread ); /* Delete state file if necessary */ if( axel->ready == 1 ) diff -Naur axel-1.0b/http.c axel-1.0b-FIXED/http.c --- axel-1.0b/http.c 2002-01-25 15:26:40.000000000 +0100 +++ axel-1.0b-FIXED/http.c 2007-03-15 01:12:59.000000000 +0100 @@ -41,7 +41,8 @@ sprintf( conn->host, "%s:%i", host, port ); if( !conn_set( tconn, proxy ) ) { - sprintf( conn->request, _("Invalid proxy string: %s\n"), proxy ); + /* We'll put the message in conn->headers, not in request */ + sprintf( conn->headers, _("Invalid proxy string: %s\n"), proxy ); return( 0 ); } host = tconn->host; @@ -55,7 +56,8 @@ if( ( conn->fd = tcp_connect( host, port, conn->local_if ) ) == -1 ) { - sprintf( conn->request, _("Unable to connect to server %s:%i\n"), host, port ); + /* We'll put the message in conn->headers, not in request */ + sprintf( conn->headers, _("Unable to connect to server %s:%i\n"), host, port ); return( 0 ); } @@ -145,7 +147,8 @@ { if( read( conn->fd, s, 1 ) <= 0 ) { - sprintf( conn->request, _("Connection gone.\n") ); + /* We'll put the message in conn->headers, not in request */ + sprintf( conn->headers, _("Connection gone.\n") ); return( 0 ); } if( *s == '\r' )