[dovecot-cvs] dovecot/src/master auth-process.c, 1.85, 1.86 common.h, 1.23, 1.24 log.c, 1.4, 1.5 login-process.c, 1.67, 1.68 mail-process.c, 1.78, 1.79 mail-process.h, 1.7, 1.8 main.c, 1.68, 1.69 master-login-interface.h, 1.6, 1.7 master-settings.c, 1.98, 1.99 master-settings.h, 1.65, 1.66 ssl-init.c, 1.12, 1.13 syslog-util.c, 1.2, 1.3 syslog-util.h, 1.1, 1.2

cras at dovecot.org cras at dovecot.org
Fri Jan 13 22:26:43 EET 2006


Update of /var/lib/cvs/dovecot/src/master
In directory talvi:/tmp/cvs-serv27808/src/master

Modified Files:
	auth-process.c common.h log.c login-process.c mail-process.c 
	mail-process.h main.c master-login-interface.h 
	master-settings.c master-settings.h ssl-init.c syslog-util.c 
	syslog-util.h 
Log Message:
Added "bool" type and changed all ints that were used as booleans to bool.



Index: auth-process.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/master/auth-process.c,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -d -r1.85 -r1.86
--- auth-process.c	11 Jan 2006 23:47:03 -0000	1.85
+++ auth-process.c	13 Jan 2006 20:26:40 -0000	1.86
@@ -91,7 +91,7 @@
 	t_pop();
 }
 
-static int
+static bool
 auth_process_input_user(struct auth_process *process, const char *args)
 {
 	void *context;
@@ -120,7 +120,7 @@
 	return TRUE;
 }
 
-static int
+static bool
 auth_process_input_notfound(struct auth_process *process, const char *args)
 {
 	void *context;
@@ -140,7 +140,7 @@
 	return TRUE;
 }
 
-static int
+static bool
 auth_process_input_spid(struct auth_process *process, const char *args)
 {
 	unsigned int pid;
@@ -167,7 +167,7 @@
 	return TRUE;
 }
 
