[maemo-commits] [maemo-commits] r16281 - in projects/haf/trunk/sapwood: . engine tests

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Mon Sep 29 19:19:53 EEST 2008
Author: herzi
Date: 2008-09-29 19:19:45 +0300 (Mon, 29 Sep 2008)
New Revision: 16281

Modified:
   projects/haf/trunk/sapwood/ChangeLog
   projects/haf/trunk/sapwood/engine/sapwood-client.c
   projects/haf/trunk/sapwood/engine/sapwood-client.h
   projects/haf/trunk/sapwood/engine/sapwood-pixmap.c
   projects/haf/trunk/sapwood/tests/double-free.c
Log:
2008-09-29  Sven Herzberg  <sven at imendio.com>

	Renamed the error quark to match the file and library name

	* engine/sapwood-client.c,
	* engine/sapwood-client.h,
	* engine/sapwood-pixmap.c,
	* tests/double-free.c: renamed the quark


Modified: projects/haf/trunk/sapwood/ChangeLog
===================================================================
--- projects/haf/trunk/sapwood/ChangeLog	2008-09-29 16:19:32 UTC (rev 16280)
+++ projects/haf/trunk/sapwood/ChangeLog	2008-09-29 16:19:45 UTC (rev 16281)
@@ -1,5 +1,14 @@
 2008-09-29  Sven Herzberg  <sven at imendio.com>
 
+	Renamed the error quark to match the file and library name
+
+	* engine/sapwood-client.c,
+	* engine/sapwood-client.h,
+	* engine/sapwood-pixmap.c,
+	* tests/double-free.c: renamed the quark
+
+2008-09-29  Sven Herzberg  <sven at imendio.com>
+
 	Moved the error quark into libsapwood-client.la
 
 	* engine/sapwood-client.c (sapwood_pixmap_error_get_quark),

Modified: projects/haf/trunk/sapwood/engine/sapwood-client.c
===================================================================
--- projects/haf/trunk/sapwood/engine/sapwood-client.c	2008-09-29 16:19:32 UTC (rev 16280)
+++ projects/haf/trunk/sapwood/engine/sapwood-client.c	2008-09-29 16:19:45 UTC (rev 16281)
@@ -24,11 +24,11 @@
 #include "sapwood-client.h"
 
 GQuark
-sapwood_pixmap_error_get_quark (void)
+sapwood_client_get_error_quark (void)
 {
   static GQuark q = 0;
   if (!q)
-    q = g_quark_from_static_string ("sapwood-pixmap-error-quark");
+    q = g_quark_from_static_string ("sapwood-client-error-quark");
   return q;
 }
 

Modified: projects/haf/trunk/sapwood/engine/sapwood-client.h
===================================================================
--- projects/haf/trunk/sapwood/engine/sapwood-client.h	2008-09-29 16:19:32 UTC (rev 16280)
+++ projects/haf/trunk/sapwood/engine/sapwood-client.h	2008-09-29 16:19:45 UTC (rev 16281)
@@ -28,9 +28,9 @@
 
 G_BEGIN_DECLS
 
-#define SAPWOOD_PIXMAP_ERROR  (sapwood_pixmap_error_get_quark ())
+#define SAPWOOD_CLIENT_ERROR  (sapwood_client_get_error_quark ())
 
-G_GNUC_INTERNAL GQuark sapwood_pixmap_error_get_quark (void);
+G_GNUC_INTERNAL GQuark sapwood_client_get_error_quark (void);
 
 G_END_DECLS
 

