From ef779d4e445b7c92fceb61cce35730720407d46e Mon Sep 17 00:00:00 2001 From: root Date: Wed, 1 Aug 2012 10:56:49 -0400 Subject: strip off whitespace from the input, in the response generator --- response.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'response.c') diff --git a/response.c b/response.c index 11cd504..6eb748e 100644 --- a/response.c +++ b/response.c @@ -106,8 +106,11 @@ void responseCb(gpointer instance, GObject *arg1, gpointer user_data) gssize len = data->size; gssize written = 0; - gchar* upper = g_ascii_strup(str, len); + // remove leading and trailing whitespace + g_strstrip (str); + // dummy response function + gchar* upper = g_ascii_strup(str, len); gchar *out_string = g_strdup_printf("%s\n%s\n%s\n",upper,upper,upper); gssize out_len = strlen (out_string); -- cgit