X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=frontend.ml;h=9d444c3c7242c654a79478f7c33518631dbbd095;hb=9ec649e8f697ffba675a6a2b7b959e89f80f4eab;hp=9341633ff2ee67529cc037beb2a5041263b122a0;hpb=1cb8aece1ca2143dc2dbc1c998175274a3fb2095;p=vsys.git diff --git a/frontend.ml b/frontend.ml index 9341633..9d444c3 100644 --- a/frontend.ml +++ b/frontend.ml @@ -4,6 +4,7 @@ open Printf open Unix open Globals open Directfifowatcher +open Unixsocketwatcher (** frontendhandler class: Methods to create and unlink pipes and directories @param root_dir vsys directory inside a slice @@ -25,15 +26,7 @@ object(this) let realperm = perm land (lnot 0o111) in match rp with Relpath(rel) -> let fqp = String.concat "/" [root_dir;rel] in - let res = Directfifowatcher.mkentry fqp abspath realperm slice_name in - begin - match res with - | Success -> - Directfifowatcher.openentry root_dir fqp (abspath,slice_name) - | _ -> - logprint "Could not create entry %s" abspath - end; - if (is_fd_passer rel) then + if (this#is_fd_passer rel) then let res = Unixsocketwatcher.mkentry fqp abspath realperm slice_name in begin match res with @@ -42,7 +35,16 @@ object(this) | _ -> logprint "Could not create entry %s" abspath end - + else + let res = Directfifowatcher.mkentry fqp abspath realperm slice_name in + begin + match res with + | Success -> + Directfifowatcher.openentry root_dir fqp (abspath,slice_name) + | _ -> + logprint "Could not create entry %s" abspath + end +