diff --git a/configure b/configure index 69af8b3..826a590 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for motion Git-0fb31d66c9bb5032403f831c7f3b6ae241938bcb. +# Generated by GNU Autoconf 2.69 for motion Git-aa2d317a553ea96300c56aac2f9f92af0014c925. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -577,8 +577,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='motion' PACKAGE_TARNAME='motion' -PACKAGE_VERSION='Git-0fb31d66c9bb5032403f831c7f3b6ae241938bcb' -PACKAGE_STRING='motion Git-0fb31d66c9bb5032403f831c7f3b6ae241938bcb' +PACKAGE_VERSION='Git-aa2d317a553ea96300c56aac2f9f92af0014c925' +PACKAGE_STRING='motion Git-aa2d317a553ea96300c56aac2f9f92af0014c925' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1244,7 +1244,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures motion Git-0fb31d66c9bb5032403f831c7f3b6ae241938bcb to adapt to many kinds of systems. +\`configure' configures motion Git-aa2d317a553ea96300c56aac2f9f92af0014c925 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1305,7 +1305,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of motion Git-0fb31d66c9bb5032403f831c7f3b6ae241938bcb:";; + short | recursive ) echo "Configuration of motion Git-aa2d317a553ea96300c56aac2f9f92af0014c925:";; esac cat <<\_ACEOF @@ -1453,7 +1453,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -motion configure Git-0fb31d66c9bb5032403f831c7f3b6ae241938bcb +motion configure Git-aa2d317a553ea96300c56aac2f9f92af0014c925 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2055,7 +2055,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by motion $as_me Git-0fb31d66c9bb5032403f831c7f3b6ae241938bcb, which was +It was created by motion $as_me Git-aa2d317a553ea96300c56aac2f9f92af0014c925, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -4333,6 +4333,12 @@ $as_echo "found in /usr/local/lib" >&6; } FFMPEG_OK="found" FFMPEG_LIB="/usr/local/lib" FFMPEG_DIR="/usr/local" + elif test -f /usr/lib/x86_64-linux-gnu/libavcodec.a -o -f /usr/lib/x86_64-linux-gnu/libavcodec.so && test /usr/lib/x86_64-linux-gnu/libavcodec.a -o -f /usr/lib/x86_64-linux-gnu/libavcodec.so ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in /usr/lib/x86_64-linux-gnu" >&5 +$as_echo "found in /usr/lib/x86_64-linux-gnu" >&6; } + FFMPEG_OK="found" + FFMPEG_LIB="/usr/lib/x86_64-linux-gnu" + FFMPEG_DIR="/usr" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } @@ -6587,7 +6593,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by motion $as_me Git-0fb31d66c9bb5032403f831c7f3b6ae241938bcb, which was +This file was extended by motion $as_me Git-aa2d317a553ea96300c56aac2f9f92af0014c925, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -6649,7 +6655,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -motion config.status Git-0fb31d66c9bb5032403f831c7f3b6ae241938bcb +motion config.status Git-aa2d317a553ea96300c56aac2f9f92af0014c925 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.in b/configure.in index 38271fa..c25390b 100644 --- a/configure.in +++ b/configure.in @@ -426,6 +426,11 @@ else if test "${FFMPEG_DIR}" = "yes"; then FFMPEG_OK="found" FFMPEG_LIB="/usr/local/lib" FFMPEG_DIR="/usr/local" + elif test -f /usr/lib/x86_64-linux-gnu/libavcodec.a -o -f /usr/lib/x86_64-linux-gnu/libavcodec.so && test /usr/lib/x86_64-linux-gnu/libavcodec.a -o -f /usr/lib/x86_64-linux-gnu/libavcodec.so ; then + AC_MSG_RESULT(found in /usr/lib/x86_64-linux-gnu) + FFMPEG_OK="found" + FFMPEG_LIB="/usr/lib/x86_64-linux-gnu" + FFMPEG_DIR="/usr" else AC_MSG_RESULT(not found) echo "" diff --git a/netcam.c b/netcam.c index 5b09221..8121859 100644 --- a/netcam.c +++ b/netcam.c @@ -663,7 +663,6 @@ static int netcam_read_first_header(netcam_context_ptr netcam) MOTION_LOG(INF, TYPE_NETCAM, NO_ERRNO, "%s: Boundary string [%s]", netcam->boundary); - } break; case 3: /* MJPG-Block style streaming. */ diff --git a/stream.c b/stream.c index 8f8d6a5..1ed082a 100644 --- a/stream.c +++ b/stream.c @@ -170,7 +170,6 @@ static void* handle_basic_auth(void* param) char buffer[1024] = {'\0'}; ssize_t length = 1023; char *auth, *h, *authentication; - int ret; static const char *request_auth_response_template= "HTTP/1.0 401 Authorization Required\r\n" "Server: Motion/"VERSION"\r\n" @@ -243,7 +242,7 @@ static void* handle_basic_auth(void* param) pthread_exit(NULL); Error: - ret = write(p->sock, request_auth_response_template, strlen (request_auth_response_template)); + write(p->sock, request_auth_response_template, strlen (request_auth_response_template)); Invalid_Request: close(p->sock); @@ -396,7 +395,6 @@ static void* handle_md5_digest(void* param) #define SERVER_URI_LEN 512 char server_uri[SERVER_URI_LEN]; char* server_user = NULL, *server_pass = NULL; - int ret; unsigned int rand1,rand2; HASHHEX HA1; HASHHEX HA2 = ""; @@ -571,8 +569,8 @@ static void* handle_md5_digest(void* param) "Content-Length: %Zu\r\n\r\n", request_auth_response_template, server_nonce, KEEP_ALIVE_TIMEOUT, strlen(auth_failed_html_template)); - ret = write(p->sock, buffer, strlen(buffer)); - ret = write(p->sock, auth_failed_html_template, strlen(auth_failed_html_template)); + write(p->sock, buffer, strlen(buffer)); + write(p->sock, auth_failed_html_template, strlen(auth_failed_html_template)); } // OK - Access @@ -609,7 +607,7 @@ static void* handle_md5_digest(void* param) if(server_pass) free(server_pass); - ret = write(p->sock, internal_error_template, strlen(internal_error_template)); + write(p->sock, internal_error_template, strlen(internal_error_template)); Invalid_Request: close(p->sock);