dovecot-2.0: lib-master: Added missing anvil_client_is_connected()

dovecot at dovecot.org dovecot at dovecot.org
Fri Nov 19 23:08:54 EET 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/f5bec4e94b55
changeset: 12451:f5bec4e94b55
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Nov 19 21:08:37 2010 +0000
description:
lib-master: Added missing anvil_client_is_connected()

diffstat:

 src/lib-master/anvil-client.c |  5 +++++
 src/lib-master/anvil-client.h |  3 +++
 2 files changed, 8 insertions(+), 0 deletions(-)

diffs (23 lines):

diff -r 0d455d1a9ea6 -r f5bec4e94b55 src/lib-master/anvil-client.c
--- a/src/lib-master/anvil-client.c	Fri Nov 19 16:24:41 2010 +0000
+++ b/src/lib-master/anvil-client.c	Fri Nov 19 21:08:37 2010 +0000
@@ -189,3 +189,8 @@
 {
 	(void)anvil_client_send(client, cmd);
 }
+
+bool anvil_client_is_connected(struct anvil_client *client)
+{
+	return client->fd != -1;
+}
diff -r 0d455d1a9ea6 -r f5bec4e94b55 src/lib-master/anvil-client.h
--- a/src/lib-master/anvil-client.h	Fri Nov 19 16:24:41 2010 +0000
+++ b/src/lib-master/anvil-client.h	Fri Nov 19 21:08:37 2010 +0000
@@ -25,4 +25,7 @@
 /* Send a command to anvil, don't expect any replies. */
 void anvil_client_cmd(struct anvil_client *client, const char *cmd);
 
+/* Returns TRUE if anvil is connected to. */
+bool anvil_client_is_connected(struct anvil_client *client);
+
 #endif


More information about the dovecot-cvs mailing list