[Commits] [SCM] claws branch, master, updated. 3.14.1-10-g4006b12
ticho at claws-mail.org
ticho at claws-mail.org
Sat Nov 12 20:05:00 CET 2016
The branch, master has been updated
via 4006b1258c8ce86e0d16a54de9be82ac50fe9e48 (commit)
from da539d8dcc781cde1cec718db4c1115a41642509 (commit)
Summary of changes:
src/common/session.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit 4006b1258c8ce86e0d16a54de9be82ac50fe9e48
Author: Andrej Kacian <ticho at claws-mail.org>
Date: Sat Nov 12 20:03:59 2016 +0100
Allow sending empty messages in Session (just \r\n).
diff --git a/src/common/session.c b/src/common/session.c
index 5e38f55..0e4a62d 100644
--- a/src/common/session.c
+++ b/src/common/session.c
@@ -412,10 +412,9 @@ gint session_send_msg(Session *session, const gchar *msg)
cm_return_val_if_fail(session->write_buf == NULL, -1);
cm_return_val_if_fail(msg != NULL, -1);
- cm_return_val_if_fail(msg[0] != '\0', -1);
session->state = SESSION_SEND;
- session->write_buf = g_strconcat(msg, "\r\n", NULL);
+ session->write_buf = g_strconcat((strlen(msg) > 0 ? msg : ""), "\r\n", NULL);
session->write_buf_p = session->write_buf;
session->write_buf_len = strlen(msg) + 2;
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list