[dovecot-cvs] dovecot: Constify struct mech_module.

dovecot at dovecot.org dovecot at dovecot.org
Tue May 22 15:34:26 EEST 2007


details:   http://hg.dovecot.org/dovecot/rev/8591bc9961d9
changeset: 5640:8591bc9961d9
user:      Andrey Panin <pazke at donpac.ru>
date:      Tue May 22 09:47:45 2007 +0400
description:
Constify struct mech_module.

diffstat:

6 files changed, 8 insertions(+), 8 deletions(-)
src/auth/mech-anonymous.c  |    2 +-
src/auth/mech-cram-md5.c   |    2 +-
src/auth/mech-digest-md5.c |    2 +-
src/auth/mech-plain.c      |    2 +-
src/auth/mech.c            |    4 ++--
src/auth/mech.h            |    4 ++--

diffs (83 lines):

diff -r e1b3043c0d90 -r 8591bc9961d9 src/auth/mech-anonymous.c
--- a/src/auth/mech-anonymous.c	Tue May 22 03:58:32 2007 +0300
+++ b/src/auth/mech-anonymous.c	Tue May 22 09:47:45 2007 +0400
@@ -34,7 +34,7 @@ static struct auth_request *mech_anonymo
 	return request;
 }
 
-struct mech_module mech_anonymous = {
+const struct mech_module mech_anonymous = {
 	"ANONYMOUS",
 
 	MEMBER(flags) MECH_SEC_ANONYMOUS,
diff -r e1b3043c0d90 -r 8591bc9961d9 src/auth/mech-cram-md5.c
--- a/src/auth/mech-cram-md5.c	Tue May 22 03:58:32 2007 +0300
+++ b/src/auth/mech-cram-md5.c	Tue May 22 09:47:45 2007 +0400
@@ -175,7 +175,7 @@ static struct auth_request *mech_cram_md
 	return &request->auth_request;
 }
 
-struct mech_module mech_cram_md5 = {
+const struct mech_module mech_cram_md5 = {
 	"CRAM-MD5",
 
 	MEMBER(flags) MECH_SEC_DICTIONARY | MECH_SEC_ACTIVE,
diff -r e1b3043c0d90 -r 8591bc9961d9 src/auth/mech-digest-md5.c
--- a/src/auth/mech-digest-md5.c	Tue May 22 03:58:32 2007 +0300
+++ b/src/auth/mech-digest-md5.c	Tue May 22 09:47:45 2007 +0400
@@ -601,7 +601,7 @@ static struct auth_request *mech_digest_
 	return &request->auth_request;
 }
 
-struct mech_module mech_digest_md5 = {
+const struct mech_module mech_digest_md5 = {
 	"DIGEST-MD5",
 
 	MEMBER(flags) MECH_SEC_DICTIONARY | MECH_SEC_ACTIVE |
diff -r e1b3043c0d90 -r 8591bc9961d9 src/auth/mech-plain.c
--- a/src/auth/mech-plain.c	Tue May 22 03:58:32 2007 +0300
+++ b/src/auth/mech-plain.c	Tue May 22 09:47:45 2007 +0400
@@ -90,7 +90,7 @@ static struct auth_request *mech_plain_a
 	return request;
 }
 
-struct mech_module mech_plain = {
+const struct mech_module mech_plain = {
 	"PLAIN",
 
 	MEMBER(flags) MECH_SEC_PLAINTEXT,
diff -r e1b3043c0d90 -r 8591bc9961d9 src/auth/mech.c
--- a/src/auth/mech.c	Tue May 22 03:58:32 2007 +0300
+++ b/src/auth/mech.c	Tue May 22 09:47:45 2007 +0400
@@ -10,7 +10,7 @@
 
 static struct mech_module_list *mech_modules;
 
-void mech_register_module(struct mech_module *module)
+void mech_register_module(const struct mech_module *module)
 {
 	struct mech_module_list *list;
 
@@ -21,7 +21,7 @@ void mech_register_module(struct mech_mo
 	mech_modules = list;
 }
 
-void mech_unregister_module(struct mech_module *module)
+void mech_unregister_module(const struct mech_module *module)
 {
 	struct mech_module_list **pos, *list;
 
diff -r e1b3043c0d90 -r 8591bc9961d9 src/auth/mech.h
--- a/src/auth/mech.h	Tue May 22 03:58:32 2007 +0300
+++ b/src/auth/mech.h	Tue May 22 09:47:45 2007 +0400
@@ -42,8 +42,8 @@ struct mech_module_list {
 	struct mech_module module;
 };
 
-void mech_register_module(struct mech_module *module);
-void mech_unregister_module(struct mech_module *module);
+void mech_register_module(const struct mech_module *module);
+void mech_unregister_module(const struct mech_module *module);
 struct mech_module *mech_module_find(const char *name);
 
 void mech_generic_auth_initial(struct auth_request *request,


More information about the dovecot-cvs mailing list