]> Git repositories of Nishi - tewi.git/commitdiff
c89
authorNishi <nishi@nishi.boats>
Wed, 9 Oct 2024 10:50:45 +0000 (10:50 +0000)
committerNishi <nishi@nishi.boats>
Wed, 9 Oct 2024 10:50:45 +0000 (10:50 +0000)
git-svn-id: file:///raid/svn-personal/tewi/trunk@293 8739d7e6-ffea-ec47-b151-bdff447c6205

Server/server.c

index 23ab162a50a73149cbef81d940a5a0dfb423a5e7..84e24dd1669de8275cef5d34a6e744dce81e73a1 100644 (file)
@@ -526,6 +526,7 @@ int tw_server_pass(void* ptr) {
                bool rej;
                char* host;
                int port;
+               char* chrootpath;
                struct tw_config_entry* vhost_entry;
                strftime(date, 512, "%a, %d %b %Y %H:%M:%S %Z", tm);
 
@@ -589,7 +590,7 @@ int tw_server_pass(void* ptr) {
                cm_log("Server", "Hostname is `%s', port is `%d'", host, port);
                vhost_entry = tw_vhost_match(host, port);
 #ifdef HAS_CHROOT
-               char* chrootpath = vhost_entry->chroot_path != NULL ? vhost_entry->chroot_path : config.root.chroot_path;
+               chrootpath = vhost_entry->chroot_path != NULL ? vhost_entry->chroot_path : config.root.chroot_path;
                if(chrootpath != NULL) {
                        if(chdir(chrootpath) == 0) {
                                if(chroot(".") == 0) {