[2916] in BarnOwl Developers

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

[PATCH 1/2] Correctly quote reply messages in owl_zephyr_zaway

daemon@ATHENA.MIT.EDU (David Benjamin)
Sun Feb 20 17:38:24 2011

From: David Benjamin <davidben@MIT.EDU>
To: barnowl-dev@mit.edu
Date: Sun, 20 Feb 2011 17:36:02 -0500

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.
---
 zephyr.c |    4 ++--
 1 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)
 
   myuser=short_zuser(to);
   if (!strcasecmp(owl_message_get_instance(m), "personal")) {
-    tmpbuff = g_strdup_printf("zwrite %s", myuser);
+    tmpbuff = owl_string_build_quoted("zwrite %q", myuser);
   } else {
-    tmpbuff = g_strdup_printf("zwrite -i %s %s", owl_message_get_instance(m), myuser);
+    tmpbuff = owl_string_build_quoted("zwrite -i %q %q", owl_message_get_instance(m), myuser);
   }
   g_free(myuser);
   g_free(to);
-- 
1.7.3.3.399.g06ddf


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