source: trunk/server/common/patches/389-ds-base-fix-changelog-paths.patch @ 1751

Last change on this file since 1751 was 1751, checked in by mitchb, 13 years ago
Fix changelogdb path logic in 389-ds-base
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) 
    657657        file = (CL5DBFile*)object_get_data (obj);
    658658        PR_ASSERT (file);
    659659
    660         PR_snprintf (fName, MAXPATHLEN, "%s/%s", s_cl5Desc.dbDir, file->name);
     660        PR_snprintf (fName, MAXPATHLEN, "%s", file->name);
    661661       
    662662        _cl5DBDeleteFile (obj);
    663663
    static int _cl5DBOpen () 
    18941894                slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5DBOpen: "
    18951895                          "file %s has no matching replica; removing\n", entry->name);
    18961896
     1897                PR_snprintf(fullpathname, MAXPATHLEN, "%s/%s", s_cl5Desc.dbDir, entry->name);
    18971898                rc = s_cl5Desc.dbEnv->dbremove(s_cl5Desc.dbEnv,
    18981899                                               0, fullpathname, 0, 0);
    18991900                if (rc != 0)
    done: 
    55285529static void _cl5DBCloseFile (void **data)
    55295530{
    55305531        CL5DBFile *file;
    5531     char fullpathname[MAXPATHLEN];
    55325532                                               
    55335533        PR_ASSERT (data);
    55345534
    static void _cl5DBCloseFile (void **data) 
    55375537        PR_ASSERT (file);
    55385538
    55395539        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);
    55415541
    55425542        /* close the file */
    55435543        /* if this is normal close or close after import, update entry count */
    static void _cl5DBCloseFile (void **data) 
    55535553        if (file->db) {
    55545554            file->db->close(file->db, 0);
    55555555            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);
    55575557            file->db = NULL;
    55585558        }
    55595559
    static void _cl5DBCloseFile (void **data) 
    55625562                int rc = 0;
    55635563                /* We need to use the libdb API to delete the files, otherwise we'll
    55645564                 * 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);
    55675566                if (rc != 0)
    55685567                {
    55695568                        slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5DBCloseFile: "
    55705569                                                        "failed to remove (%s) file; libdb error - %d (%s)\n",
    5571                                                         fullpathname, rc, db_strerror(rc));
     5570                                                        file->name, rc, db_strerror(rc));
    55725571                } else {
    55735572                        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);
    55755574
    55765575        }
    55775576        }
Note: See TracBrowser for help on using the repository browser.