diff --git a/lib/api/wpc_proto.h b/lib/api/wpc_proto.h index 9913170..d1ef7ca 100644 --- a/lib/api/wpc_proto.h +++ b/lib/api/wpc_proto.h @@ -89,10 +89,10 @@ typedef enum */ app_proto_res_e WPC_Proto_initialize(const char * port_name, unsigned long bitrate, - char * gateway_id, - char * gateway_model, - char * gateway_version, - char * sink_id); + const char * gateway_id, + const char * gateway_model, + const char * gateway_version, + const char * sink_id); /** * \brief close protobuf interface diff --git a/lib/wpc_proto/internal_modules/common.c b/lib/wpc_proto/internal_modules/common.c index 358c18e..c1cbfc6 100644 --- a/lib/wpc_proto/internal_modules/common.c +++ b/lib/wpc_proto/internal_modules/common.c @@ -53,10 +53,10 @@ static const wp_ErrorCode APP_ERROR_CODE_LUT[] = { * Enforce null termination for strings stored * \return True if successful, False otherwise */ -bool Common_init(char * gateway_id, - char * gateway_model, - char * gateway_version, - char * sink_id) +bool Common_init(const char * gateway_id, + const char * gateway_model, + const char * gateway_version, + const char * sink_id) { strncpy(m_gateway_id, gateway_id, GATEWAY_ID_MAX_SIZE); m_gateway_id[GATEWAY_ID_MAX_SIZE - 1]='\0'; diff --git a/lib/wpc_proto/internal_modules/common.h b/lib/wpc_proto/internal_modules/common.h index 574b056..1e3c8e2 100644 --- a/lib/wpc_proto/internal_modules/common.h +++ b/lib/wpc_proto/internal_modules/common.h @@ -23,10 +23,10 @@ * \brief Intialize the common module * \return True if successful, False otherwise */ -bool Common_init(char * gateway_id, - char * gateway_model, - char * gateway_version, - char * sink_id); +bool Common_init(const char * gateway_id, + const char * gateway_model, + const char * gateway_version, + const char * sink_id); char * Common_get_gateway_id(void); diff --git a/lib/wpc_proto/wpc_proto.c b/lib/wpc_proto/wpc_proto.c index 22fa4b5..2d2b8fd 100644 --- a/lib/wpc_proto/wpc_proto.c +++ b/lib/wpc_proto/wpc_proto.c @@ -54,10 +54,10 @@ static int open_and_check_connection(unsigned long baudrate, const char * port_n app_proto_res_e WPC_Proto_initialize(const char * port_name, unsigned long bitrate, - char * gateway_id, - char * gateway_model, - char * gateway_version, - char * sink_id) + const char * gateway_id, + const char * gateway_model, + const char * gateway_version, + const char * sink_id) { _Static_assert(WPC_PROTO_MAX_RESPONSE_SIZE >= (wp_GetConfigsResp_size + WPC_PROTO_GENERIC_MESSAGE_OVERHEAD), "Max proto size too low");