From 5f9e443bb3174ced79f9835e9df42b8aecadebf4 Mon Sep 17 00:00:00 2001 From: John Spaith Date: Fri, 9 Feb 2018 10:22:22 -0800 Subject: [PATCH] Reintroduce (deprecated!) OPTION_C2D_KEEP_ALIVE_FREQ_SECS to undo a breaking change --- iothub_client/inc/iothub_client_options.h | 2 +- iothub_client/src/iothubtransport_amqp_common.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/iothub_client/inc/iothub_client_options.h b/iothub_client/inc/iothub_client_options.h index 0a406dcbfb..d0d755e93b 100644 --- a/iothub_client/inc/iothub_client_options.h +++ b/iothub_client/inc/iothub_client_options.h @@ -45,7 +45,7 @@ extern "C" static const char* OPTION_SERVICE_SIDE_KEEP_ALIVE_FREQ_SECS = "svc2cl_keep_alive_timeout_secs"; /* DEPRECATED:: OPTION_C2D_KEEP_ALIVE_FREQ_SECS is DEPRECATED! Use OPTION_SERVICE_SIDE_KEEP_ALIVE_FREQ_SECS, but OPTION_C2D_KEEP_ALIVE_FREQ_SECS legacy variable kept for back-compat. */ - static const char* OPTION_C2D_KEEP_ALIVE_FREQ_SECS = "svc2cl_keep_alive_timeout_secs"; + static const char* OPTION_C2D_KEEP_ALIVE_FREQ_SECS = "c2d_keep_alive_freq_secs"; /* * @brief Ratio to be used for client side pings in AMQP protocol. diff --git a/iothub_client/src/iothubtransport_amqp_common.c b/iothub_client/src/iothubtransport_amqp_common.c index 1fb6dd979b..08f943ac9f 100644 --- a/iothub_client/src/iothubtransport_amqp_common.c +++ b/iothub_client/src/iothubtransport_amqp_common.c @@ -1947,7 +1947,7 @@ IOTHUB_CLIENT_RESULT IoTHubTransport_AMQP_Common_SetOption(TRANSPORT_LL_HANDLE h result = IOTHUB_CLIENT_OK; } } - else if (strcmp(OPTION_SERVICE_SIDE_KEEP_ALIVE_FREQ_SECS, option) == 0) + else if ((strcmp(OPTION_SERVICE_SIDE_KEEP_ALIVE_FREQ_SECS, option) == 0) || (strcmp(OPTION_C2D_KEEP_ALIVE_FREQ_SECS, option) == 0)) { transport_instance->svc2cl_keep_alive_timeout_secs = *(size_t*)value; result = IOTHUB_CLIENT_OK;