dovecot-2.1: auth: auth_stream_reply_remove() left extra TABs to...
dovecot at dovecot.org
dovecot at dovecot.org
Sat Feb 25 04:38:40 EET 2012
details: http://hg.dovecot.org/dovecot-2.1/rev/970809a9f9bd
changeset: 14189:970809a9f9bd
user: Timo Sirainen <tss at iki.fi>
date: Sat Feb 25 04:38:01 2012 +0200
description:
auth: auth_stream_reply_remove() left extra TABs to stream.
Normally this wouldn't really affect anything, except log some extra debug
messages.
diffstat:
src/auth/auth-stream.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diffs (26 lines):
diff -r c3da6b3a4a34 -r 970809a9f9bd src/auth/auth-stream.c
--- a/src/auth/auth-stream.c Thu Feb 23 15:26:52 2012 +0200
+++ b/src/auth/auth-stream.c Sat Feb 25 04:38:01 2012 +0200
@@ -76,15 +76,16 @@
if (!auth_stream_reply_find_area(reply, key, &idx, &len))
return;
- if (str_len(reply->str) < idx + len) {
- /* remove also trailing tab */
- len++;
- } else if (str_len(reply->str) == idx + len && idx > 0) {
- /* removing last item, remove preceding tab */
+ if (idx == 0 && str_len(reply->str) == len) {
+ /* removing the only item */
+ } else if (str_len(reply->str) == idx + len) {
+ /* removing the last item -> remove the preceding tab */
len++;
idx--;
+ } else {
+ /* remove the trailing tab */
+ len++;
}
-
str_delete(reply->str, idx, len);
}
More information about the dovecot-cvs
mailing list