From 471a853e343e336adb14a219fba2d2ead9a1db62 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Mon, 6 Aug 2012 16:35:46 +0200 Subject: lib/util: add server_id_set_disconnected() and server_id_is_disconnected() Utility functions for handling the special placeholder server-id value for disconnected clients (to be used for durable handles). Pair-Programmed-With: Stefan Metzmacher --- lib/util/samba_util.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib/util/samba_util.h') diff --git a/lib/util/samba_util.h b/lib/util/samba_util.h index e69aa7c40c..4a6dd3bc80 100644 --- a/lib/util/samba_util.h +++ b/lib/util/samba_util.h @@ -904,4 +904,16 @@ char *server_id_str(TALLOC_CTX *mem_ctx, const struct server_id *id); struct server_id server_id_from_string(uint32_t local_vnn, const char *pid_string); +/** + * Set the serverid to the special value that represents a disconnected + * client for (e.g.) durable handles. + */ +void server_id_set_disconnected(struct server_id *id); + +/** + * check whether a serverid is the special placeholder for + * a disconnected client + */ +bool server_id_is_disconnected(const struct server_id *id); + #endif /* _SAMBA_UTIL_H_ */ -- cgit