[libgda] Fix for bug #603743



commit 449780910651ee2f551ed795880bafda62ee582f
Author: Vivien Malerba <malerba gnome-db org>
Date:   Mon Dec 7 22:02:12 2009 +0100

    Fix for bug #603743
    
    applied proposed patch

 libgda/gda-data-model-dir.c |    4 ++++
 tools/web-server.c          |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/libgda/gda-data-model-dir.c b/libgda/gda-data-model-dir.c
index 75756b4..f28ff29 100644
--- a/libgda/gda-data-model-dir.c
+++ b/libgda/gda-data-model-dir.c
@@ -1050,7 +1050,11 @@ gda_data_model_dir_set_values (GdaDataModel *model, gint row, GList *values, GEr
 											   new_filename);
 						}
 					}
+#if GLIB_CHECK_VERSION(2,22,0)
+					g_mapped_file_unref (old_file);
+#else
 					g_mapped_file_free (old_file);
+#endif
 				}
 				if (!allok) {
 					gchar *str;
diff --git a/tools/web-server.c b/tools/web-server.c
index 544fe87..fa1a2be 100644
--- a/tools/web-server.c
+++ b/tools/web-server.c
@@ -472,7 +472,11 @@ get_file (WebServer *server, SoupMessage *msg, const char *path, GError **error)
 	SoupBuffer *buffer;
 	buffer = soup_buffer_new_with_owner (g_mapped_file_get_contents (mfile),
 					     g_mapped_file_get_length (mfile),
+#if GLIB_CHECK_VERSION(2,22,0)
+					     mfile, (GDestroyNotify) g_mapped_file_unref);
+#else
 					     mfile, (GDestroyNotify) g_mapped_file_free);
+#endif
 	soup_message_body_append_buffer (msg->response_body, buffer);
 	soup_buffer_free (buffer);
 	soup_message_set_status (msg, SOUP_STATUS_OK);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]