Support for wolfIP with MQTT client and broker#463
Support for wolfIP with MQTT client and broker#463danielinux merged 4 commits intowolfSSL:masterfrom
Conversation
0b09a71 to
57ffa6d
Compare
57ffa6d to
6ee7bfe
Compare
There was a problem hiding this comment.
Pull request overview
This pull request adds support for the wolfIP TCP/IP stack to the wolfMQTT client and broker, enabling wolfMQTT to run on embedded systems using wolfIP for networking. The changes include fixing the PRINTF macro to be a proper no-op, adding wolfIP-specific network backend implementations, refactoring broker initialization to separate start-up from the main loop, and wrapping file-based certificate operations for NO_FILESYSTEM compatibility.
Changes:
- Fixed PRINTF macro in
mqtt_types.hto use proper do-while(0) pattern for no-op - Added wolfIP network backend support for both MQTT client and broker
- Refactored
MqttBroker_Runto extract initialization logic into newMqttBroker_Startfunction for embedded systems
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| wolfmqtt/mqtt_types.h | Fixed empty PRINTF macro to be a proper no-op statement using do-while(0) pattern |
| wolfmqtt/mqtt_socket.h | Added blank line for improved formatting |
| wolfmqtt/mqtt_broker.h | Added MqttBroker_Start API and MqttBrokerNet_wolfIP_Init function, updated MqttBrokerNet_Init availability |
| src/mqtt_socket.c | Added wolfIP-specific errno handling with WOLFIP_EAGAIN mappings |
| src/mqtt_broker.c | Major changes: moved BrokerTls_Init outside POSIX backend, added wolfIP network backend implementation, wrapped file-based cert functions in NO_FILESYSTEM checks, added BROKER_SLEEP_MS and time abstractions for wolfIP, refactored MqttBroker_Run to use new MqttBroker_Start, updated TLS cleanup logic, suppressed unused parameter warning in BrokerUsage |
| examples/mqttport.h | Added wolfIP socket type definitions and NO_FILESYSTEM define |
| examples/mqttnet.h | Added wolfIP stack pointer to SocketContext |
| examples/mqttnet.c | Implemented wolfIP network callbacks (NetConnect, NetRead, NetWrite, NetDisconnect) and stack initialization |
| examples/mqttexample.h | Added wolfIP stack pointer to MQTTCtx structure |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 10 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mqtt_types.h- changed empty PRINTF macro to proper no-op:do { (void)0; } while(0)mqtt_broker.c- movedBrokerTls_Initoutside#elifblock for wolfIP compatibilitymqtt_broker.c- wrapped file-based cert functions in#ifndef NO_FILESYSTEMmqtt_broker.c- suppressed unused parameter warning inBrokerUsage()