Add an assert to track if we try to use an rpc_context after it has been destroyed
[deb_libnfs.git] / include / libnfs-private.h
index 29f04066a51dee23e2d10aa935ce9303f7656fb4..e32a70631f4a9e45dbfb7246edd7aa5029d27105 100644 (file)
@@ -23,7 +23,10 @@ struct rpc_fragment {
        char *data;
 };
 
+#define RPC_CONTEXT_MAGIC 0xc6e46435
+
 struct rpc_context {
+        uint32_t magic;
        int fd;
        int is_connected;
 
@@ -88,7 +91,6 @@ void rpc_error_all_pdus(struct rpc_context *rpc, char *error);
 void rpc_set_error(struct rpc_context *rpc, char *error_string, ...);
 void nfs_set_error(struct nfs_context *nfs, char *error_string, ...);
 
-struct rpc_context *nfs_get_rpc_context(struct nfs_context *nfs);
 const char *nfs_get_server(struct nfs_context *nfs);
 const char *nfs_get_export(struct nfs_context *nfs);