diff options
| author | Wilmer van der Gaast <wilmer@gaast.net> | 2014-01-20 22:00:53 +0000 | 
|---|---|---|
| committer | Wilmer van der Gaast <wilmer@gaast.net> | 2014-01-20 22:00:53 +0000 | 
| commit | cc17b764196c160e665574ce5bd1bc6e6daf95ee (patch) | |
| tree | 9f04da7a0c77e66a66412a227675317dd4e759f5 | |
| parent | 4dda9e48dfc7a577a5e831e3e5055b578201d114 (diff) | |
Merging fix from Flexo for #1109.
| -rw-r--r-- | otr.c | 15 | 
1 files changed, 11 insertions, 4 deletions
| @@ -453,19 +453,26 @@ char *otr_filter_msg_out(irc_user_t *iu, char *msg, int flags)  	st = otrl_message_sending(irc->otr->us, &otr_ops, ic,  		ic->acc->user, ic->acc->prpl->name, iu->bu->handle, instag, -		emsg, NULL, &otrmsg, OTRL_FRAGMENT_SEND_ALL, &ctx, NULL, NULL); +		emsg, NULL, &otrmsg, OTRL_FRAGMENT_SEND_SKIP, &ctx, NULL, NULL);  	/* in libotr 4.0.0 with OTRL_FRAGMENT_SEND_ALL, otrmsg must be passed  	 * but the value it gets carries no meaning. it can be set even though -	 * the message has been injected. */ +	 * the message has been injected. +	 * With OTRL_FRAGMENT_SEND_SKIP, libotr doesn't handle the sending, it's +	 * up to us. +	 */  	if(emsg != msg) {  		g_free(emsg);   /* we're done with this one */ +		emsg = NULL;  	}  	if(st) { -		/* TODO: Error reporting? */ +		irc_rootmsg(irc, "Error encrypting text for OTR: %d", st);  	} -	return NULL; +	if (otrmsg != NULL) { +		return otrmsg; +	} +	return emsg;  }  static const struct irc_plugin otr_plugin = | 
