summaryrefslogtreecommitdiff
path: root/response.c
diff options
context:
space:
mode:
authorroot <root@fedora-arm.domain.avtechpulse.com>2012-08-01 10:56:49 -0400
committerroot <root@fedora-arm.domain.avtechpulse.com>2012-08-01 10:56:49 -0400
commitef779d4e445b7c92fceb61cce35730720407d46e (patch)
tree7110b125a4124cd287bcd8882c286929041d999a /response.c
parent34d2cb9de274e9b65709250c80ff25d3d8635099 (diff)
strip off whitespace from the input, in the response generator
Diffstat (limited to 'response.c')
-rw-r--r--response.c5
1 files changed, 4 insertions, 1 deletions
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);