mirror of
https://github.com/Motion-Project/motion.git
synced 2026-06-11 23:34:36 -04:00
typo fix, unused variable cleanup, etc
motion.c bad spelling, to "an image" webhttpd.c consolidate the timeout to the top of the file as I needed to change it for testing
This commit is contained in:
@@ -818,7 +818,7 @@ int decode_jpeg_gray_raw(unsigned char *jpeg_data, int len,
|
||||
guarantee_huff_tables(&dinfo);
|
||||
jpeg_start_decompress (&dinfo);
|
||||
|
||||
vsf[0]= 1; vsf[1] = 1; vsf[2] = 1;
|
||||
vsf[0] = 1; vsf[1] = 1; vsf[2] = 1;
|
||||
|
||||
/* Height match image height or be exact twice the image height. */
|
||||
|
||||
|
||||
4
motion.c
4
motion.c
@@ -174,7 +174,7 @@ static void image_ring_destroy(struct context *cnt)
|
||||
/**
|
||||
* image_save_as_preview
|
||||
*
|
||||
* This routine is called when we detect motion and want to save a image in the preview buffer
|
||||
* This routine is called when we detect motion and want to save an image in the preview buffer
|
||||
*
|
||||
* Parameters:
|
||||
*
|
||||
@@ -2728,7 +2728,7 @@ int main (int argc, char **argv)
|
||||
SLEEP(1, 0);
|
||||
|
||||
/*
|
||||
* Calculate how many threads runnig or wants to run
|
||||
* Calculate how many threads are running or wants to run
|
||||
* if zero and we want to finish, break out
|
||||
*/
|
||||
int motion_threads_running = 0;
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
#include <netdb.h>
|
||||
#include <stddef.h>
|
||||
|
||||
/* Timeout in seconds, used for read and write */
|
||||
const int NONBLOCK_TIMEOUT = 1;
|
||||
|
||||
pthread_mutex_t httpd_mutex;
|
||||
|
||||
// This is a dummy variable use to kill warnings when not checking sscanf and similar functions
|
||||
@@ -197,7 +200,7 @@ static ssize_t write_nonblock(int fd, const void *buf, size_t size)
|
||||
struct timeval tm;
|
||||
fd_set fds;
|
||||
|
||||
tm.tv_sec = 1; /* Timeout in seconds */
|
||||
tm.tv_sec = NONBLOCK_TIMEOUT;
|
||||
tm.tv_usec = 0;
|
||||
FD_ZERO(&fds);
|
||||
FD_SET(fd, &fds);
|
||||
@@ -223,7 +226,7 @@ static ssize_t read_nonblock(int fd ,void *buf, ssize_t size)
|
||||
struct timeval tm;
|
||||
fd_set fds;
|
||||
|
||||
tm.tv_sec = 1; /* Timeout in seconds */
|
||||
tm.tv_sec = NONBLOCK_TIMEOUT; /* Timeout in seconds */
|
||||
tm.tv_usec = 0;
|
||||
FD_ZERO(&fds);
|
||||
FD_SET(fd, &fds);
|
||||
@@ -2509,7 +2512,7 @@ void httpd_run(struct context **cnt)
|
||||
|
||||
while ((client_sent_quit_message) && (!closehttpd)) {
|
||||
|
||||
client_socket_fd = acceptnonblocking(sd, 1);
|
||||
client_socket_fd = acceptnonblocking(sd, NONBLOCK_TIMEOUT);
|
||||
|
||||
if (client_socket_fd < 0) {
|
||||
if ((!cnt[0]) || (cnt[0]->finish)) {
|
||||
|
||||
Reference in New Issue
Block a user