diff --git a/archiver/ChangeLog b/archiver/ChangeLog index d46c936ce..4eed35990 100644 --- a/archiver/ChangeLog +++ b/archiver/ChangeLog @@ -5,6 +5,7 @@ (dump_log): Set first_old to the beginning of the list after the dump (do_load): Don't call do_unload (socket_data_cb): Check for hang up first + (do_load): Don't call reset_filenames * archive.c, Makefile.am: Replace all instances of ximian-config with ximian-setup-tools diff --git a/archiver/config-log.c b/archiver/config-log.c index 7b21c17b0..5bbca935d 100644 --- a/archiver/config-log.c +++ b/archiver/config-log.c @@ -331,6 +331,7 @@ config_log_open (Location *location) "location", location, NULL); + config_log_reset_filenames (CONFIG_LOG (object)); do_load (CONFIG_LOG (object)); connect_socket (CONFIG_LOG (object)); @@ -635,6 +636,7 @@ config_log_reload (ConfigLog *config_log) g_return_if_fail (IS_CONFIG_LOG (config_log)); do_unload (config_log, FALSE); + config_log_reset_filenames (config_log); do_load (config_log); } @@ -891,17 +893,13 @@ do_load (ConfigLog *config_log) g_return_val_if_fail (config_log->p->location != NULL, FALSE); g_return_val_if_fail (IS_LOCATION (config_log->p->location), FALSE); - config_log_reset_filenames (config_log); - fd = open (config_log->p->filename, O_RDONLY); if (fd != -1) config_log->p->file_buffer = io_buffer_new (g_io_channel_unix_new (fd), FALSE); - else { - g_warning ("Could not open config log: %s", g_strerror (errno)); + else config_log->p->file_buffer = NULL; - } return TRUE; } diff --git a/archiver/location.c b/archiver/location.c index 74e6889f6..b9e08af2e 100644 --- a/archiver/location.c +++ b/archiver/location.c @@ -525,6 +525,13 @@ location_store (Location *location, gchar *backend_id, FILE *input, if (doc_str->len > 0) { doc = xmlParseDoc (doc_str->str); + + if (doc == NULL) { + g_warning ("Could not parse XML"); + g_string_free (doc_str, TRUE); + return; + } + location_store_xml (location, backend_id, doc, store_type); xmlFreeDoc (doc); } else { @@ -562,6 +569,7 @@ location_store_xml (Location *location, gchar *backend_id, xmlDocPtr xml_doc, g_return_if_fail (IS_LOCATION (location)); g_return_if_fail (location->p->config_log != NULL); g_return_if_fail (IS_CONFIG_LOG (location->p->config_log)); + g_return_if_fail (xml_doc != NULL); contain_type = location_contains (location, backend_id);