Skip to content

Commit

Permalink
fix merge goofs
Browse files Browse the repository at this point in the history
  • Loading branch information
p-avital committed Jan 16, 2024
1 parent 8c27f6b commit 8210ccc
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions include/zenoh-pico/session/subscription.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// ZettaScale Zenoh Team, <[email protected]>
//

#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"

Expand All @@ -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);
Expand All @@ -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 */
8 changes: 4 additions & 4 deletions src/api/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/session/subscription.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion zenohpico.pc
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 8210ccc

Please sign in to comment.