]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: Code cleanup - removed auth_stream_split()
authorTimo Sirainen <tss@iki.fi>
Wed, 30 Jan 2013 16:12:23 +0000 (18:12 +0200)
committerTimo Sirainen <tss@iki.fi>
Wed, 30 Jan 2013 16:12:23 +0000 (18:12 +0200)
src/auth/auth-request.c
src/auth/auth-stream.c
src/auth/auth-stream.h

index 2579e16279eee1514e7ec418885217f12876424f..42b2cd98e1c658be3f84d38bf2b07ec801c420b9 100644 (file)
@@ -1454,18 +1454,13 @@ void auth_request_set_userdb_field_values(struct auth_request *request,
 
 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
index ffffd922d6ebc55e32e3d83a833e4a4f812fd5b9..f650b477a6eab09cfe0d0d35dbbd61e50e717b48 100644 (file)
@@ -138,11 +138,6 @@ bool auth_stream_is_empty(struct auth_stream_reply *reply)
        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;
index 91362a3497d952b3069a7acadb56f152d8a0a433..23f1f4748efcd6986b6bd72532bd65224ee43402 100644 (file)
@@ -17,7 +17,6 @@ void auth_stream_reply_import(struct auth_stream_reply *reply, const char *str);
 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