Commit b305285b8535100a9033623208b645dbb9b1b4a4

Authored by Georg Hopp
1 parent 6e080940

use new ipv6 support of trio

... ... @@ -60,11 +60,15 @@ applicationAdapterHttpUpdate(void * _this, void * subject)
60 60 HttpWorker worker = (HttpWorker)subject;
61 61 Session session = NULL;
62 62 time_t now = time(NULL);
63   - uint32_t ip = TR_socketAddrIp(worker->socket);
64 63
65   - char * sid;
66   - char buf[1000];
67   - size_t nbuf;
  64 + uint32_t ip;
  65 + char * sid;
  66 + char buf[1000];
  67 + size_t nbuf;
  68 +
  69 + ip = TR_sdbm(
  70 + TR_socketAddrIp(worker->socket),
  71 + TR_socketAddrIplen(worker->socket));
68 72
69 73 applicationSessionCleanup(this->application, now);
70 74
... ...
... ... @@ -63,11 +63,11 @@ serverCtor(void * _this, va_list * params)
63 63 this->fds = TR_calloc(sizeof(struct pollfd), this->max_fds);
64 64 this->conns = TR_calloc(sizeof(struct conns), this->max_fds);
65 65
66   - this->sock = TR_new(TR_TcpSocket, this->logger, "0.0.0.0", port, 0);
  66 + this->sock = TR_new(TR_TcpSocket, this->logger, "::", port, 0);
67 67 TR_socketBind((TR_Socket)this->sock);
68 68 TR_socketNonblock(this->sock);
69 69
70   - this->sockSSL = TR_new(TR_TcpSocket, this->logger, "0.0.0.0", port+1, 0);
  70 + this->sockSSL = TR_new(TR_TcpSocket, this->logger, "::", port+1, 0);
71 71 TR_socketBind((TR_Socket)this->sockSSL);
72 72 TR_socketNonblock(this->sockSSL);
73 73
... ...
Please register or login to post a comment