From: Sapan Bhatia Date: Wed, 2 Jul 2008 04:05:17 +0000 (+0000) Subject: Still trying to fix KyoungSoo's bug X-Git-Tag: vsys-0.7-16~4 X-Git-Url: http://git.onelab.eu/?p=vsys.git;a=commitdiff_plain;h=7ae75ecaa4e7772450202515acf892685ee6179e Still trying to fix KyoungSoo's bug --- diff --git a/directfifowatcher.ml b/directfifowatcher.ml index 2e1e60a..075f08c 100644 --- a/directfifowatcher.ml +++ b/directfifowatcher.ml @@ -52,14 +52,17 @@ let openentry_safe root_dir fqp_in backend_spec = Hashtbl.replace direct_fifo_table fqp_in (Some(root_dir,fqp,slice_name,fd_in)) let openentry root_dir fqp backend_spec = + () (* let fqp_in = String.concat "." [fqp;"in"] in - openentry_safe root_dir fqp_in backend_spec + openentry_safe root_dir fqp_in backend_spec*) let reopenentry fifoin = + () + (* let entry = try Hashtbl.find direct_fifo_table fifoin with _ -> None in match entry with | Some(dir, fqp,slice_name,fd) -> close_if_open fd;openentry_safe dir fifoin (fqp,slice_name) - | None -> () + | None -> ()*) (* vsys is activated when a client opens an in file *) let connect_file fqp_in = @@ -68,8 +71,6 @@ let connect_file fqp_in = Hashtbl.find direct_fifo_table fqp_in with _ -> None in match entry_info with | Some(_,execpath,slice_name,fifo_fdin) -> - (*fprintf logfd "Executing %s for slice %s\n" execpath - * slice_name;flush logfd;*) begin let len = String.length fqp_in in let fqp = String.sub fqp_in 0 (len-3) in @@ -133,7 +134,6 @@ let sigchld_handle s = begin reopenentry fqp_in end - with _ -> () let rec add_dir_watch fqp = diff --git a/dirwatcher.ml b/dirwatcher.ml index 810b2bc..a50416f 100644 --- a/dirwatcher.ml +++ b/dirwatcher.ml @@ -71,17 +71,23 @@ let receive_event (eventdescriptor:fname_and_fd) (bla:fname_and_fd) = | None->logprint "Unhandled watch descriptor\n" | Some(handler)-> let fqp = String.concat "/" [dirname;purestr] in + logprint "Received event from %s\n" fqp; let mask_filter = Hashtbl.mem masks fqp in begin if ((not mask_filter)) then begin - (*logprint "Received event for - %s\n" + (* + logprint "Received event for - %s\n" fqp;*) handler wd dirname evlist purestr end else - unmask_watch fqp + begin + (*logprint "Unmasking %s\n" + * fqp;*) + unmask_watch fqp + end end end | _ -> ()) diff --git a/tests/vsys_conctest.c b/tests/vsys_conctest.c index 1f94c69..16fd279 100644 --- a/tests/vsys_conctest.c +++ b/tests/vsys_conctest.c @@ -33,6 +33,7 @@ int main() exit(-1); } +// printf("(opening in file)"); if ((fd_in = open(top_in_file, O_WRONLY)) < 0) { fprintf(stderr, "error opening %s\n", top_in_file); exit(-1);