File tree Expand file tree Collapse file tree 3 files changed +3
-8
lines changed Expand file tree Collapse file tree 3 files changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -31,12 +31,9 @@ let create ~__context ~pool =
31
31
with_lock m (fun () -> Hashtbl. replace table r session) ;
32
32
r
33
33
34
- let get_record ~__context ~self = with_lock m (fun () -> Hashtbl. find table self)
34
+ let has_record ~__context ~self = with_lock m (fun () -> Hashtbl. mem table self)
35
35
36
36
let destroy ~__context ~self = with_lock m (fun () -> Hashtbl. remove table self)
37
37
38
38
let local_session_hook ~__context ~session_id =
39
- try
40
- ignore (get_record ~__context ~self: session_id) ;
41
- true
42
- with _ -> false
39
+ has_record ~__context ~self: session_id
Original file line number Diff line number Diff line change @@ -19,8 +19,6 @@ val get_all : __context:Context.t -> API.ref_session list
19
19
20
20
val create : __context :Context .t -> pool :bool -> API .ref_session
21
21
22
- val get_record : __context :Context .t -> self :API .ref_session -> t
23
-
24
22
val destroy : __context :Context .t -> self :API .ref_session -> unit
25
23
26
24
val local_session_hook :
Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ unixgetenv () {
110
110
}
111
111
112
112
hashtblfind () {
113
- N=35
113
+ N=34
114
114
# Looks for all .ml files except the ones using Core.Hashtbl.find,
115
115
# which already returns Option
116
116
HASHTBLFIND=$( git grep -P -r --count ' Hashtbl.find(?!_opt)' -- ' **/*.ml' ' :!ocaml/xapi-storage-script/main.ml' | cut -d ' :' -f 2 | paste -sd+ - | bc)
You can’t perform that action at this time.
0 commit comments