Modified: projects/haf/trunk/sapwood/engine/sapwood-pixmap.c
===================================================================
--- projects/haf/trunk/sapwood/engine/sapwood-pixmap.c	2008-09-29 16:19:32 UTC (rev 16280)
+++ projects/haf/trunk/sapwood/engine/sapwood-pixmap.c	2008-09-29 16:19:45 UTC (rev 16281)
@@ -41,7 +41,7 @@
   fd = socket (PF_LOCAL, SOCK_STREAM, 0);
   if (fd < 0)
     {
-      g_set_error (err, SAPWOOD_PIXMAP_ERROR, SAPWOOD_PIXMAP_ERROR_FAILED,
+      g_set_error (err, SAPWOOD_CLIENT_ERROR, SAPWOOD_PIXMAP_ERROR_FAILED,
 		   "socket: %s", strerror (errno));
       return -1;
     }
@@ -57,7 +57,7 @@
 #endif
   if (connect (fd, (struct sockaddr *)&sun, sizeof (sun)) < 0)
     {
-      g_set_error (err, SAPWOOD_PIXMAP_ERROR, SAPWOOD_PIXMAP_ERROR_FAILED,
+      g_set_error (err, SAPWOOD_CLIENT_ERROR, SAPWOOD_PIXMAP_ERROR_FAILED,
 		   "Failed to connect to sapwood server using `%s': %s\n\n"
 		   "\t`%s' MUST be started before applications",
 		   sock_path, strerror (errno),
@@ -89,14 +89,14 @@
   n = write (fd, req, reqlen);
   if (n < 0)
     {
-      g_set_error (err, SAPWOOD_PIXMAP_ERROR, SAPWOOD_PIXMAP_ERROR_FAILED,
+      g_set_error (err, SAPWOOD_CLIENT_ERROR, SAPWOOD_PIXMAP_ERROR_FAILED,
 		   "write: %s", g_strerror (errno));
       return FALSE;
     }
   else if (n != reqlen)
     {
       /* FIXME */
-      g_set_error (err, SAPWOOD_PIXMAP_ERROR, SAPWOOD_PIXMAP_ERROR_FAILED,
+      g_set_error (err, SAPWOOD_CLIENT_ERROR, SAPWOOD_PIXMAP_ERROR_FAILED,
 		   "wrote %d of %d bytes", n, reqlen);
       return FALSE;
     }
@@ -107,14 +107,14 @@
   n = read (fd, rep, replen);
   if (n < 0)
     {
-      g_set_error (err, SAPWOOD_PIXMAP_ERROR, SAPWOOD_PIXMAP_ERROR_FAILED,
+      g_set_error (err, SAPWOOD_CLIENT_ERROR, SAPWOOD_PIXMAP_ERROR_FAILED,
 		   "read: %s", g_strerror (errno));
       return FALSE;
     }
   else if (n != replen)
     {
       /* FIXME */
-      g_set_error (err, SAPWOOD_PIXMAP_ERROR, SAPWOOD_PIXMAP_ERROR_FAILED,
+      g_set_error (err, SAPWOOD_CLIENT_ERROR, SAPWOOD_PIXMAP_ERROR_FAILED,
 		   "read %d, expected %d bytes", n, replen);
       return FALSE;
     }
@@ -141,7 +141,7 @@
   flen = g_strlcpy (req->filename, filename, PATH_MAX);
   if (flen > PATH_MAX)
     {
-      g_set_error (err, SAPWOOD_PIXMAP_ERROR, SAPWOOD_PIXMAP_ERROR_FAILED,
+      g_set_error (err, SAPWOOD_CLIENT_ERROR, SAPWOOD_PIXMAP_ERROR_FAILED,
 		   "%s: filename too long", filename);
       return NULL;
     }

Modified: projects/haf/trunk/sapwood/tests/double-free.c
===================================================================
--- projects/haf/trunk/sapwood/tests/double-free.c	2008-09-29 16:19:32 UTC (rev 16280)
+++ projects/haf/trunk/sapwood/tests/double-free.c	2008-09-29 16:19:45 UTC (rev 16281)
@@ -50,7 +50,7 @@
   fd = socket (PF_LOCAL, SOCK_STREAM, 0);
   if (fd < 0)
     {
-      g_set_error (err, SAPWOOD_PIXMAP_ERROR, SAPWOOD_PIXMAP_ERROR_FAILED,
+      g_set_error (err, SAPWOOD_CLIENT_ERROR, SAPWOOD_PIXMAP_ERROR_FAILED,
 		   "socket: %s", strerror (errno));
       return -1;
     }
@@ -66,7 +66,7 @@
 #endif
   if (connect (fd, (struct sockaddr *)&sun, sizeof (sun)) < 0)
     {
-      g_set_error (err, SAPWOOD_PIXMAP_ERROR, SAPWOOD_PIXMAP_ERROR_FAILED,
+      g_set_error (err, SAPWOOD_CLIENT_ERROR, SAPWOOD_PIXMAP_ERROR_FAILED,
 		   "Failed to connect to sapwood server using `%s': %s\n\n"
 		   "\t`%s' MUST be started before applications",
 		   sock_path, strerror (errno),
@@ -98,14 +98,14 @@
   n = write (fd, req, reqlen);
   if (n < 0)
     {
-      g_set_error (err, SAPWOOD_PIXMAP_ERROR, SAPWOOD_PIXMAP_ERROR_FAILED,
+      g_set_error (err, SAPWOOD_CLIENT_ERROR, SAPWOOD_PIXMAP_ERROR_FAILED,
 		   "write: %s", g_strerror (errno));
       return FALSE;
     }
   else if (n != reqlen)
     {
       /* FIXME */
-      g_set_error (err, SAPWOOD_PIXMAP_ERROR, SAPWOOD_PIXMAP_ERROR_FAILED,
+      g_set_error (err, SAPWOOD_CLIENT_ERROR, SAPWOOD_PIXMAP_ERROR_FAILED,
 		   "wrote %d of %d bytes", n, reqlen);
       return FALSE;
     }
@@ -116,21 +116,21 @@
   n = read (fd, rep, replen);
   if (n < 0)
     {
-      g_set_error (err, SAPWOOD_PIXMAP_ERROR, SAPWOOD_PIXMAP_ERROR_FAILED,
+      g_set_error (err, SAPWOOD_CLIENT_ERROR, SAPWOOD_PIXMAP_ERROR_FAILED,
 		   "read: %s", g_strerror (errno));
       return FALSE;
     }
   else if (n != replen)
     {
       /* FIXME */
-      g_set_error (err, SAPWOOD_PIXMAP_ERROR, SAPWOOD_PIXMAP_ERROR_FAILED,
+      g_set_error (err, SAPWOOD_CLIENT_ERROR, SAPWOOD_PIXMAP_ERROR_FAILED,
 		   "read %d, expected %d bytes", n, replen);
       return FALSE;
     }
   else if (n != replen)
     {
       /* FIXME */
-      g_set_error (err, SAPWOOD_PIXMAP_ERROR, SAPWOOD_PIXMAP_ERROR_FAILED,
+      g_set_error (err, SAPWOOD_CLIENT_ERROR, SAPWOOD_PIXMAP_ERROR_FAILED,
 		   "read %d, expected %d bytes", n, replen);
       return FALSE;
     }
@@ -156,7 +156,7 @@
   flen = g_strlcpy (req->filename, filename, PATH_MAX);
   if (flen > PATH_MAX)
     {
-      g_set_error (err, SAPWOOD_PIXMAP_ERROR, SAPWOOD_PIXMAP_ERROR_FAILED,
+      g_set_error (err, SAPWOOD_CLIENT_ERROR, SAPWOOD_PIXMAP_ERROR_FAILED,
 		   "%s: filename too long", filename);
       return NULL;
     }


More information about the maemo-commits mailing list