Patch for Debian (based on the Ubuntu patch) attached. Giridhar
On 07/09/14 14:30 +0530, Y Giridhar Appaji Nag said ... > Patch to fix this bug is available at > http://patches.ubuntu.com/a/axel/axel_1.0b-1.1ubuntu1.patch -- Y Giridhar Appaji Nag | http://www.appaji.net/
diff -Nur axel-1.0b.old/axel.c axel-1.0b/axel.c --- axel-1.0b.old/axel.c 2002-05-03 18:15:11.000000000 +0530 +++ axel-1.0b/axel.c 2007-09-14 15:32:44.867408000 +0530 @@ -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 -Nur axel-1.0b.old/http.c axel-1.0b/http.c --- axel-1.0b.old/http.c 2002-01-25 19:56:40.000000000 +0530 +++ axel-1.0b/http.c 2007-09-14 15:32:52.341235000 +0530 @@ -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' )
signature.asc
Description: Digital signature