[1303] in BarnOwl Developers

home help back first fref pref prev next nref lref last post

Re: [PATCH] Only use zsender when not sending personals.

daemon@ATHENA.MIT.EDU (Geoffrey Thomas)
Thu Oct 29 18:15:10 2009

Resent-From: nelhage@mit.edu
Resent-To: barnowl-dev-mtg@charon.mit.edu
X-Original-To: nelhage@lunatique.mit.edu
Date: Thu, 19 Feb 2009 21:01:32 -0500 (EST)
From: Geoffrey Thomas <geofft@MIT.EDU>
To: Chris Lesniewski-Laas <ctl@mit.edu>
cc: barnowl-dev@mit.edu
In-Reply-To: <20090220013711.GQ12357@linerva.mit.edu>

This exposes a bug that barnowl has, in that a recipient of "" is treated 
like a personal even though it's not: for instance, there's a copy of the 
outgoing message placed in the recvwin. That's not actually this code, 
though, even though the assumption is present in this code too.

Acked-by: Geoffrey Thomas <geofft@mit.edu>

-- 
Geoffrey Thomas
geofft@mit.edu

On Thu, 19 Feb 2009, Chris Lesniewski-Laas wrote:

> This is what git format-patch -1 gave me.
> I notice geofft created the original zsender patch.  I'm not sure if this
> matches his use case, but it is the mode I use.
>
> Chris
>
> ---
> zephyr.c |    7 +++----
> 1 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/zephyr.c b/zephyr.c
> index c112f56..5e1a068 100644
> --- a/zephyr.c
> +++ b/zephyr.c
> @@ -636,16 +636,15 @@ int send_zephyr(char *opcode, char *zsig, char *class, char *instance, char *rec
>   notice.z_port=0;
>   notice.z_class=class;
>   notice.z_class_inst=instance;
> +  notice.z_sender=NULL;
>   if (!strcmp(recipient, "*") || !strcmp(recipient, "@")) {
>     notice.z_recipient="";
> +    if (*owl_global_get_zsender(&g))
> +        notice.z_sender=owl_global_get_zsender(&g);
>   } else {
>     notice.z_recipient=recipient;
>   }
>   notice.z_default_format="Class $class, Instance $instance:\nTo: @bold($recipient) at $time $date\nFrom: @bold{$1 <$sender>}\n\n$2";
> -  if (*owl_global_get_zsender(&g))
> -      notice.z_sender=owl_global_get_zsender(&g);
> -  else
> -      notice.z_sender=NULL;
>   if (opcode) notice.z_opcode=opcode;
>
>   notice.z_message_len=strlen(zsig)+1+strlen(message);

home help back first fref pref prev next nref lref last post