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

MQTTPacket_readnb not exported to shared library #103

Open
brimston3 opened this issue Aug 31, 2017 · 3 comments · May be fixed by #104
Open

MQTTPacket_readnb not exported to shared library #103

brimston3 opened this issue Aug 31, 2017 · 3 comments · May be fixed by #104

Comments

@brimston3
Copy link

MQTTPacket.h does not declare MQTTPacket_readnb with the DLLExport attribute. This is the only read API at the MQTTPacket level which allows passing a connection state context to getfn.

@scaprile
Copy link
Contributor

I introduced MQTTPacket_readnb() to work on a bare metal system, no OS, perhaps no need for a shared library. Since the function is non-blocking there is the need to have a state outside of it.
Just for the sake of learning, what is your current issue that is not covered by the other functions ?

@brimston3
Copy link
Author

This particular Linux client is connected to two separate server instances, which is a bit obtuse, but that's how it works out. This probably isn't the right client library for that scenario, but we're already using it embedded so it was easy to modify. I use a derived version of MQTTTransport which stores mbedtls contexts.

@scaprile
Copy link
Contributor

The whole library assumes a single connection... even my introduced nb functions use a static (at the transport samples). I guess yours is not a very common connection scenario, I myself would expect an embedded client to connect to one server. Anyway, I just dropped by being parental on my function ;^) and I guess adding DDLExport does not introduce any extra overhead for the rest of us.
You could go ahead and submit a pull request if you like, this way the admins can just merge it if they approve it.

brimston3 added a commit to brimston3/paho.mqtt.embedded-c that referenced this issue Aug 31, 2017
@icraggs icraggs linked a pull request Nov 30, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants