aboutsummaryrefslogtreecommitdiff
path: root/src/or/directory.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/directory.c')
-rw-r--r--src/or/directory.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/directory.c b/src/or/directory.c
index 4ede81fd8..98d207b26 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -56,7 +56,7 @@ void directory_initiate_fetch(routerinfo_t *router) {
connection_free(conn);
return;
}
- fcntl(s, F_SETFL, O_NONBLOCK); /* set s to non-blocking */
+ set_socket_nonblocking(s);
memset((void *)&router_addr,0,sizeof(router_addr));
router_addr.sin_family = AF_INET;
@@ -254,7 +254,7 @@ int connection_dir_finished_flushing(connection_t *conn) {
switch(conn->state) {
case DIR_CONN_STATE_CONNECTING:
- if (getsockopt(conn->s, SOL_SOCKET, SO_ERROR, &e, &len) < 0) { /* not yet */
+ if (getsockopt(conn->s, SOL_SOCKET, SO_ERROR, (void*)&e, &len) < 0) { /* not yet */
if(errno != EINPROGRESS){
/* yuck. kill it. */
log_fn(LOG_DEBUG,"in-progress connect failed. Removing.");