Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove all explicit initialisations of stunnel_path.

The path is now initialised lazily. See
xapi-project/xen-api-libs#101

Signed-off-by: Rok Strniša <rok.strnisa@citrix.com>
  • Loading branch information...
commit 13536f8e3c2dc56a6b04a496239eed3895fbc014 1 parent 98c47d7
@rokstrnisa rokstrnisa authored
View
2  ocaml/perftest/apiperf.ml
@@ -153,8 +153,6 @@ let _ =
if not !master && !slave_limit = 0 then failwith "Must provide either -master or -slaves argument";
- Stunnel.init_stunnel_path ();
-
let session = Client.Session.login_with_password rpc "root" "xenroot" "1.2" in
finally
(fun () ->
View
1  ocaml/perftest/perftest.ml
@@ -54,7 +54,6 @@ let get_metadata rpc session_id =
sv
let _ =
- Stunnel.init_stunnel_path ();
let template_name = ref "sdk-gold" in
let key = ref "" in
let scenario = ref "xendesktop" in
View
2  ocaml/rrdd/rrdd_main.ml
@@ -643,8 +643,6 @@ let monitor_loop () =
(* Entry point. *)
let _ =
Debug.set_facility Syslog.Local5;
- (* FIXME: This should be done lazily within stunnel. *)
- Stunnel.init_stunnel_path ();
debug "Start.";
debug "Processing arguments ..";
View
1  ocaml/sm-cli/main.ml
@@ -62,7 +62,6 @@ let kvpairs = List.filter_map
let _ =
if Array.length Sys.argv < 2 then usage_and_exit ();
- Stunnel.init_stunnel_path ();
(* Look for url=foo *)
let args = Array.to_list Sys.argv in
begin
View
7 ocaml/vncproxy/vncproxy.ml
@@ -14,13 +14,13 @@
open Pervasiveext
open Client
-let _ =
+let _ =
let vm = ref "" in
let server = ref "" in
let username = ref "" in
let password = ref "" in
let ip = ref "127.0.0.1" in
- Arg.parse [
+ Arg.parse [
"-vm", Arg.Set_string vm, "VM uuid or name-label";
"-s", Arg.Set_string server, "server hostname or IP (default unix domain socket)";
"-u", Arg.Set_string username, "username";
@@ -30,8 +30,7 @@ let _ =
(fun x -> Printf.fprintf stderr "Ignoring: %s\n" x)
"Proxy VNC traffic";
if !vm = "" then failwith "Must supply a VM uuid or name-label";
- Stunnel.init_stunnel_path ();
-
+
let sockaddr = Unix.ADDR_INET(Unix.inet_addr_of_string !ip, 0) in
let sock = Unix.socket Unix.PF_INET Unix.SOCK_STREAM 0 in
Unix.setsockopt sock Unix.SO_REUSEADDR true;
View
1  ocaml/xapi/quicktest.ml
@@ -733,7 +733,6 @@ let _ =
assert (List.mem name all_tests);
if List.mem name !tests_to_run then f () in
- Stunnel.init_stunnel_path ();
let s = init_session !username !password in
finally
(fun () ->
View
3  ocaml/xapi/sparse_dd.ml
@@ -598,8 +598,7 @@ let progress_cb =
end;
last_percent := new_percent
-let _ =
- Stunnel.init_stunnel_path ();
+let _ =
let base = ref None and src = ref None and dest = ref None and size = ref (-1L) and prezeroed = ref false and test = ref false in
read_config_file ();
Arg.parse [ "-base", Arg.String (fun x -> base := Some x), "base disk to search for differences from (default: None)";
View
1  ocaml/xapi/xapi.ml
@@ -787,7 +787,6 @@ let server_init() =
Startup.run ~__context [
"Reading config file", [], (fun () -> Xapi_config.read_config !Xapi_globs.config_file);
"Reading external global variables definition", [ Startup.NoExnRaising ], Xapi_globs.read_external_config;
- "Initing stunnel path", [], Stunnel.init_stunnel_path;
"XAPI SERVER STARTING", [], print_server_starting_message;
"Parsing inventory file", [], Xapi_inventory.read_inventory;
"Initialising local database", [], init_local_database;
View
1  ocaml/xe-cli/newcli.ml
@@ -590,7 +590,6 @@ let main () =
let _ = try
Sys.set_signal Sys.sigpipe Sys.Signal_ignore;
Sys.set_signal Sys.sigint (Sys.Signal_handle (fun _ -> exit 1));
- Stunnel.init_stunnel_path();
let xe, args =
match Array.to_list Sys.argv with
| h :: t -> h, t
View
3  ocaml/xsh/xsh.ml
@@ -75,10 +75,7 @@ let _ =
let cmd = Sys.argv.(2) in
let session = try Sys.getenv "XSH_SESSION" with _ -> failwith "Session not provided" in
let args = List.map (fun arg -> "&arg="^arg) (List.tl (List.tl (List.tl (Array.to_list Sys.argv)))) in
- Stunnel.init_stunnel_path();
let req = Printf.sprintf "CONNECT /remotecmd?session_id=%s&cmd=%s%s http/1.0\r\n\r\n" session cmd (String.concat "" args) in
let fd = open_tcp_ssl host in
ignore_int (Unix.write fd req 0 (String.length req));
proxy Unix.stdin Unix.stdout fd (Unix.dup fd)
-
-
Please sign in to comment.
Something went wrong with that request. Please try again.