File 0001-syslog-the-submit-URL-as-well.patch of Package kerneloops

From b83a592acb42220474d81a5d68e30f95edc43efb Mon Sep 17 00:00:00 2001
From: Arjan van de Ven <arjan@linux.intel.com>
Date: Mon, 15 Sep 2008 12:03:34 -0700
Subject: [PATCH] syslog the submit URL as well

---
 kerneloops-applet.c |    7 ++++---
 kerneloops.c        |    4 +++-
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/kerneloops-applet.c b/kerneloops-applet.c
index 6acefc5..3f07f6c 100644
--- a/kerneloops-applet.c
+++ b/kerneloops-applet.c
@@ -280,7 +280,7 @@ char url_to_oops[4095];
 static void sent_an_oops(void)
 {
 	char *summary = _("Kernel bug diagnostic information sent");
-	char message[8200];
+	char *message = NULL;
 	char *message_1 =
 		_("Diagnostic information from your Linux kernel has been "
 		  "sent to <a href=\"http://www.kerneloops.org\">www.kerneloops.org</a> "
@@ -299,9 +299,9 @@ static void sent_an_oops(void)
 
 
 	if (strlen(url_to_oops)==0)
-		sprintf(message, message_1);
+		message = g_strdup_printf("%s", message_1);
 	else
-		sprintf(message, message_2, url_to_oops);
+		message = g_strdup_printf(message_2, url_to_oops);
 
 
 	url_to_oops[0] = 0;
@@ -323,6 +323,7 @@ static void sent_an_oops(void)
 						callback, "never", NULL);
 
 	notify_notification_show(notify, NULL);
+	g_free(message);
 }
 
 /*
diff --git a/kerneloops.c b/kerneloops.c
index 5697ee9..0efbd40 100644
--- a/kerneloops.c
+++ b/kerneloops.c
@@ -27,6 +27,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <sched.h>
+#include <syslog.h>
 #include <sys/prctl.h>
 #include <asm/unistd.h>
 
@@ -118,6 +119,7 @@ void dbus_say_thanks(char *url)
 		dbus_message_append_args (message, DBUS_TYPE_STRING, &url, DBUS_TYPE_INVALID);
 		dbus_connection_send(bus, message, NULL);
 		dbus_message_unref(message);
+		syslog(LOG_WARNING, "kerneloops.org: oops is posted as %s", url);
 	}
 
 	message = dbus_message_new_signal("/org/kerneloops/submit/sent",
@@ -135,7 +137,7 @@ int main(int argc, char**argv)
 /*
  * Signal the kernel that we're not timing critical
  */
-#ifdef PR_SET_TIMERSLACK,1000
+#ifdef PR_SET_TIMERSLACK
 	prctl(PR_SET_TIMERSLACK,1000*1000*1000, 0, 0, 0);
 #endif
 
-- 
1.5.6