source:
trunk/server/common/patches/389-ds-base-fix-changelog-paths.patch
@
1811
Last change on this file since 1811 was 1751, checked in by mitchb, 14 years ago | |
---|---|
File size: 2.9 KB |
-
ldap/servers/plugins/replication/cl5_api.c
diff --git a/ldap/servers/plugins/replication/cl5_api.c b/ldap/servers/plugins/replication/cl5_api.c index b7c7229..59ef8be 100644
a b int cl5DeleteDBSync (Object *replica) 657 657 file = (CL5DBFile*)object_get_data (obj); 658 658 PR_ASSERT (file); 659 659 660 PR_snprintf (fName, MAXPATHLEN, "%s /%s", s_cl5Desc.dbDir, file->name);660 PR_snprintf (fName, MAXPATHLEN, "%s", file->name); 661 661 662 662 _cl5DBDeleteFile (obj); 663 663 … … static int _cl5DBOpen () 1894 1894 slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5DBOpen: " 1895 1895 "file %s has no matching replica; removing\n", entry->name); 1896 1896 1897 PR_snprintf(fullpathname, MAXPATHLEN, "%s/%s", s_cl5Desc.dbDir, entry->name); 1897 1898 rc = s_cl5Desc.dbEnv->dbremove(s_cl5Desc.dbEnv, 1898 1899 0, fullpathname, 0, 0); 1899 1900 if (rc != 0) … … done: 5528 5529 static void _cl5DBCloseFile (void **data) 5529 5530 { 5530 5531 CL5DBFile *file; 5531 char fullpathname[MAXPATHLEN];5532 5532 5533 5533 PR_ASSERT (data); 5534 5534 … … static void _cl5DBCloseFile (void **data) 5537 5537 PR_ASSERT (file); 5538 5538 5539 5539 slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5DBCloseFile: " 5540 "Closing database %s /%s\n", s_cl5Desc.dbDir, file->name);5540 "Closing database %s\n", file->name); 5541 5541 5542 5542 /* close the file */ 5543 5543 /* if this is normal close or close after import, update entry count */ … … static void _cl5DBCloseFile (void **data) 5553 5553 if (file->db) { 5554 5554 file->db->close(file->db, 0); 5555 5555 slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5DBCloseFile: " 5556 "Closed the changelog database handle for %s /%s\n", s_cl5Desc.dbDir, file->name);5556 "Closed the changelog database handle for %s\n", file->name); 5557 5557 file->db = NULL; 5558 5558 } 5559 5559 … … static void _cl5DBCloseFile (void **data) 5562 5562 int rc = 0; 5563 5563 /* We need to use the libdb API to delete the files, otherwise we'll 5564 5564 * run into problems when we try to checkpoint transactions later. */ 5565 PR_snprintf(fullpathname, MAXPATHLEN, "%s/%s", s_cl5Desc.dbDir, file->name); 5566 rc = s_cl5Desc.dbEnv->dbremove(s_cl5Desc.dbEnv, 0, fullpathname, 0, 0); 5565 rc = s_cl5Desc.dbEnv->dbremove(s_cl5Desc.dbEnv, 0, file->name, 0, 0); 5567 5566 if (rc != 0) 5568 5567 { 5569 5568 slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5DBCloseFile: " 5570 5569 "failed to remove (%s) file; libdb error - %d (%s)\n", 5571 f ullpathname, rc, db_strerror(rc));5570 file->name, rc, db_strerror(rc)); 5572 5571 } else { 5573 5572 slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5DBCloseFile: " 5574 "Deleted the changelog database file %s /%s\n", s_cl5Desc.dbDir, file->name);5573 "Deleted the changelog database file %s\n", file->name); 5575 5574 5576 5575 } 5577 5576 }
Note: See TracBrowser
for help on using the repository browser.