Skip to content

Commit

Permalink
fix: revert const attachment changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jean-roland committed Jul 2, 2024
1 parent c835a9a commit 3bd7d2c
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion include/zenoh-pico/net/query.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion include/zenoh-pico/net/reply.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion include/zenoh-pico/net/sample.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
2 changes: 1 addition & 1 deletion src/net/query.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/net/reply.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions src/net/sample.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down

0 comments on commit 3bd7d2c

Please sign in to comment.