From 3bd7d2c0d0b5f1bd70017772079b0d7fb705f8fa Mon Sep 17 00:00:00 2001 From: Jean-Roland Date: Mon, 1 Jul 2024 14:11:08 +0200 Subject: [PATCH] fix: revert const attachment changes --- include/zenoh-pico/net/query.h | 2 +- include/zenoh-pico/net/reply.h | 2 +- include/zenoh-pico/net/sample.h | 2 +- src/net/query.c | 2 +- src/net/reply.c | 4 ++-- src/net/sample.c | 6 +++--- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/zenoh-pico/net/query.h b/include/zenoh-pico/net/query.h index 552100198..7812bd1ec 100644 --- a/include/zenoh-pico/net/query.h +++ b/include/zenoh-pico/net/query.h @@ -49,7 +49,7 @@ typedef struct { #if Z_FEATURE_QUERYABLE == 1 _z_query_t _z_query_create(const _z_value_t *value, _z_keyexpr_t *key, const _z_slice_t *parameters, _z_session_t *zn, - uint32_t request_id, _z_bytes_t attachment); + uint32_t request_id, const _z_bytes_t attachment); void _z_queryable_clear(_z_queryable_t *qbl); void _z_queryable_free(_z_queryable_t **qbl); #endif diff --git a/include/zenoh-pico/net/reply.h b/include/zenoh-pico/net/reply.h index 691c01963..dca38a666 100644 --- a/include/zenoh-pico/net/reply.h +++ b/include/zenoh-pico/net/reply.h @@ -63,7 +63,7 @@ void _z_reply_free(_z_reply_t **hello); void _z_reply_copy(_z_reply_t *dst, const _z_reply_t *src); _z_reply_t _z_reply_create(_z_keyexpr_t keyexpr, z_reply_tag_t tag, _z_id_t id, const _z_bytes_t payload, const _z_timestamp_t *timestamp, _z_encoding_t encoding, z_sample_kind_t kind, - _z_bytes_t attachment); + const _z_bytes_t attachment); typedef struct _z_pending_reply_t { _z_reply_t _reply; diff --git a/include/zenoh-pico/net/sample.h b/include/zenoh-pico/net/sample.h index 1844e64e5..5dee423d7 100644 --- a/include/zenoh-pico/net/sample.h +++ b/include/zenoh-pico/net/sample.h @@ -56,6 +56,6 @@ _z_sample_t _z_sample_duplicate(const _z_sample_t *src); _z_sample_t _z_sample_create(_z_keyexpr_t *key, const _z_bytes_t payload, _z_timestamp_t timestamp, _z_encoding_t encoding, const z_sample_kind_t kind, const _z_qos_t qos, - _z_bytes_t attachment); + const _z_bytes_t attachment); #endif /* ZENOH_PICO_SAMPLE_NETAPI_H */ diff --git a/src/net/query.c b/src/net/query.c index f48083601..893f7dd40 100644 --- a/src/net/query.c +++ b/src/net/query.c @@ -61,7 +61,7 @@ void _z_query_free(_z_query_t **query) { #if Z_FEATURE_QUERYABLE == 1 _z_query_t _z_query_create(const _z_value_t *value, _z_keyexpr_t *key, const _z_slice_t *parameters, _z_session_t *zn, - uint32_t request_id, _z_bytes_t attachment) { + uint32_t request_id, const _z_bytes_t attachment) { _z_query_t q = _z_query_null(); q._request_id = request_id; q._zn = zn; diff --git a/src/net/reply.c b/src/net/reply.c index 60f1f8b1a..06d63128e 100644 --- a/src/net/reply.c +++ b/src/net/reply.c @@ -85,7 +85,7 @@ void _z_pending_reply_clear(_z_pending_reply_t *pr) { _z_reply_t _z_reply_create(_z_keyexpr_t keyexpr, z_reply_tag_t tag, _z_id_t id, const _z_bytes_t payload, const _z_timestamp_t *timestamp, _z_encoding_t encoding, z_sample_kind_t kind, - _z_bytes_t attachment) { + const _z_bytes_t attachment) { _z_reply_t reply = _z_reply_null(); reply._tag = tag; if (tag == Z_REPLY_TAG_DATA) { @@ -103,7 +103,7 @@ _z_reply_t _z_reply_create(_z_keyexpr_t keyexpr, z_reply_tag_t tag, _z_id_t id, #else _z_reply_t _z_reply_create(_z_keyexpr_t keyexpr, z_reply_tag_t tag, _z_id_t id, const _z_bytes_t payload, const _z_timestamp_t *timestamp, _z_encoding_t encoding, z_sample_kind_t kind, - _z_bytes_t attachment) { + const _z_bytes_t attachment) { _ZP_UNUSED(keyexpr); _ZP_UNUSED(tag); _ZP_UNUSED(id); diff --git a/src/net/sample.c b/src/net/sample.c index 90525fc07..6c27e64f8 100644 --- a/src/net/sample.c +++ b/src/net/sample.c @@ -80,7 +80,7 @@ _z_sample_t _z_sample_duplicate(const _z_sample_t *src) { #if Z_FEATURE_SUBSCRIPTION == 1 _z_sample_t _z_sample_create(_z_keyexpr_t *key, const _z_bytes_t payload, const _z_timestamp_t timestamp, _z_encoding_t encoding, const z_sample_kind_t kind, const _z_qos_t qos, - _z_bytes_t attachment) { + const _z_bytes_t attachment) { _z_sample_t s = _z_sample_null(); s.keyexpr = _z_keyexpr_steal(key); s.kind = kind; @@ -93,8 +93,8 @@ _z_sample_t _z_sample_create(_z_keyexpr_t *key, const _z_bytes_t payload, const } #else _z_sample_t _z_sample_create(_z_keyexpr_t *key, const _z_bytes_t payload, const _z_timestamp_t timestamp, - const _z_encoding_t encoding, const z_sample_kind_t kind, const _z_qos_t qos, - _z_bytes_t attachment) { + _z_encoding_t encoding, const z_sample_kind_t kind, const _z_qos_t qos, + const _z_bytes_t attachment) { _ZP_UNUSED(key); _ZP_UNUSED(payload); _ZP_UNUSED(timestamp);