File tree Expand file tree Collapse file tree 4 files changed +8
-2
lines changed Expand file tree Collapse file tree 4 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 1
1
.{
2
2
.name = .gatorcat ,
3
- .version = "0.3.4 " ,
3
+ .version = "0.3.5 " ,
4
4
.fingerprint = 0xb9356c7c4de9ca59 , // Changing this has security and trust implications.
5
5
.minimum_zig_version = "0.14.0" ,
6
6
.dependencies = .{
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ services:
12
12
environment :
13
13
- PYTHONUNBUFFERED=1
14
14
gatorcat :
15
- image : ghcr.io/kj4tmp/gatorcat:0.3.3
15
+ image : ghcr.io/kj4tmp/gatorcat:0.3.4
16
16
command : run --ifname enx00e04c68191a --zenoh-config-default
17
17
volumes :
18
18
- /dev/shm/:/dev/shm/
Original file line number Diff line number Diff line change @@ -20,6 +20,9 @@ def subscribe_in_background():
20
20
last_print_time = time .perf_counter_ns ()
21
21
print (f"last print time: { last_print_time } " )
22
22
for sample in sub :
23
+ if sample .encoding != zenoh .Encoding .APPLICATION_CBOR :
24
+ print (f"wrong encoding: { sample .encoding } " )
25
+ continue
23
26
if sample .kind == zenoh .SampleKind .DELETE :
24
27
channels .pop (str (sample .key_expr ), None )
25
28
elif sample .kind == zenoh .SampleKind .PUT :
Original file line number Diff line number Diff line change @@ -875,6 +875,9 @@ pub const ZenohHandler = struct {
875
875
fn publishAssumeKey (self : * ZenohHandler , key : [:0 ]const u8 , payload : []const u8 ) ! void {
876
876
var options : zenoh.c.z_publisher_put_options_t = undefined ;
877
877
zenoh .c .z_publisher_put_options_default (& options );
878
+ var encoding : zenoh.c.z_owned_encoding_t = undefined ;
879
+ zenoh .c .z_encoding_clone (& encoding , zenoh .c .z_encoding_application_cbor ());
880
+ options .encoding = zenoh .move (& encoding );
878
881
var bytes : zenoh.c.z_owned_bytes_t = undefined ;
879
882
const result_copy = zenoh .c .z_bytes_copy_from_buf (& bytes , payload .ptr , payload .len );
880
883
try zenoh .err (result_copy );
You can’t perform that action at this time.
0 commit comments