Skip to content

Commit

Permalink
Merge 6cdd636 into 144fa27
Browse files Browse the repository at this point in the history
  • Loading branch information
krizex committed Jan 17, 2018
2 parents 144fa27 + 6cdd636 commit a575719
Show file tree
Hide file tree
Showing 4 changed files with 625 additions and 275 deletions.
6 changes: 3 additions & 3 deletions network/jbuild
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ let coverage_rewriter =
""

let rewriters_camlp4 = ["rpclib.idl -syntax camlp4o"]
let rewriters_ppx = ["ppx_deriving_rpc"; "ppx_sexp_conv"]
let rewriters_ppx = ["ppx_deriving_rpc"; "ppx_sexp_conv";]

let () = Printf.ksprintf Jbuild_plugin.V1.send {|
(jbuild_version 1)
Expand All @@ -32,7 +32,7 @@ let () = Printf.ksprintf Jbuild_plugin.V1.send {|
((name xcp_network_interface)
(public_name xcp.network.interface)
(modules (network_interface))
(flags (:standard -w -39 %s))
(flags (:standard -w -39 -w -34 -w -27 %s))
(libraries
(rpclib
threads
Expand All @@ -53,4 +53,4 @@ let () = Printf.ksprintf Jbuild_plugin.V1.send {|
(wrapped false)
%s))

|} (flags rewriters_camlp4) coverage_rewriter (flags rewriters_ppx) coverage_rewriter
|} (flags rewriters_ppx) coverage_rewriter (flags rewriters_ppx) coverage_rewriter
26 changes: 13 additions & 13 deletions network/network_client.ml
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ let retry_econnrefused f =
| None -> loop () in
loop ()

module Client = Network_interface.Client(struct
let rpc call =
retry_econnrefused
(fun () ->
if !use_switch
then json_switch_rpc !queue_name call
else xml_http_rpc
~srcstr:(Xcp_client.get_user_agent ())
~dststr:"network"
Network_interface.uri
call
)
end)
let rpc call =
retry_econnrefused
(fun () ->
if !use_switch
then json_switch_rpc !queue_name call
else xml_http_rpc
~srcstr:(Xcp_client.get_user_agent ())
~dststr:"network"
Network_interface.uri
call
)

module Client = Network_interface.API(Idl.GenClientExnRpc(struct let rpc=rpc end))
Loading

0 comments on commit a575719

Please sign in to comment.