update reporting url
author"Luc Saillard <luc@saillard.org>"
Wed Apr 16 11:01:12 2008 +0200 (4 weeks ago)
changeset 1981a626aed57b0
parent 194e233f15627e4
child 1998d4616e6acce
update reporting url
src/minidesk_startup.c
--- a/src/minidesk_startup.c Thu Oct 18 19:02:25 2007 +0200
+++ b/src/minidesk_startup.c Wed Apr 16 11:01:12 2008 +0200
@@ -179,14 +179,18 @@ send_application_stats(gpointer data)
{
GString *post_string = g_string_new(NULL);
struct application_stat *app;
- int pid;
+ int pid, bool_append = FALSE;
+
+ g_string_append_printf(post_string, "http://www.easyneuf.org/reporting/%s/expert.php?", minidesk_get_flavour());
while ((app = g_queue_pop_head(applications_queue)) != NULL)
{
char *cmdline_escaped = uri_string_escape(app->cmdline);
- if (post_string->len > 0)
+ if (bool_append)
g_string_append_c(post_string, '&');
+ else
+ bool_append = TRUE;
g_string_append_printf(post_string, "%s=%d", cmdline_escaped, app->count);
g_free(cmdline_escaped);
@@ -195,7 +199,6 @@ send_application_stats(gpointer data)
}
trace("POST: %s\n", post_string->str);
- g_string_prepend(post_string, "http://www.easyneuf.org/reporting/expert.php?");
#if 1
pid = fork();