]> Git repositories of Nishi - tewi.git/commitdiff
show vhost instead of hostname if it can
authorNishi <nishi@nishi.boats>
Mon, 23 Sep 2024 11:03:55 +0000 (11:03 +0000)
committerNishi <nishi@nishi.boats>
Mon, 23 Sep 2024 11:03:55 +0000 (11:03 +0000)
git-svn-id: file:///raid/svn-personal/tewi/trunk@136 8739d7e6-ffea-ec47-b151-bdff447c6205

Server/server.c

index 5f09b4bbb0e9d699f2bb7718c512ccbb43024ec4..2337ed5a31872d2b8c69fe7027b3aa14923e2154 100644 (file)
@@ -513,11 +513,11 @@ int32_t tw_server_pass(void* ptr) {
                for(i = 0; vhost[i] != 0; i++) {
                        if(vhost[i] == ':') {
                                host[i] = 0;
-                               name = host;
                                port = atoi(host + i + 1);
                                break;
                        }
                }
+               name = host;
                cm_log("Server", "Hostname is `%s', port is `%d'", host, port);
                struct tw_config_entry* vhost_entry = tw_vhost_match(host, port);
                for(i = 0; i < config.module_count; i++) {