From 8210ccc1b5d8191c4659822d8492c8274dd17b8b Mon Sep 17 00:00:00 2001 From: Pierre Avital Date: Tue, 16 Jan 2024 16:05:50 +0100 Subject: [PATCH] fix merge goofs --- include/zenoh-pico/session/subscription.h | 8 ++++---- src/api/api.c | 8 ++++---- src/session/subscription.c | 4 ++-- zenohpico.pc | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/include/zenoh-pico/session/subscription.h b/include/zenoh-pico/session/subscription.h index 72302c08c..1f1a1aca6 100644 --- a/include/zenoh-pico/session/subscription.h +++ b/include/zenoh-pico/session/subscription.h @@ -12,8 +12,8 @@ // ZettaScale Zenoh Team, // -#ifndef ZENOH_PICO_SESSION_SUBSCRIPTION_H -#define ZENOH_PICO_SESSION_SUBSCRIPTION_H +#ifndef INCLUDE_ZENOH_PICO_SESSION_SUBSCRIPTION_H +#define INCLUDE_ZENOH_PICO_SESSION_SUBSCRIPTION_H #include "zenoh-pico/net/session.h" @@ -25,7 +25,7 @@ _z_subscription_sptr_list_t *_z_get_subscriptions_by_key(_z_session_t *zn, uint8 _z_subscription_sptr_t *_z_register_subscription(_z_session_t *zn, uint8_t is_local, _z_subscription_t *sub); void _z_trigger_local_subscriptions(_z_session_t *zn, const _z_keyexpr_t keyexpr, const uint8_t *payload, - _z_zint_t payload_len); + _z_zint_t payload_len, z_attachment_t att); int8_t _z_trigger_subscriptions(_z_session_t *zn, const _z_keyexpr_t keyexpr, const _z_bytes_t payload, const _z_encoding_t encoding, const _z_zint_t kind, const _z_timestamp_t timestamp, z_attachment_t att); @@ -36,4 +36,4 @@ void _z_flush_subscriptions(_z_session_t *zn); _z_zint_t _z_get_pull_id(_z_session_t *zn); #endif -#endif /* ZENOH_PICO_SESSION_SUBSCRIPTION_H */ +#endif /* INCLUDE_ZENOH_PICO_SESSION_SUBSCRIPTION_H */ diff --git a/src/api/api.c b/src/api/api.c index 164c080db..1b7eecb48 100644 --- a/src/api/api.c +++ b/src/api/api.c @@ -622,7 +622,7 @@ int8_t z_put(z_session_t zs, z_keyexpr_t keyexpr, const uint8_t *payload, z_zint opt.congestion_control, opt.priority, options->attachment); // Trigger local subscriptions - _z_trigger_local_subscriptions(zs._val, keyexpr, payload, payload_len); + _z_trigger_local_subscriptions(zs._val, keyexpr, payload, payload_len, options->attachment); return ret; } @@ -698,7 +698,7 @@ int8_t z_publisher_put(const z_publisher_t pub, const uint8_t *payload, size_t l pub._val->_congestion_control, pub._val->_priority, options->attachment); // Trigger local subscriptions - _z_trigger_local_subscriptions(pub._val->_zn, pub._val->_key, payload, len); + _z_trigger_local_subscriptions(pub._val->_zn, pub._val->_key, payload, len, options->attachment); return ret; } @@ -1170,7 +1170,7 @@ void z_bytes_map_insert_by_alias(const z_owned_bytes_map_t *this_, z_bytes_t key _z_bytes_clear(&head->value); head->value = _z_bytes_wrap(value.start, value.len); } else { - struct _z_bytes_pair_t *insert = z_malloc(sizeof(struct _z_bytes_pair_t)); + struct _z_bytes_pair_t *insert = zp_malloc(sizeof(struct _z_bytes_pair_t)); memset(insert, 0, sizeof(struct _z_bytes_pair_t)); insert->key = _z_bytes_wrap(key.start, key.len); insert->value = _z_bytes_wrap(value.start, value.len); @@ -1194,7 +1194,7 @@ void z_bytes_map_insert_by_copy(const z_owned_bytes_map_t *this_, z_bytes_t key, _z_bytes_copy(&head->key, &key); } } else { - struct _z_bytes_pair_t *insert = z_malloc(sizeof(struct _z_bytes_pair_t)); + struct _z_bytes_pair_t *insert = zp_malloc(sizeof(struct _z_bytes_pair_t)); memset(insert, 0, sizeof(struct _z_bytes_pair_t)); _z_bytes_copy(&insert->key, &key); _z_bytes_copy(&insert->value, &value); diff --git a/src/session/subscription.c b/src/session/subscription.c index e371d9871..f585e9c23 100644 --- a/src/session/subscription.c +++ b/src/session/subscription.c @@ -153,10 +153,10 @@ _z_subscription_sptr_t *_z_register_subscription(_z_session_t *zn, uint8_t is_lo } void _z_trigger_local_subscriptions(_z_session_t *zn, const _z_keyexpr_t keyexpr, const uint8_t *payload, - _z_zint_t payload_len) { + _z_zint_t payload_len, z_attachment_t att) { _z_encoding_t encoding = {.prefix = Z_ENCODING_PREFIX_DEFAULT, .suffix = _z_bytes_wrap(NULL, 0)}; int8_t ret = _z_trigger_subscriptions(zn, keyexpr, _z_bytes_wrap(payload, payload_len), encoding, Z_SAMPLE_KIND_PUT, - _z_timestamp_null()); + _z_timestamp_null(), att); (void)ret; } diff --git a/zenohpico.pc b/zenohpico.pc index 294510e87..9d9ccaf90 100644 --- a/zenohpico.pc +++ b/zenohpico.pc @@ -3,6 +3,6 @@ prefix=/usr/local Name: zenohpico Description: URL: -Version: 0.11.20240109dev +Version: 0.11.20240116dev Cflags: -I${prefix}/include Libs: -L${prefix}/lib -lzenohpico