This is an automated email from the ASF dual-hosted git repository.
rymek pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
The following commit(s) were added to refs/heads/master by this push:
new aa2267a apps/blestress - compilation error Building the app returned
error: multiple definition of `stress_timer_callout'. Moving the it's
declaration to stress.c fixes the issue - this structure is only used there.
aa2267a is described below
commit aa2267ab91a269f7699783993bde3d694a385933
Author: Krzysztof Kopyściński <[email protected]>
AuthorDate: Fri Jul 24 09:53:46 2020 +0200
apps/blestress - compilation error
Building the app returned error: multiple definition of
`stress_timer_callout'. Moving the it's declaration to stress.c fixes the issue
- this structure is only used there.
---
apps/blestress/src/stress.c | 3 +++
apps/blestress/src/stress.h | 1 -
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/apps/blestress/src/stress.c b/apps/blestress/src/stress.c
index 6f5badf..0bed576 100644
--- a/apps/blestress/src/stress.c
+++ b/apps/blestress/src/stress.c
@@ -19,6 +19,8 @@
#include "stress.h"
+static struct os_callout stress_timer_callout;
+
void
com_stress_print_report(const struct com_stress_test_ctx *test_ctxs)
{
@@ -176,6 +178,7 @@ void
stress_start_timer(uint32_t timeout_ms, os_event_fn *ev_cb)
{
int rc;
+
os_callout_stop(&stress_timer_callout);
os_callout_init(&stress_timer_callout, os_eventq_dflt_get(), ev_cb, NULL);
diff --git a/apps/blestress/src/stress.h b/apps/blestress/src/stress.h
index 91ab4f4..6f19331 100644
--- a/apps/blestress/src/stress.h
+++ b/apps/blestress/src/stress.h
@@ -45,7 +45,6 @@ extern "C" {
#define STRESS_FIND_CHR 2
#define STRESS_FIND_DSC 3
-struct os_callout stress_timer_callout;
struct stress_gatt_search_ctx;
typedef void stress_gatt_disc_end_fn(struct stress_gatt_search_ctx
*search_ctx);