Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add logging of comms error in GG_CoapEventEmitter_OnError #81

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion xp/utils/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ set(HEADERS gg_async_pipe.h
add_library(gg-utils ${SOURCES} ${HEADERS})
gg_add_to_all_libs(gg-utils)

target_link_libraries(gg-utils PRIVATE gg-common)
target_link_libraries(gg-utils PRIVATE gg-annotations gg-common)

set_target_properties(gg-utils PROPERTIES PUBLIC_HEADER "${HEADERS}")
install(TARGETS gg-utils EXPORT golden-gate
Expand Down
3 changes: 3 additions & 0 deletions xp/utils/gg_coap_event_emitter.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
/*----------------------------------------------------------------------
| includes
+---------------------------------------------------------------------*/
#include "xp/annotations/gg_annotations.h"
#include "xp/common/gg_logging.h"
#include "xp/common/gg_threads.h"
#include "xp/coap/gg_coap.h"
Expand Down Expand Up @@ -239,6 +240,8 @@ GG_CoapEventEmitter_OnError(GG_CoapResponseListener* _self, GG_Result error, con
// after a timeout, we can retry immediately
GG_CoapEventEmitter_Update(self);
} else {
GG_LOG_COMMS_ERROR_CODE(GG_LIB_UTILS_COAP_EVENT_EMITTER_REQ_ERROR, error);

// after another error, wait before retrying
GG_Timer_Schedule(self->timer, GG_CAST(self, GG_TimerListener), self->retry_delay);
}
Expand Down
Loading