summaryrefslogtreecommitdiffstats
path: root/tests/basic/gfapi/bug1283983.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/basic/gfapi/bug1283983.c')
-rw-r--r--tests/basic/gfapi/bug1283983.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/tests/basic/gfapi/bug1283983.c b/tests/basic/gfapi/bug1283983.c
index 76db8d5ca09..19354eb7453 100644
--- a/tests/basic/gfapi/bug1283983.c
+++ b/tests/basic/gfapi/bug1283983.c
@@ -32,20 +32,18 @@ int gfapi = 1;
int
main (int argc, char *argv[])
{
- glfs_t *fs = NULL;
- int ret = 0, i;
- glfs_fd_t *fd = NULL;
- char *filename = "/a1";
- char *filename2 = "/a2";
- struct stat sb = {0, };
- struct callback_arg cbk;
- char *logfile = NULL;
- char *volname = NULL;
- int cnt = 1;
- struct callback_inode_arg *in_arg = NULL;
- struct glfs_object *root = NULL, *leaf = NULL;
-
- cbk.reason = 0;
+ glfs_t *fs = NULL;
+ int ret = 0, i;
+ glfs_fd_t *fd = NULL;
+ char *filename = "/a1";
+ char *filename2 = "/a2";
+ struct stat sb = {0, };
+ struct glfs_upcall *cbk = NULL;
+ char *logfile = NULL;
+ char *volname = NULL;
+ int cnt = 1;
+ struct glfs_upcall_inode *in_arg = NULL;
+ struct glfs_object *root = NULL, *leaf = NULL;
fprintf (stderr, "Starting libgfapi_fini\n");
if (argc != 3) {
@@ -105,11 +103,13 @@ main (int argc, char *argv[])
LOG_ERR ("glfs_h_poll_upcall", ret);
/* There should not be any upcalls sent */
- if (cbk.reason != GFAPI_CBK_EVENT_NULL) {
+ if (glfs_upcall_get_reason(cbk) != GLFS_UPCALL_EVENT_NULL) {
fprintf (stderr, "Error: Upcall received(%d)\n",
- cbk.reason);
+ glfs_upcall_get_reason(cbk));
exit (1);
}
+
+ glfs_free (cbk);
}
ret = glfs_fini(fs);