Skip to content

Commit

Permalink
Remove config include from header
Browse files Browse the repository at this point in the history
core_mqtt_serializer.h included the user coreMQTT config, which spills
the config header's contents into all consumers of coreMQTT's headers.
Macros from the config are no longer used in the the API, so this is
also no longer used for anything, so can be removed.
  • Loading branch information
archigup committed Jan 31, 2024
1 parent 0ba0b16 commit 035c380
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
12 changes: 0 additions & 12 deletions source/include/core_mqtt_serializer.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,6 @@
#endif
/* *INDENT-ON */

/* MQTT_DO_NOT_USE_CUSTOM_CONFIG allows building the MQTT library
* without a custom config. If a custom config is provided, the
* MQTT_DO_NOT_USE_CUSTOM_CONFIG macro should not be defined. */
#ifndef MQTT_DO_NOT_USE_CUSTOM_CONFIG
/* Include custom config file before other headers. */
#include "core_mqtt_config.h"
#endif

/* Include config defaults header to get default values of configs not
* defined in core_mqtt_config.h file. */
#include "core_mqtt_config_defaults.h"

#include "transport_interface.h"

/* MQTT packet types. */
Expand Down
2 changes: 2 additions & 0 deletions test/unit-test/core_mqtt_utest.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
#include "mock_core_mqtt_serializer.h"
#include "mock_core_mqtt_state.h"

#include "core_mqtt_config_defaults.h"

/* Set network context to double pointer to buffer (uint8_t**). */
struct NetworkContext
{
Expand Down

0 comments on commit 035c380

Please sign in to comment.