kore

Kore is a web application platform for writing scalable, concurrent web based processes in C or Python.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit 09b0ae6d425d11727802f05258a16dd0dfa18181
parent b8b837370290c447d9e6ad6d778ec3412ae61174
Author: Joris Vink <joris@coders.se>
Date:   Mon,  6 Feb 2017 19:54:50 +0100

rename local sin to avoid potential conflicts.

Diffstat:
src/connection.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/connection.c b/src/connection.c @@ -88,7 +88,7 @@ int kore_connection_accept(struct listener *listener, struct connection **out) { struct connection *c; - struct sockaddr *sin; + struct sockaddr *s; socklen_t len; kore_debug("kore_connection_accept(%p)", listener); @@ -99,13 +99,13 @@ kore_connection_accept(struct listener *listener, struct connection **out) c->addrtype = listener->addrtype; if (c->addrtype == AF_INET) { len = sizeof(struct sockaddr_in); - sin = (struct sockaddr *)&(c->addr.ipv4); + s = (struct sockaddr *)&(c->addr.ipv4); } else { len = sizeof(struct sockaddr_in6); - sin = (struct sockaddr *)&(c->addr.ipv6); + s = (struct sockaddr *)&(c->addr.ipv6); } - if ((c->fd = accept(listener->fd, sin, &len)) == -1) { + if ((c->fd = accept(listener->fd, s, &len)) == -1) { kore_pool_put(&connection_pool, c); kore_debug("accept(): %s", errno_s); return (KORE_RESULT_ERROR);