X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=ocaml%2Ft%2Fguestfs_400_progress.ml;h=d49ddffd721aa1d362efaa479c7e9f0623d2d1d5;hb=e18058a5a56236cbac23f10dc8a91420a3525562;hp=7227fac2e56db7e8a661397ea841ae559f4ab9d9;hpb=d1485e02f538d50fd7d4790fb63317093ba8c6bf;p=libguestfs.git diff --git a/ocaml/t/guestfs_400_progress.ml b/ocaml/t/guestfs_400_progress.ml index 7227fac..d49ddff 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 @@ -13,7 +13,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) module G = Guestfs @@ -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);