Azure-iot-sdk-c: Unable to use OPTION_EVENT_SEND_TIMEOUT_SECS

Created on 4 Jul 2018  路  6Comments  路  Source: Azure/azure-iot-sdk-c

  • OS and version used: Ubuntu 16.04

  • SDK version used: 2018-07-03

Description of the issue:


Previously we were using OPTION_EVENT_SEND_TIMEOUT_SECS to trigger Azure reconnection event as fast as possible, but now we can not use it due to an issue with installation.

Code sample exhibiting the issue:

#include "iothubtransport_amqp_common.h"

// ...

void init(void) {
// ...
    size_t telemetryTimeout = 3;
    if (IoTHubClient_LL_SetOption(iotHubClientHandle, OPTION_EVENT_SEND_TIMEOUT_SECS,
                                  &telemetryTimeout) != IOTHUB_CLIENT_OK)
    {
        IoTHubClient_LL_Destroy(iotHubClientHandle);
        return false;
    }
// ...
}

Console log of the issue:


In file included from azure_messaging.c:30:0:
/root/usr/include/azureiot/iothubtransport_amqp_common.h:9:50: fatal error: internal/iothub_transport_ll_private.h: No such file or directory
compilation terminated.
CMakeFiles/azure.dir/build.make:134: recipe for target 'CMakeFiles/azure.dir/azure/azure_messaging.c.o' failed
make[2]: *** [CMakeFiles/azure.dir/azure/azure_messaging.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
bug

All 6 comments

Hi @vpetrigo ,
why are you including "iothubtransport_amqp_common.h"?
That is an internal header, it is supposed to be included only by our internal modules.

Hello @ewertons,

Because the OPTION_EVENT_SEND_TIMEOUT_SECS is not present in the public iothub_client_options.h header. If there is another option, let me know please as docs do not provide any info about that option possible substitutions.

We apologize for that, @vpetrigo .
That option define is not supposed to be missing from iothub_client_options.h.
That is a bug, and we will address it right away.

Hi @vpetrigo ,
The option has been exposed in iothub_client_options.h through https://github.com/Azure/azure-iot-sdk-c/commit/6d51749b57152b54cbb06d51fe103d4b2b514247

Could you please

  • Remove the #include "iothubtransport_amqp_common.h"
  • Add #include "iothub_client_options.h"
  • Check if it addresses your compilation issue?

Hello @ewertons,

That seems to work. I reverted back to the tag 2018-06-27 as 2018-07-03 does not exist anymore and format a patch from your commit. Now I'm able to compile the application that utilizes that option.

Thank you.

Thanks @vpetrigo !
Let us know if we can help in any way.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kskog picture kskog  路  5Comments

caobaokun picture caobaokun  路  7Comments

kiranpradeep picture kiranpradeep  路  7Comments

Anil-Poolayulla-Chelottillam picture Anil-Poolayulla-Chelottillam  路  7Comments

kiranpradeep picture kiranpradeep  路  5Comments