Remove bogus casts of socket to int before calling ev_callback

This should make 64-bit windows act better.

Found by Mark Heily.
This commit is contained in:
Nick Mathewson 2012-01-09 11:33:38 -05:00
parent da70fa705b
commit f032516718

View File

@ -1046,7 +1046,7 @@ event_signal_closure(struct event_base *base, struct event *ev)
ev->ev_ncalls = ncalls;
if (ncalls == 0)
ev->ev_pncalls = NULL;
(*ev->ev_callback)((int)ev->ev_fd, ev->ev_res, ev->ev_arg);
(*ev->ev_callback)(ev->ev_fd, ev->ev_res, ev->ev_arg);
EVBASE_ACQUIRE_LOCK(base, th_base_lock);
should_break = base->event_break;
@ -1277,7 +1277,7 @@ event_persist_closure(struct event_base *base, struct event *ev)
event_add_internal(ev, &run_at, 1);
}
EVBASE_RELEASE_LOCK(base, th_base_lock);
(*ev->ev_callback)((int)ev->ev_fd, ev->ev_res, ev->ev_arg);
(*ev->ev_callback)(ev->ev_fd, ev->ev_res, ev->ev_arg);
}
/*
@ -1327,7 +1327,7 @@ event_process_active_single_queue(struct event_base *base,
case EV_CLOSURE_NONE:
EVBASE_RELEASE_LOCK(base, th_base_lock);
(*ev->ev_callback)(
(int)ev->ev_fd, ev->ev_res, ev->ev_arg);
ev->ev_fd, ev->ev_res, ev->ev_arg);
break;
}