[2919] in BarnOwl Developers
Re: [PATCH 1/2] Correctly quote reply messages in owl_zephyr_zaway
daemon@ATHENA.MIT.EDU (Nelson Elhage)
Tue Feb 22 23:33:37 2011
In-Reply-To: <1298241363-28928-1-git-send-email-davidben@mit.edu>
Date: Tue, 22 Feb 2011 23:33:35 -0500
From: Nelson Elhage <nelhage@nelhage.com>
To: David Benjamin <davidben@mit.edu>
Cc: barnowl-dev@mit.edu
These both lgtm.
Reviewed-by: Nelson Elhage <nelhage@mit.edu>
On Sun, Feb 20, 2011 at 5:36 PM, David Benjamin <davidben@mit.edu> wrote:
> Oh, I'll just go and send an automated away message to my good friend,
> '-c sipb'. It's not that big of a deal since we only make outgoing
> messages out of this though.
> ---
> =C2=A0zephyr.c | =C2=A0 =C2=A04 ++--
> =C2=A01 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/zephyr.c b/zephyr.c
> index 3849759..1afb716 100644
> --- a/zephyr.c
> +++ b/zephyr.c
> @@ -881,9 +881,9 @@ void owl_zephyr_zaway(const owl_message *m)
>
> =C2=A0 myuser=3Dshort_zuser(to);
> =C2=A0 if (!strcasecmp(owl_message_get_instance(m), "personal")) {
> - =C2=A0 =C2=A0tmpbuff =3D g_strdup_printf("zwrite %s", myuser);
> + =C2=A0 =C2=A0tmpbuff =3D owl_string_build_quoted("zwrite %q", myuser);
> =C2=A0 } else {
> - =C2=A0 =C2=A0tmpbuff =3D g_strdup_printf("zwrite -i %s %s", owl_message=
_get_instance(m), myuser);
> + =C2=A0 =C2=A0tmpbuff =3D owl_string_build_quoted("zwrite -i %q %q", owl=
_message_get_instance(m), myuser);
> =C2=A0 }
> =C2=A0 g_free(myuser);
> =C2=A0 g_free(to);
> --
> 1.7.3.3.399.g06ddf
>
>