dovecot-2.2: auth: Code cleanup - removed auth_stream_split()
dovecot at dovecot.org
dovecot at dovecot.org
Wed Jan 30 18:12:30 EET 2013
details: http://hg.dovecot.org/dovecot-2.2/rev/0897fc01fb93
changeset: 15679:0897fc01fb93
user: Timo Sirainen <tss at iki.fi>
date: Wed Jan 30 18:12:23 2013 +0200
description:
auth: Code cleanup - removed auth_stream_split()
diffstat:
src/auth/auth-request.c | 9 ++-------
src/auth/auth-stream.c | 5 -----
src/auth/auth-stream.h | 1 -
3 files changed, 2 insertions(+), 13 deletions(-)
diffs (50 lines):
diff -r 449c56aabbb6 -r 0897fc01fb93 src/auth/auth-request.c
--- a/src/auth/auth-request.c Tue Jan 29 13:31:05 2013 +0200
+++ b/src/auth/auth-request.c Wed Jan 30 18:12:23 2013 +0200
@@ -1454,18 +1454,13 @@
static bool auth_request_proxy_is_self(struct auth_request *request)
{
- const char *const *tmp, *port = NULL;
+ const char *port = NULL;
if (!request->proxy_host_is_self)
return FALSE;
/* check if the port is the same */
- tmp = auth_stream_split(request->extra_fields);
- for (; *tmp != NULL; tmp++) {
- if (strncmp(*tmp, "port=", 5) == 0)
- port = *tmp + 5;
- }
-
+ port = auth_stream_reply_find(request->extra_fields, "port");
if (port != NULL && !str_uint_equals(port, request->local_port))
return FALSE;
/* don't check destuser. in some systems destuser is intentionally
diff -r 449c56aabbb6 -r 0897fc01fb93 src/auth/auth-stream.c
--- a/src/auth/auth-stream.c Tue Jan 29 13:31:05 2013 +0200
+++ b/src/auth/auth-stream.c Wed Jan 30 18:12:23 2013 +0200
@@ -138,11 +138,6 @@
return reply == NULL || str_len(reply->str) == 0;
}
-const char *const *auth_stream_split(struct auth_stream_reply *reply)
-{
- return t_strsplit_tab(str_c(reply->str));
-}
-
string_t *auth_stream_reply_get_str(struct auth_stream_reply *reply)
{
return reply->str;
diff -r 449c56aabbb6 -r 0897fc01fb93 src/auth/auth-stream.h
--- a/src/auth/auth-stream.h Tue Jan 29 13:31:05 2013 +0200
+++ b/src/auth/auth-stream.h Wed Jan 30 18:12:23 2013 +0200
@@ -17,7 +17,6 @@
const char *auth_stream_reply_export(struct auth_stream_reply *reply);
bool auth_stream_is_empty(struct auth_stream_reply *reply);
-const char *const *auth_stream_split(struct auth_stream_reply *reply);
string_t *auth_stream_reply_get_str(struct auth_stream_reply *reply);
#endif
More information about the dovecot-cvs
mailing list