diff --git a/configure.in b/configure.in index e68471a8..32d056e8 100644 --- a/configure.in +++ b/configure.in @@ -10,7 +10,7 @@ AM_MAINTAINER_MODE AC_PROG_CC AC_CANONICAL_HOST -AM_PROG_LIBTOOL +AC_PROG_LIBTOOL dnl Set some options based on environment @@ -81,8 +81,10 @@ XIPH_VAR_APPEND([XIPH_CPPFLAGS],[$PTHREAD_CPPFLAGS]) XIPH_VAR_PREPEND([XIPH_LIBS],[$PTHREAD_LIBS]) dnl -- YP support -- -AC_ARG_ENABLE([yp], AC_HELP_STRING([--disable-yp],[disable YP directory support]),, - [enable_yp="yes"]) +AC_ARG_ENABLE([yp], + AC_HELP_STRING([--disable-yp],[disable YP directory support]), + enable_yp="$enableval", + enable_yp="yes") if test "x$enable_yp" = "xyes" then XIPH_PATH_CURL([ diff --git a/src/connection.c b/src/connection.c index a20bca84..07aed903 100644 --- a/src/connection.c +++ b/src/connection.c @@ -1029,13 +1029,13 @@ static void *_handle_connection(void *arg) else if(httpp_parse_icy(parser, header, strlen(header))) { /* TODO: Map incoming icy connections to /icy_0, etc. */ char mount[20]; - int i = 0; + unsigned i = 0; strcpy(mount, "/"); avl_tree_rlock(global.source_tree); - while(source_find_mount(mount) != NULL) { - sprintf(mount, "/icy_%d", i++); + while (source_find_mount (mount) != NULL) { + snprintf (mount, sizeof (mount), "/icy_%u", i++); } avl_tree_unlock(global.source_tree); @@ -1050,8 +1050,6 @@ static void *_handle_connection(void *arg) } } - thread_exit(0); - return NULL; }