[gyrus] Do not expect a endline char in incoming messages
- From: Claudio Saavedra <csaavedra src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gyrus] Do not expect a endline char in incoming messages
- Date: Tue, 28 Dec 2010 23:58:24 +0000 (UTC)
commit c160962f283b5d46009a970b1dd70750357fdd18
Author: Claudio Saavedra <csaavedra igalia com>
Date: Tue Dec 28 13:46:21 2010 +0200
Do not expect a endline char in incoming messages
This is stripped out in the gsocket based code. Use just \0 or \r
accordingly.
https://bugzilla.gnome.org/show_bug.cgi?id=593660
src/gyrus-admin-acl.c | 6 +++---
src/gyrus-admin.c | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/gyrus-admin-acl.c b/src/gyrus-admin-acl.c
index 0791910..35e6a44 100644
--- a/src/gyrus-admin-acl.c
+++ b/src/gyrus-admin-acl.c
@@ -162,12 +162,12 @@ gyrus_admin_acl_get (GyrusAdmin *admin, const gchar *mailbox,
}
else {
- do ++iter; while (*iter != ' ' && *iter != '\n');
+ do ++iter; while (*iter != ' ' && *iter != '\r');
if (*iter == ' ')
iter ++;
}
- if (*iter == '\n') {
+ if (*iter == '\r') {
g_free (msg);
status = gyrus_admin_listen_channel (admin, &msg, NULL);
g_free (msg);
@@ -210,7 +210,7 @@ gyrus_admin_acl_get (GyrusAdmin *admin, const gchar *mailbox,
*/
list = g_list_prepend (list, entry);
- } while (*iter2 != '\n');
+ } while (*iter2 != '\0');
/*
GList *l_iter;
diff --git a/src/gyrus-admin.c b/src/gyrus-admin.c
index 02b3862..b5cfc58 100644
--- a/src/gyrus-admin.c
+++ b/src/gyrus-admin.c
@@ -288,8 +288,8 @@ gyrus_admin_get_mailbox_from_list_message (gchar *msg)
iterator++;
iterator ++;
}
- /* to remove the "\n\0" */
- large = strlen (iterator) - 2;
+ /* to remove the "\0" */
+ large = strlen (iterator) - 1;
if (*iterator == '\"') {
iterator ++;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]