X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=ocaml%2Ft%2Fguestfs_400_progress.ml;fp=ocaml%2Ft%2Fguestfs_400_progress.ml;h=f5b4219c70832a4a9e597e7922404efc06bc73b5;hp=7227fac2e56db7e8a661397ea841ae559f4ab9d9;hb=7e51cc94ddb7527b37111d6fecce96dca14b900a;hpb=4e0cf4dbf8a8a96288f70114fdc3939da0aa7ad1 diff --git a/ocaml/t/guestfs_400_progress.ml b/ocaml/t/guestfs_400_progress.ml index 7227fac..f5b4219 100644 --- a/ocaml/t/guestfs_400_progress.ml +++ b/ocaml/t/guestfs_400_progress.ml @@ -1,5 +1,5 @@ (* libguestfs OCaml bindings - * Copyright (C) 2010 Red Hat Inc. + * Copyright (C) 2010-2011 Red Hat Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -25,15 +25,15 @@ let () = G.launch g; let calls = ref 0 in - let cb _ _ _ _ = incr calls in - G.set_progress_callback g cb; + let cb _ _ _ _ _ = incr calls in + let eh = G.set_event_callback g cb [G.EVENT_PROGRESS] in assert ("ok" = G.debug g "progress" [| "5" |]); assert (!calls > 0); calls := 0; - G.clear_progress_callback g; + G.delete_event_callback g eh; assert ("ok" = G.debug g "progress" [| "5" |]); assert (!calls = 0); - G.set_progress_callback g cb; + ignore (G.set_event_callback g cb [G.EVENT_PROGRESS]); assert ("ok" = G.debug g "progress" [| "5" |]); assert (!calls > 0);