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

Unable to use OPTION_EVENT_SEND_TIMEOUT_SECS #552

Closed
vpetrigo opened this issue Jul 4, 2018 · 6 comments
Closed

Unable to use OPTION_EVENT_SEND_TIMEOUT_SECS #552

vpetrigo opened this issue Jul 4, 2018 · 6 comments
Assignees
Labels

Comments

@vpetrigo
Copy link

vpetrigo commented Jul 4, 2018

  • 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....
@ewertons
Copy link
Contributor

ewertons commented Jul 9, 2018

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.

@ewertons ewertons self-assigned this Jul 9, 2018
@vpetrigo
Copy link
Author

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.

@ewertons
Copy link
Contributor

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.

@ewertons ewertons added bug and removed question labels Jul 10, 2018
@ewertons
Copy link
Contributor

Hi @vpetrigo ,
The option has been exposed in iothub_client_options.h through 6d51749

Could you please

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

@vpetrigo
Copy link
Author

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.

@ewertons
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants