Remove dead code: tus_file_rename_base

parent f31c3c81
......@@ -673,42 +673,6 @@ tus_file_shutdown(struct VPFX(tus_server) *srv)
tus_server_unlock(srv);
}
#ifdef BAD_IDEA
void
tus_file_rename_base(struct tus_file_core *fcore, const char *basename)
{
struct tus_file_disk *fdisk;
const struct tus_file_core *check;
struct VPFX(tus_server) *srv;
struct tus_files *files;
unsigned l;
char *p;
CHECK_OBJ_NOTNULL(fcore, VMOD_TUS_FILE_CORE_MAGIC);
fdisk = fcore->disk;
CHECK_OBJ_NOTNULL(fdisk, VMOD_TUS_FILE_DISK_MAGIC);
srv = fcore->server;
files = tus_server_files(srv);
// pessimistic
l = strlen(basename) + strlen(fdisk->upload_path);
assert (l < TUS_PATH_MAX);
p = strrchr(fdisk->upload_path, '/');
AN(p);
p++;
AN(*p);
l = fdisk->upload_path_length + strlen(basename) - strlen(p);
tus_server_lock(srv);
check = VSPLAY_REMOVE(tus_files, files, fcore);
assert(check == fcore);
(void) strcpy(p, basename);
fdisk->upload_path_length = l;
AZ(VSPLAY_INSERT(tus_files, files, fcore));
tus_server_unlock(srv);
}
#endif
/* under server mutex */
static unsigned
tus_file_srvref(struct tus_file_core *fcore)
......
......@@ -174,10 +174,6 @@ struct tus_file_core *tus_file_lookup(struct VPFX(tus_server) *, const char *);
unsigned tus_body_to_file(VRT_CTX, struct tus_file_core *);
void tus_file_complete(struct tus_file_core *);
#ifdef BAD_IDEA
void
tus_file_rename_base(struct tus_file_core *fcore, const char *basename);
#endif
const char *
tus_file_final_urls(VRT_CTX, const struct tus_file_core *, const char *);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment