This allows to use the function with constant arrays in the tests, the content is never modified so this is not introducing any unexpected behaviour.
Signed-off-by: Diego Elio Pettenò flameeyes@flameeyes.eu --- include/m2ua/m2ua_msg.h | 2 +- src/m2ua_msg.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/m2ua/m2ua_msg.h b/include/m2ua/m2ua_msg.h index e878edd..3a9da06 100644 --- a/include/m2ua/m2ua_msg.h +++ b/include/m2ua/m2ua_msg.h @@ -50,7 +50,7 @@ int m2ua_msg_add_data(struct m2ua_msg *msg, uint16_t tag, uint16_t len, uint8_t
struct m2ua_msg_part *m2ua_msg_find_tag(struct m2ua_msg *msg, uint16_t tag);
-struct m2ua_msg *m2ua_from_msg(uint16_t len, uint8_t *data); +struct m2ua_msg *m2ua_from_msg(uint16_t len, const uint8_t *data); struct msgb *m2ua_to_msg(struct m2ua_msg *msg);
void m2ua_set_log_area(int log_area); diff --git a/src/m2ua_msg.c b/src/m2ua_msg.c index af59376..4ca83a0 100644 --- a/src/m2ua_msg.c +++ b/src/m2ua_msg.c @@ -83,7 +83,7 @@ struct m2ua_msg_part *m2ua_msg_find_tag(struct m2ua_msg *m2ua, uint16_t tag) return NULL; }
-struct m2ua_msg *m2ua_from_msg(uint16_t len, uint8_t *data) +struct m2ua_msg *m2ua_from_msg(uint16_t len, const uint8_t *data) { struct m2ua_parameter_hdr *par; struct m2ua_common_hdr *hdr;