int read_to_buf(int s, size_t at_most, buf_t *buf, int *reached_eof) {
int read_result;
-#ifdef MS_WINDOWS
- int e;
-#endif
assert_buf_ok(buf);
tor_assert(reached_eof && (s>=0));
* return -1 or how many bytes you just flushed */
int write_result;
-#ifdef MS_WINDOWS
- int e;
-#endif
assert_buf_ok(buf);
tor_assert(buf_flushlen && (s>=0) && ((unsigned)*buf_flushlen <= buf->datalen));
if(bind(s,(struct sockaddr *)&bindaddr,sizeof(bindaddr)) < 0) {
log_fn(LOG_WARN,"Could not bind to port %u: %s",bindport,
- strerror(tor_socket_errno()));
+ strerror(tor_socket_errno(s)));
return -1;
}
if(listen(s,SOMAXCONN) < 0) {
log_fn(LOG_WARN,"Could not listen on port %u: %s",bindport,
- strerror(tor_socket_errno()));
+ strerror(tor_socket_errno(s)));
return -1;
}
connection_t *newconn;
struct sockaddr_in remote; /* information about the remote peer when connecting to other routers */
int remotelen = sizeof(struct sockaddr_in); /* length of the remote address */
-#ifdef MS_WINDOWS
- int e;
-#endif
news = accept(conn->s,(struct sockaddr *)&remote,&remotelen);
if (news == -1) { /* accept() error */
#define UNALIGNED_INT_ACCESS_OK
/* Version number of package */
-#define VERSION "0.0.6rc2"
+#define VERSION "0.0.6rc3"