-static int
+static bool
 auth_process_input_fail(struct auth_process *process, const char *args)
 {
 	void *context;
@@ -196,7 +196,7 @@
 {
 	struct auth_process *process = context;
 	const char *line;
-	int ret;
+	bool ret;
 
 	switch (i_stream_read(process->input)) {
 	case 0:

Index: common.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/master/common.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- common.h	11 Jan 2006 23:47:03 -0000	1.23
+++ common.h	13 Jan 2006 20:26:40 -0000	1.24
@@ -45,6 +45,6 @@
 /* misc */
 #define VALIDATE_STR(str) \
 	validate_str(str, sizeof(str))
-int validate_str(const char *str, size_t max_len);
+bool validate_str(const char *str, size_t max_len);
 
 #endif

Index: log.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/master/log.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- log.c	9 Jan 2005 20:12:35 -0000	1.4
+++ log.c	13 Jan 2006 20:26:40 -0000	1.5
@@ -27,12 +27,12 @@
 static struct timeout *to;
 static unsigned int throttle_count;
 
-static int log_it(struct log_io *log_io, const char *line, int continues);
+static int log_it(struct log_io *log_io, const char *line, bool continues);
 static void log_read(void *context);
 static void log_io_free(struct log_io *log_io);
 static void log_throttle_timeout(void *context);
 
-static int log_write_pending(struct log_io *log_io)
+static bool log_write_pending(struct log_io *log_io)
 {
 	const char *line;
 
@@ -80,7 +80,7 @@
 			    IO_READ, log_read, log_io);
 }
 
-static int log_it(struct log_io *log_io, const char *line, int continues)
+static int log_it(struct log_io *log_io, const char *line, bool continues)
 {
 	const char *prefix;
 

Index: login-process.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/master/login-process.c,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -d -r1.67 -r1.68
--- login-process.c	28 Oct 2005 11:38:04 -0000	1.67
+++ login-process.c	13 Jan 2006 20:26:40 -0000	1.68
@@ -51,7 +51,7 @@
 
 static void login_process_destroy(struct login_process *p);
 static void login_process_unref(struct login_process *p);
-static int login_process_init_group(struct login_process *p);
+static bool login_process_init_group(struct login_process *p);
 
 static void login_group_create(struct settings *set)
 {
@@ -163,7 +163,7 @@
 	return NULL;
 }
 
-static int login_process_read_group(struct login_process *p)
+static bool login_process_read_group(struct login_process *p)
 {
 	struct login_group *group;
 	const char *name, *proto;
@@ -667,7 +667,7 @@
 	return ret;
 }
 
-static int login_process_init_group(struct login_process *p)
+static bool login_process_init_group(struct login_process *p)
 {
 	p->group->processes++;
 	p->group->listening_processes++;

Index: mail-process.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/master/mail-process.c,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -d -r1.78 -r1.79
--- mail-process.c	28 Oct 2005 11:27:46 -0000	1.78
+++ mail-process.c	13 Jan 2006 20:26:40 -0000	1.79
@@ -25,8 +25,8 @@
 
 static unsigned int mail_process_count = 0;
 
-static int validate_uid_gid(struct settings *set, uid_t uid, gid_t gid,
-			    const char *user)
+static bool validate_uid_gid(struct settings *set, uid_t uid, gid_t gid,
+			     const char *user)
 {
 	if (uid == 0) {
 		i_error("Logins with UID 0 not permitted (user %s)", user);
@@ -58,7 +58,7 @@
 	return TRUE;
 }
 
-static int validate_chroot(struct settings *set, const char *dir)
+static bool validate_chroot(struct settings *set, const char *dir)
 {
 	const char *const *chroot_dirs;
 
@@ -304,10 +304,10 @@
 		       set->mail_executable);
 }
 
-int create_mail_process(struct login_group *group, int socket,
-			const struct ip_addr *local_ip,
-			const struct ip_addr *remote_ip,
-			const char *user, const char *const *args)
+bool create_mail_process(struct login_group *group, int socket,
+			 const struct ip_addr *local_ip,
+			 const struct ip_addr *remote_ip,
+			 const char *user, const char *const *args)
 {
 	struct settings *set = group->set;
 	const struct var_expand_table *var_expand_table;

Index: mail-process.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/master/mail-process.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- mail-process.h	13 Oct 2004 16:38:36 -0000	1.7
+++ mail-process.h	13 Jan 2006 20:26:40 -0000	1.8
@@ -6,10 +6,10 @@
 
 void mail_process_exec(const char *protocol, const char *section);
 
-int create_mail_process(struct login_group *group, int socket,
-			const struct ip_addr *local_ip,
-			const struct ip_addr *remote_ip,
-			const char *user, const char *const *args);
+bool create_mail_process(struct login_group *group, int socket,
+			 const struct ip_addr *local_ip,
+			 const struct ip_addr *remote_ip,
+			 const char *user, const char *const *args);
 
 void mail_process_destroyed(pid_t pid);
 

Index: main.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/master/main.c,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -d -r1.68 -r1.69
--- main.c	11 Jan 2006 23:47:03 -0000	1.68
+++ main.c	13 Jan 2006 20:26:40 -0000	1.69
@@ -43,13 +43,13 @@
 int null_fd, inetd_login_fd;
 uid_t master_uid;
 #ifdef DEBUG
-static int gdb;
+static bool gdb;
 #endif
 
-static void listen_fds_open(int retry);
+static void listen_fds_open(bool retry);
 static void listen_fds_close(struct server_settings *server);
 
-int validate_str(const char *str, size_t max_len)
+bool validate_str(const char *str, size_t max_len)
 {
 	size_t i;
 
@@ -330,7 +330,7 @@
 	}
 }
 
-static void listen_protocols(struct settings *set, int retry)
+static void listen_protocols(struct settings *set, bool retry)
 {
 	struct ip_addr *ip;
 	const char *const *proto;
@@ -421,7 +421,7 @@
 		set->ssl_listen_fd = null_fd;
 }
 
-static void listen_fds_open(int retry)
+static void listen_fds_open(bool retry)
 {
 	struct server_settings *server;
 
@@ -455,7 +455,7 @@
 	}
 }
 
-static int have_stderr_set(struct settings *set)
+static bool have_stderr_set(struct settings *set)
 {
 	if (set->log_path != NULL &&
 	    strcmp(set->log_path, "/dev/stderr") == 0)
@@ -468,7 +468,7 @@
 	return FALSE;
 }
 
-static int have_stderr(struct server_settings *server)
+static bool have_stderr(struct server_settings *server)
 {
 	while (server != NULL) {
 		if (server->imap != NULL && have_stderr_set(server->imap))
@@ -697,7 +697,7 @@
 {
 	/* parse arguments */
 	const char *exec_protocol = NULL, *exec_section = NULL;
-	int foreground = FALSE;
+	bool foreground = FALSE;
 	int i;
 
 #ifdef DEBUG

Index: master-login-interface.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/master/master-login-interface.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- master-login-interface.h	19 Oct 2004 01:17:39 -0000	1.6
+++ master-login-interface.h	13 Jan 2006 20:26:40 -0000	1.7
@@ -23,7 +23,7 @@
 
 struct master_login_reply {
 	unsigned int tag;
-	int success;
+	bool success;
 };
 
 #endif

Index: master-settings.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/master/master-settings.c,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -d -r1.98 -r1.99
--- master-settings.c	11 Jan 2006 23:50:46 -0000	1.98
+++ master-settings.c	13 Jan 2006 20:26:40 -0000	1.99
@@ -394,7 +394,7 @@
 	}
 }
 
-static int get_login_uid(struct settings *set)
+static bool get_login_uid(struct settings *set)
 {
 	struct passwd *pw;
 
@@ -416,7 +416,7 @@
 	return TRUE;
 }
 
-static int auth_settings_verify(struct auth_settings *auth)
+static bool auth_settings_verify(struct auth_settings *auth)
 {
 	struct passwd *pw;
 
@@ -458,7 +458,7 @@
 	return TRUE;
 }
 
-static int namespace_settings_verify(struct namespace_settings *ns)
+static bool namespace_settings_verify(struct namespace_settings *ns)
 {
 	const char *name;
 
@@ -489,7 +489,7 @@
 	}
 }
 
-static int settings_is_active(struct settings *set)
+static bool settings_is_active(struct settings *set)
 {
 	if (set->protocol == MAIL_PROTOCOL_IMAP) {
 		if (strstr(set->protocols, "imap") == NULL)
@@ -502,7 +502,7 @@
 	return TRUE;
 }
 
-static int settings_have_connect_sockets(struct settings *set)
+static bool settings_have_connect_sockets(struct settings *set)
 {
 	struct auth_settings *auth;
 	struct server_settings *server;
@@ -518,7 +518,7 @@
 	return FALSE;
 }
 
-static int settings_verify(struct settings *set)
+static bool settings_verify(struct settings *set)
 {
 	const char *dir;
 	int facility;
@@ -914,8 +914,8 @@
 	return server;
 }
 
-static int parse_section(const char *type, const char *name, void *context,
-			 const char **errormsg)
+static bool parse_section(const char *type, const char *name, void *context,
+			  const char **errormsg)
 {
 	struct settings_parse_ctx *ctx = context;
 	struct server_settings *server;
@@ -1046,7 +1046,7 @@
 	return FALSE;
 }
 
-int master_settings_read(const char *path, int nochecks)
+bool master_settings_read(const char *path, bool nochecks)
 {
 	struct settings_parse_ctx ctx;
 	struct server_settings *server, *prev;

Index: master-settings.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/master/master-settings.h,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -d -r1.65 -r1.66
--- master-settings.h	11 Jan 2006 19:26:07 -0000	1.65
+++ master-settings.h	13 Jan 2006 20:26:40 -0000	1.66
@@ -26,16 +26,16 @@
 	const char *listen;
 	const char *ssl_listen;
 
-	int ssl_disable;
+	bool ssl_disable;
 	const char *ssl_ca_file;
 	const char *ssl_cert_file;
 	const char *ssl_key_file;
 	const char *ssl_parameters_file;
 	unsigned int ssl_parameters_regenerate;
 	const char *ssl_cipher_list;
-	int ssl_verify_client_cert;
-	int disable_plaintext_auth;
-	int verbose_ssl;
+	bool ssl_verify_client_cert;
+	bool disable_plaintext_auth;
+	bool verbose_ssl;
 
 	/* login */
 	const char *login_dir;
@@ -45,9 +45,9 @@
 	const char *login_log_format_elements;
 	const char *login_log_format;
 
-	int login_process_per_connection;
-	int login_chroot;
-	int login_greeting_capability;
+	bool login_process_per_connection;
+	bool login_chroot;
+	bool login_greeting_capability;
 
 	unsigned int login_process_size;
 	unsigned int login_processes_count;
@@ -58,7 +58,7 @@
 	const char *valid_chroot_dirs;
 	const char *mail_chroot;
 	unsigned int max_mail_processes;
-	int verbose_proctitle;
+	bool verbose_proctitle;
 
 	unsigned int first_valid_uid, last_valid_uid;
 	unsigned int first_valid_gid, last_valid_gid;
@@ -68,32 +68,32 @@
 	const char *mail_cache_fields;
 	const char *mail_never_cache_fields;
 	unsigned int mailbox_idle_check_interval;
-	int mail_debug;
-	int mail_full_filesystem_access;
-	int mail_max_keyword_length;
-	int mail_save_crlf;
-	int mail_read_mmaped;
-	int mmap_disable;
-	int mmap_no_write;
+	bool mail_debug;
+	bool mail_full_filesystem_access;
+	bool mail_max_keyword_length;
+	bool mail_save_crlf;
+	bool mail_read_mmaped;
+	bool mmap_disable;
+	bool mmap_no_write;
 	const char *lock_method;
-	int maildir_stat_dirs;
-	int maildir_copy_with_hardlinks;
+	bool maildir_stat_dirs;
+	bool maildir_copy_with_hardlinks;
 	const char *mbox_read_locks;
 	const char *mbox_write_locks;
 	unsigned int mbox_lock_timeout;
 	unsigned int mbox_dotlock_change_timeout;
-	int mbox_dirty_syncs;
-	int mbox_very_dirty_syncs;
-	int mbox_lazy_writes;
+	bool mbox_dirty_syncs;
+	bool mbox_very_dirty_syncs;
+	bool mbox_lazy_writes;
 	unsigned int dbox_rotate_size;
 	unsigned int dbox_rotate_min_size;
 	unsigned int dbox_rotate_days;
 	unsigned int umask;
-	int mail_drop_priv_before_exec;
+	bool mail_drop_priv_before_exec;
 
 	const char *mail_executable;
 	unsigned int mail_process_size;
-	int mail_use_modules;
+	bool mail_use_modules;
 	const char *mail_modules;
 	const char *mail_log_prefix;
 
@@ -103,9 +103,9 @@
 	const char *imap_client_workarounds;
 
 	/* pop3 */
-	int pop3_no_flag_updates;
-	int pop3_enable_last;
-	int pop3_reuse_xuidl;
+	bool pop3_no_flag_updates;
+	bool pop3_enable_last;
+	bool pop3_reuse_xuidl;
 	const char *pop3_uidl_format;
 	const char *pop3_client_workarounds;
 	const char *pop3_logout_format;
@@ -140,7 +140,7 @@
 
 	const char *driver;
 	const char *args;
-	int deny;
+	bool deny;
 };
 
 struct auth_userdb_settings {
@@ -169,9 +169,9 @@
 	const char *anonymous_username;
 	const char *krb5_keytab;
 
-	int verbose, debug;
-	int ssl_require_client_cert;
-	int ssl_username_from_cert;
+	bool verbose, debug;
+	bool ssl_require_client_cert;
+	bool ssl_username_from_cert;
 
 	unsigned int count;
 	unsigned int worker_max_count;
@@ -194,8 +194,8 @@
 	const char *prefix;
 	const char *location;
 
-	int inbox;
-	int hidden;
+	bool inbox;
+	bool hidden;
 };
 
 struct server_settings {
@@ -214,7 +214,7 @@
 
 extern struct server_settings *settings_root;
 
-int master_settings_read(const char *path, int nochecks);
+bool master_settings_read(const char *path, bool nochecks);
 
 void master_settings_init(void);
 void master_settings_deinit(void);

Index: ssl-init.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/master/ssl-init.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- ssl-init.c	12 Jul 2003 23:43:16 -0000	1.12
+++ ssl-init.c	13 Jan 2006 20:26:40 -0000	1.13
@@ -13,7 +13,7 @@
 #include <sys/stat.h>
 
 static struct timeout *to;
-static int generating;
+static bool generating;
 
 static void generate_parameters_file(const char *fname)
 {
@@ -64,7 +64,7 @@
 	generating = FALSE;
 }
 
-static int check_parameters_file_set(struct settings *set)
+static bool check_parameters_file_set(struct settings *set)
 {
 	struct stat st;
 	time_t regen_time;

Index: syslog-util.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/master/syslog-util.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- syslog-util.c	10 Dec 2005 22:23:43 -0000	1.2
+++ syslog-util.c	13 Jan 2006 20:26:40 -0000	1.3
@@ -51,7 +51,7 @@
 	{ NULL, 0 }
 };
 
-int syslog_facility_find(const char *name, int *facility_r)
+bool syslog_facility_find(const char *name, int *facility_r)
 {
 	int i;
 

Index: syslog-util.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/master/syslog-util.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- syslog-util.h	2 Dec 2005 22:15:22 -0000	1.1
+++ syslog-util.h	13 Jan 2006 20:26:40 -0000	1.2
@@ -9,6 +9,6 @@
 extern struct syslog_facility_list syslog_facilities[];
 
 /* Returns TRUE if found. */
-int syslog_facility_find(const char *name, int *facility_r);
+bool syslog_facility_find(const char *name, int *facility_r);
 
 #endif



More information about the dovecot-cvs mailing list