util: Remove obsolete csync_create_statedb_hash().

This commit is contained in:
Andreas Schneider 2012-10-22 14:54:23 +02:00
parent f92b8f1db7
commit 9b11339a9e
2 changed files with 0 additions and 33 deletions

View file

@ -293,32 +293,3 @@ out:
return rc;
}
/* Normalize the uri to <host>/<path> */
uint64_t csync_create_statedb_hash(CSYNC *ctx) {
char *host = NULL;
char *path = NULL;
char name[PATH_MAX] = {0};
uint64_t hash = 0;
if (c_parse_uri(ctx->remote.uri, NULL, NULL, NULL, &host, NULL, &path) < 0) {
SAFE_FREE(host);
SAFE_FREE(path);
return 0;
}
/* len + 1 for \0 */
snprintf(name, sizeof(name), "%s:%s%s", ctx->local.uri, host ? host : "", path);
CSYNC_LOG(CSYNC_LOG_PRIORITY_INFO,
"Normalized path for the statedb hash: %s", name);
hash = c_jhash64((uint8_t *) name, strlen(name), 0);
SAFE_FREE(host);
SAFE_FREE(path);
return hash;
}
/* vim: set ts=8 sw=2 et cindent: */

View file

@ -33,8 +33,4 @@ int csync_merge_file_trees(CSYNC *ctx);
int csync_unix_extensions(CSYNC *ctx);
/* Normalize the uri to <host>/<path> */
uint64_t csync_create_statedb_hash(CSYNC *ctx);
#endif /* _CSYNC_UTIL_H */
/* vim: set ft=c.doxygen ts=8 sw=2 et cindent: */