[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] Fix windows compile



Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/tmp/cvs-serv5261/src/or

Modified Files:
	buffers.c connection.c 
Log Message:
Fix windows compile

Index: buffers.c
===================================================================
RCS file: /home/or/cvsroot/src/or/buffers.c,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -d -r1.85 -r1.86
--- buffers.c	1 May 2004 20:46:28 -0000	1.85
+++ buffers.c	1 May 2004 20:55:31 -0000	1.86
@@ -171,9 +171,6 @@
 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));
@@ -244,9 +241,6 @@
    * 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));

Index: connection.c
===================================================================
RCS file: /home/or/cvsroot/src/or/connection.c,v
retrieving revision 1.206
retrieving revision 1.207
diff -u -d -r1.206 -r1.207
--- connection.c	1 May 2004 20:46:28 -0000	1.206
+++ connection.c	1 May 2004 20:55:31 -0000	1.207
@@ -279,13 +279,13 @@
 
   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;
   }
 
@@ -313,9 +313,6 @@
   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 */