Skip to content

Commit

Permalink
Make sure that metadata are always passed in increasing position orde…
Browse files Browse the repository at this point in the history
…r in map_metadata. Fixes: #469
  • Loading branch information
toots committed Oct 6, 2017
1 parent f5853ba commit da8fb02
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@ New:
Changed:

- Renamed secure transport harbor key paths to: harbor.secure_transport.*

= Renamed secure transport I/O to: {input,output}.harbor.secure_transport.

Fixed:

- Fixed `mutexify`

- Make sure that metadata are always passed in incresing position order in `map_metadata` (#469)

1.3.2 (02-09-2017)
=====

Expand Down
4 changes: 3 additions & 1 deletion src/stream/frame.ml
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,9 @@ let get_metadata b t =
let free_metadata b t =
b.metadata <- List.filter (fun (tt,_) -> t<>tt) b.metadata
let free_all_metadata b = b.metadata <- []
let get_all_metadata b = List.filter (fun (x,_) -> x <> -1) b.metadata
let get_all_metadata b =
List.sort (fun (x,_) (y,_) -> compare x y)
(List.filter (fun (x,_) -> x <> -1) b.metadata)
let set_all_metadata b l = b.metadata <- l
let get_past_metadata b =
try Some (List.assoc (-1) b.metadata) with Not_found -> None
Expand Down

0 comments on commit da8fb02

Please sign in to comment.