View | Details | Raw Unified | Return to bug 104876 | Differences between
and this patch

Collapse All | Expand All

(-)deskutils/notification-daemon/Makefile (-2 / +1 lines)
Lines 6-13 Link Here
6
#
6
#
7
7
8
PORTNAME=	notification-daemon
8
PORTNAME=	notification-daemon
9
PORTVERSION=	0.3.5
9
PORTVERSION=	0.3.6
10
PORTREVISION=	3
11
CATEGORIES=	deskutils gnome
10
CATEGORIES=	deskutils gnome
12
MASTER_SITES=	http://www.galago-project.org/files/releases/source/notification-daemon/
11
MASTER_SITES=	http://www.galago-project.org/files/releases/source/notification-daemon/
13
12
(-)deskutils/notification-daemon/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
MD5 (notification-daemon-0.3.5.tar.gz) = 7977c4c15139f9d53ddbfa8af707270f
1
MD5 (notification-daemon-0.3.6.tar.gz) = a5a9aa63205e624da8468e35722b08bf
2
SHA256 (notification-daemon-0.3.5.tar.gz) = 83a15eb99bb7a895d52e31be1c1548789a8bc29e83d30e758cf034a6627a1184
2
SHA256 (notification-daemon-0.3.6.tar.gz) = a187976c1957a7a0e17014ed97cbb4341f6898d5f60301f1b0c37e52188ebd13
3
SIZE (notification-daemon-0.3.5.tar.gz) = 383582
3
SIZE (notification-daemon-0.3.6.tar.gz) = 402426
(-)deskutils/notification-daemon/files/patch-src-daemon.c (-60 / +9 lines)
Lines 1-62 Link Here
1
diff -Naur notification-daemon-0.3.5.orig/src/daemon.c notification-daemon-0.3.5/src/daemon.c
1
--- src/daemon.c.orig	Sun Nov  5 08:59:12 2006
2
--- src/daemon.c	2006-04-26 10:32:50.000000000 +0200
2
+++ src/daemon.c	Sun Nov  5 08:59:37 2006
3
+++ src/daemon.c	2006-06-18 05:07:47.000000000 +0200
3
@@ -1089,7 +1089,7 @@
4
@@ -399,14 +399,54 @@
4
 	dbus_conn = dbus_g_connection_get_connection(connection);
5
 	GValueArray *image_struct;
6
 	GValue *value;
7
 	GArray *tmp_array;
8
+	GType type = G_VALUE_TYPE (icon_data); 
9
+  
10
+	static const GType types[] = {
11
+	    G_TYPE_INT,
12
+	    G_TYPE_INT,
13
+	    G_TYPE_INT,
14
+	    G_TYPE_BOOLEAN,
15
+	    G_TYPE_INT,
16
+	    G_TYPE_INT
17
+	};
18
+
19
+
20
+	if (dbus_g_type_is_struct (type))
21
+	{
22
+	    int n;
23
+
24
+	    if (dbus_g_type_get_struct_size (type) < 7)
25
+	    {
26
+		g_warning("_notify_daemon_process_icon_data expected 7 data members, got only %d", dbus_g_type_get_struct_size (type)); 
27
+		return FALSE;
28
+	    }
29
+
30
+	    for (n = 0; n < G_N_ELEMENTS (types); ++n)
31
+	    {
32
+		GType check = dbus_g_type_get_struct_member_type (type, n);
33
+		if (check != types[n])
34
+		{
35
+		    g_warning("_notify_daemon_process_icon_data expected '%s' at position %d, but got '%s'",
36
+			      g_type_name (types[n]), n, g_type_name (check)); 
37
+		    return FALSE;
38
+		}
39
 
5
 
40
-	if (!G_VALUE_HOLDS(icon_data, G_TYPE_VALUE_ARRAY))
6
 	dbus_g_object_type_install_info(NOTIFY_TYPE_DAEMON,
41
+		/* We must check this separately as it's not a constant and can't be part of the types[] array */
7
-									&dbus_glib__object_info);
42
+		if (dbus_g_type_get_struct_member_type (type, 6) != DBUS_TYPE_G_UCHAR_ARRAY) 
8
+									&dbus_glib_notify_daemon_object_info);
43
+		{
44
+		    g_warning("_notify_daemon_process_icon_data expected '%s' at position %d, but got '%s'",
45
+			      g_type_name (DBUS_TYPE_G_UCHAR_ARRAY), 6, g_type_name (dbus_g_type_get_struct_member_type (type,6))); 
46
+		    return FALSE;
47
+		}
48
+	    }
49
+	}
50
+	else
51
 	{
52
-		g_warning("_notify_daemon_process_icon_data expected a "
53
-				  "GValue of type GValueArray");
54
-		return FALSE;
55
+	    g_warning("_notify_daemon_process_icon_data got wrong data"); 
56
+	    return FALSE;
57
 	}
58
 
59
+
60
 	image_struct = (GValueArray *)g_value_get_boxed(icon_data);
61
 	value = g_value_array_get_nth(image_struct, 0);
62
 
9
 
10
 	bus_proxy = dbus_g_proxy_new_for_name(connection,
11
 										  "org.freedesktop.DBus",
(-)deskutils/notification-daemon/files/patch-src-Makefile.in (+11 lines)
Added Link Here
1
--- src/Makefile.in.orig	Sun Nov  5 08:46:21 2006
2
+++ src/Makefile.in	Sun Nov  5 08:46:24 2006
3
@@ -531,7 +531,7 @@
4
 
5
 
6
 notificationdaemon-dbus-glue.h: notificationdaemon.xml
7
-	dbus-binding-tool --mode=glib-server \
8
+	dbus-binding-tool --mode=glib-server --prefix=notify_daemon \
9
 		$(srcdir)/notificationdaemon.xml > notificationdaemon-dbus-glue.h
10
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
11
 # Otherwise a system limit (for SysV at least) may be exceeded.

Return to bug 104876