#include <sys/wait.h>
#include <stdio.h>
-#ifndef PORT
+#ifdef DEBUG_CONN
+#define PORT "64001"
+#else
#define PORT "65001"
#endif
static int expected_fd;
static struct io_plan *init_conn(struct io_conn *conn, int *state)
{
+#ifdef DEBUG_CONN
+ io_set_debug(conn, true);
+#endif
ok1(*state == 0);
(*state)++;
expected_fd = io_conn_fd(conn);
int main(void)
{
int state = 0;
- struct addrinfo *addrinfo;
+ struct addrinfo *addrinfo = NULL;
struct io_listener *l;
int fd;
exit(0);
}
freeaddrinfo(addrinfo);
- ok1(io_loop() == &state + 1);
+ ok1(io_loop(NULL, NULL) == &state + 1);
ok1(state == 2);
io_close_listener(l);
ok1(wait(&state));