Skip to content

Commit

Permalink
Fix zephyr ports
Browse files Browse the repository at this point in the history
  • Loading branch information
embhorn committed Oct 23, 2023
1 parent 59b972c commit d56371d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/zephyr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ jobs:
mosquitto -c scripts/broker_test/mosquitto.conf &> broker.log &
sleep 1 # let the broker set everything up
mosquitto_sub -t sensors &> sub.log &
env:
WOLFMQTT_NO_EXTERNAL_BROKER_TESTS: 1

# This is some debug info useful if something goes wrong
- name: Show network status
Expand Down
9 changes: 8 additions & 1 deletion zephyr/samples/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,14 @@ int main(void)
mqtt_init_ctx(&mqttCtx);

mqttCtx.test_mode = 1;

#ifdef WOLFMQTT_NO_EXTERNAL_BROKER_TESTS
/* Set port as configured in scripts/broker_test/mosquitto.conf */
#if WOLFMQTT_DEFAULT_TLS
mqttCtx.port = 18883;
#else
mqttCtx.port = 11883;
#endif
#endif
rc = mqttclient_test(&mqttCtx);

mqtt_free_ctx(&mqttCtx);
Expand Down

0 comments on commit d56371d

Please sign in to comment.