[OTR-dev] [PATCH] Do not inject empty messages
Martin Milata
b42-ml at srck.net
Wed Apr 2 11:43:22 EDT 2014
From: Martin Milata <mmilata at srck.net>
This can happen e.g. when sending a message to recipient in finished
state using the OTRL_FRAGMENT_SEND_ALL fragmentation policy.
---
src/message.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/message.c b/src/message.c
index fe6957c..ec8eeda 100644
--- a/src/message.c
+++ b/src/message.c
@@ -439,7 +439,7 @@ fragment:
return err;
} else {
/* Fragment and send according to policy */
- if (!err && messagep && *messagep) {
+ if (!err && messagep && *messagep && *messagep[0]) {
if (context) {
err = fragment_and_send(ops, opdata, context, *messagep,
fragPolicy, messagep);
--
1.9.0
More information about the OTR-dev
mailing list