Mercurial > louis > mq > lightsd
changeset 249:848fe96c58a5
fix series
author | Louis Opter <kalessin@kalessin.fr> |
---|---|
date | Sat, 15 Aug 2015 16:28:52 -0700 |
parents | e54a226a3c7a |
children | a0066335c86e |
files | add_start_stop_timer.patch fix_command_pipe_read_loop.patch |
diffstat | 2 files changed, 29 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/add_start_stop_timer.patch Sat Aug 15 16:21:19 2015 -0700 +++ b/add_start_stop_timer.patch Sat Aug 15 16:28:52 2015 -0700 @@ -1,21 +1,7 @@ # HG changeset patch -# Parent 48879d9efc6d1b1fa8361857e19b217a4a5a9892 +# Parent bddbeba717a2c01b12f3818c0d3b24ae72066f3c Add an interface to start and stop standalone timers -diff --git a/core/lightsd.h b/core/lightsd.h ---- a/core/lightsd.h -+++ b/core/lightsd.h -@@ -28,6 +28,10 @@ - .tv_sec = (v) / 1000, \ - .tv_usec = ((v) % 1000) * 1000 \ - } -+#define LGTD_SNPRINTF_APPEND(buf, i, bufsz, ...) do { \ -+ int n = snprintf(&(buf)[(i)], bufsz - i, __VA_ARGS__); \ -+ (i) = LGTD_MIN((i) + n, bufsz); \ -+} while (0) - - enum lgtd_verbosity { - LGTD_DEBUG = 0, diff --git a/lifx/timer.c b/lifx/timer.c --- a/lifx/timer.c +++ b/lifx/timer.c @@ -325,7 +311,7 @@ diff --git a/tests/core/pipe/test_pipe_read_callback.c b/tests/core/pipe/test_pipe_read_callback.c --- a/tests/core/pipe/test_pipe_read_callback.c +++ b/tests/core/pipe/test_pipe_read_callback.c -@@ -14,6 +14,8 @@ +@@ -15,6 +15,8 @@ #define MOCKED_EVBUFFER_DRAIN #include "mock_event2.h" #include "mock_gateway.h" @@ -358,6 +344,18 @@ #include "tests_utils.h" #define MOCKED_JSONRPC_DISPATCH_REQUEST +diff --git a/tests/core/pipe/test_pipe_read_callback_yield_on_eagain.c b/tests/core/pipe/test_pipe_read_callback_yield_on_eagain.c +--- a/tests/core/pipe/test_pipe_read_callback_yield_on_eagain.c ++++ b/tests/core/pipe/test_pipe_read_callback_yield_on_eagain.c +@@ -14,6 +14,8 @@ + #define MOCKED_EVBUFFER_DRAIN + #include "mock_event2.h" + #include "mock_gateway.h" ++#include "mock_router.h" ++#include "mock_timer.h" + + #include "tests_utils.h" + #define MOCKED_JSONRPC_DISPATCH_REQUEST diff --git a/tests/core/proto/CMakeLists.txt b/tests/core/proto/CMakeLists.txt --- a/tests/core/proto/CMakeLists.txt +++ b/tests/core/proto/CMakeLists.txt
--- a/fix_command_pipe_read_loop.patch Sat Aug 15 16:21:19 2015 -0700 +++ b/fix_command_pipe_read_loop.patch Sat Aug 15 16:28:52 2015 -0700 @@ -10,6 +10,20 @@ I wish conky wasn't fucked nowadays, that would have let me spot this earlier. +diff --git a/core/lightsd.h b/core/lightsd.h +--- a/core/lightsd.h ++++ b/core/lightsd.h +@@ -28,6 +28,10 @@ + .tv_sec = (v) / 1000, \ + .tv_usec = ((v) % 1000) * 1000 \ + } ++#define LGTD_SNPRINTF_APPEND(buf, i, bufsz, ...) do { \ ++ int n = snprintf(&(buf)[(i)], bufsz - i, __VA_ARGS__); \ ++ (i) = LGTD_MIN((i) + n, bufsz); \ ++} while (0) + + enum lgtd_verbosity { + LGTD_DEBUG = 0, diff --git a/core/pipe.c b/core/pipe.c --- a/core/pipe.c +++ b/core/pipe.c @@ -215,7 +229,7 @@ new file mode 100644 --- /dev/null +++ b/tests/core/pipe/test_pipe_read_callback_yield_on_eagain.c -@@ -0,0 +1,271 @@ +@@ -0,0 +1,269 @@ +#include "pipe.c" + +#include <sys/tree.h> @@ -232,8 +246,6 @@ +#define MOCKED_EVBUFFER_DRAIN +#include "mock_event2.h" +#include "mock_gateway.h" -+#include "mock_router.h" -+#include "mock_timer.h" + +#include "tests_utils.h" +#define MOCKED_JSONRPC_DISPATCH_REQUEST