diff --git a/src/wsfs/operation/ll_getattr.c b/src/wsfs/operation/ll_getattr.c index 101c013..c0facf7 100644 --- a/src/wsfs/operation/ll_getattr.c +++ b/src/wsfs/operation/ll_getattr.c @@ -20,7 +20,8 @@ extern void wsfs_operation_ll_getattr ( printf("getattr: inode=%lu\n", inode); struct fuse_ctx const * context = fuse_req_ctx(request); - struct wsfs_jsonrpc * rpc = fuse_req_userdata(request); + struct wsfs_operations_context * user_data = fuse_req_userdata(request); + struct wsfs_jsonrpc * rpc = user_data->rpc; struct stat buffer; json_t * data = NULL; @@ -64,7 +65,7 @@ extern void wsfs_operation_ll_getattr ( if (WSFS_GOOD == status) { - fuse_reply_attr(request, &buffer, 1.0); + fuse_reply_attr(request, &buffer, user_data->timeout); } else { diff --git a/src/wsfs/operations.c b/src/wsfs/operations.c index 2602667..05838ef 100644 --- a/src/wsfs/operations.c +++ b/src/wsfs/operations.c @@ -57,7 +57,11 @@ int wsfs_operations_loop_ll( const int argc = 1; char * argv[] = {"", NULL}; struct fuse_args args = FUSE_ARGS_INIT(argc, argv); - struct fuse_session * session = fuse_session_new(&args, &operations, sizeof(operations), rpc); + struct wsfs_operations_context context = { + .rpc = rpc, + .timeout = 1.0 + }; + struct fuse_session * session = fuse_session_new(&args, &operations, sizeof(operations), &context); if (NULL != session) { fuse_set_signal_handlers(session); diff --git a/src/wsfs/operations.h b/src/wsfs/operations.h index 7f3b9b2..14b3c65 100644 --- a/src/wsfs/operations.h +++ b/src/wsfs/operations.h @@ -5,6 +5,12 @@ struct wsfs_jsonrpc; +struct wsfs_operations_context +{ + struct wsfs_jsonrpc * rpc; + double timeout; +}; + #ifdef __cplusplus extern "C" { #endif