2019-03-30 22:49:28 +00:00
|
|
|
#include "webfuse/adapter/impl/operations.h"
|
|
|
|
#include "webfuse/adapter/impl/session_manager.h"
|
|
|
|
#include "webfuse/adapter/impl/session.h"
|
|
|
|
#include <stddef.h>
|
|
|
|
|
2019-03-30 23:14:09 +00:00
|
|
|
struct wf_impl_jsonrpc_proxy * wf_impl_operations_context_get_proxy(
|
2019-03-30 22:49:28 +00:00
|
|
|
struct wf_impl_operations_context * context,
|
|
|
|
fuse_ino_t inode)
|
|
|
|
{
|
2019-03-30 23:14:09 +00:00
|
|
|
struct wf_impl_jsonrpc_proxy * proxy = NULL;
|
2019-03-30 22:49:28 +00:00
|
|
|
|
|
|
|
struct wf_impl_session_manager * session_manger = context->session_manager;
|
|
|
|
struct wf_impl_session * session = wf_impl_session_manager_get_by_inode(session_manger, inode);
|
|
|
|
if (NULL != session)
|
|
|
|
{
|
2019-03-30 23:14:09 +00:00
|
|
|
proxy = &session->rpc;
|
2019-03-30 22:49:28 +00:00
|
|
|
}
|
|
|
|
|
2019-03-30 23:14:09 +00:00
|
|
|
return proxy;
|
2019-03-30 22:49:28 +00:00
|
|
|
}
|