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 Feb 1, 2024
1 parent cc37bb9 commit 94f7185
Show file tree
Hide file tree
Showing 6 changed files with 6 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
1 change: 1 addition & 0 deletions test/cbmc/proofs/MQTT_Connect/MQTT_Connect_harness.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
*/
#include "core_mqtt.h"
#include "mqtt_cbmc_state.h"
#include "core_mqtt_config_defaults.h"

/**
* @brief Implement a get time function to return timeout after certain
Expand Down
1 change: 1 addition & 0 deletions test/cbmc/proofs/MQTT_Publish/MQTT_Publish_harness.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
*/
#include "core_mqtt.h"
#include "mqtt_cbmc_state.h"
#include "core_mqtt_config_defaults.h"

/**
* @brief Implement a get time function to return timeout after certain
Expand Down
1 change: 1 addition & 0 deletions test/cbmc/proofs/MQTT_Subscribe/MQTT_Subscribe_harness.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
*/
#include "core_mqtt.h"
#include "mqtt_cbmc_state.h"
#include "core_mqtt_config_defaults.h"

/**
* @brief Implement a get time function to return timeout after certain
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
*/
#include "core_mqtt.h"
#include "mqtt_cbmc_state.h"
#include "core_mqtt_config_defaults.h"

/**
* @brief Implement a get time function to return timeout after certain
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 94f7185

Please sign in to comment.