[ds6-devel] nc6/src connection.c,1.13,1.14 io_stream.c,1.12,1.13 io_stream.h,1.6,1.7

chris@deepspace6.net chris@deepspace6.net
Wed Jan 1 12:51:00 2003


Update of /cvs/nc6/src

Modified Files:
	connection.c io_stream.c io_stream.h 
Log Message:
Moved setting of ios->name to io_stream_init since it's required anyway.


Index: connection.c
===================================================================
RCS file: /cvs/nc6/src/connection.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- connection.c	1 Jan 2003 11:50:08 -0000	1.13
+++ connection.c	1 Jan 2003 12:50:58 -0000	1.14
@@ -51,16 +51,12 @@
 
 	/* setup the remote stream to read into the remote buffer and write
 	 * from the local buffer */
-	io_stream_init(&(attrs->remote_stream),
+	io_stream_init(&(attrs->remote_stream), "remote",
 		&(attrs->remote_buffer), &(attrs->local_buffer));
 	/* setup the local stream to read into the local buffer and write
 	 * from the remote buffer */
-	io_stream_init(&(attrs->local_stream),
+	io_stream_init(&(attrs->local_stream), "local",
 		&(attrs->local_buffer), &(attrs->remote_buffer));
-
-	/* set the ios names */
-	ios_set_name(&(attrs->remote_stream), "remote");
-	ios_set_name(&(attrs->local_stream), "local");
 
 	/* the remote stream has an instant hold timeout by default,
 	 * which means that as soon as the remote read stream closes, the
Index: io_stream.c
===================================================================
RCS file: /cvs/nc6/src/io_stream.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- io_stream.c	1 Jan 2003 11:50:08 -0000	1.12
+++ io_stream.c	1 Jan 2003 12:50:58 -0000	1.13
@@ -34,7 +34,8 @@
 
 
 
-void io_stream_init(io_stream *ios, circ_buf *inbuf, circ_buf *outbuf)
+void io_stream_init(io_stream *ios, const char* name,
+	circ_buf *inbuf, circ_buf *outbuf)
 {
 	assert(ios != NULL);
 	assert(inbuf != NULL);
@@ -55,7 +56,7 @@
 	ios->hold_time = -1; /* infinite */
 	timerclear(&(ios->read_closed));
 
-	ios->name = "ios"; /* unspecified */
+	ios->name = name;
 	ios->rcvd = 0;
 	ios->sent = 0;
 }
Index: io_stream.h
===================================================================
RCS file: /cvs/nc6/src/io_stream.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- io_stream.h	1 Jan 2003 11:50:08 -0000	1.6
+++ io_stream.h	1 Jan 2003 12:50:58 -0000	1.7
@@ -50,7 +50,8 @@
 } io_stream;
 
 
-void io_stream_init(io_stream *ios, circ_buf *inbuf, circ_buf *outbuf);
+void io_stream_init(io_stream *ios, const char* name,
+	circ_buf *inbuf, circ_buf *outbuf);
 void io_stream_destroy(io_stream *ios);
 
 void ios_assign_socket(io_stream *ios, int fd, int socktype);
@@ -100,7 +101,6 @@
 
 /* set the name of the io_stream */
 #define ios_name(IOS)		((IOS)->name)
-#define ios_set_name(IOS, S)	((IOS)->name = (S))
 
 
 #endif /* IO_STREAM_H */



More information about the ds6-devel mailing list