tracker r3169 - in trunk: . src/libtracker-common src/tracker-extract
- From: carlosg svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r3169 - in trunk: . src/libtracker-common src/tracker-extract
- Date: Fri, 3 Apr 2009 13:27:21 +0000 (UTC)
Author: carlosg
Date: Fri Apr 3 13:27:21 2009
New Revision: 3169
URL: http://svn.gnome.org/viewvc/tracker?rev=3169&view=rev
Log:
2009-04-03 Carlos Garnacho <carlos imendio com>
* src/libtracker-common/tracker-albumart.c
(tracker_albumart_queue_cb): do not strcmp the GError message, use
error->code instead. Do not access() NULL paths.
(tracker_albumart_get_path): Improve memory management if the function
exits prematurely.
* src/tracker-extract/tracker-extract-albumart.c
(tracker_process_albumart): bail out if it couldn't get art_path.
Modified:
trunk/ChangeLog
trunk/src/libtracker-common/tracker-albumart.c
trunk/src/tracker-extract/tracker-extract-albumart.c
Modified: trunk/src/libtracker-common/tracker-albumart.c
==============================================================================
--- trunk/src/libtracker-common/tracker-albumart.c (original)
+++ trunk/src/libtracker-common/tracker-albumart.c Fri Apr 3 13:27:21 2009
@@ -546,14 +546,15 @@
G_TYPE_INVALID);
if (error) {
- if (g_strcmp0 (error->message, "The name " ALBUMARTER_SERVICE " was not provided by any .service files") == 0)
+ if (error->code == DBUS_GERROR_SERVICE_UNKNOWN)
no_more_requesting = TRUE;
else
g_warning ("%s", error->message);
g_clear_error (&error);
}
- if (g_file_test (info->art_path, G_FILE_TEST_EXISTS)) {
+ if (info->art_path &&
+ g_file_test (info->art_path, G_FILE_TEST_EXISTS)) {
gchar *uri;
uri = g_filename_to_uri (info->art_path, NULL, NULL);
@@ -585,7 +586,13 @@
/* http://live.gnome.org/MediaArtStorageSpec */
- *path = NULL;
+ if (path) {
+ *path = NULL;
+ }
+
+ if (local_uri) {
+ *local_uri = NULL;
+ }
if (!a && !b) {
return;
Modified: trunk/src/tracker-extract/tracker-extract-albumart.c
==============================================================================
--- trunk/src/tracker-extract/tracker-extract-albumart.c (original)
+++ trunk/src/tracker-extract/tracker-extract-albumart.c Fri Apr 3 13:27:21 2009
@@ -132,6 +132,13 @@
&art_path,
&local_uri);
+ if (!art_path) {
+ g_free (filename_uri);
+ g_free (local_uri);
+
+ return FALSE;
+ }
+
if (!g_file_test (art_path, G_FILE_TEST_EXISTS)) {
#ifdef HAVE_GDKPIXBUF
/* If we have embedded album art */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]