[cvslog] (2002-08-11 20:50:45 UTC) Module eggdrop1.7: Change committed

cvslog cvs at tsss.org
Sun Aug 11 15:51:03 CST 2002


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.7
Commit time: 2002-08-11 20:50:45 UTC
Commited by: stdarg <stdarg at techmonkeys.org>

Modified files:
     testcode/client.c testcode/my_poll.c testcode/sockbuf.c

Log message:



---------------------- diff included ----------------------
Index: eggdrop1.7/testcode/client.c
diff -u eggdrop1.7/testcode/client.c:1.7 eggdrop1.7/testcode/client.c:1.8
--- eggdrop1.7/testcode/client.c:1.7	Tue Jun 18 23:51:54 2002
+++ eggdrop1.7/testcode/client.c	Sun Aug 11 15:50:35 2002
@@ -73,24 +73,23 @@
 	}
 
 	printf("Connecting to %s %d\n", host, port);
-	sock = socket_create(host, port, NULL, 0, SOCKET_CLIENT);
+	sock = socket_create(host, port, NULL, 0, SOCKET_CLIENT | SOCKET_NONBLOCK);
 	if (sock < 0) {
 		perror("socket_create");
 		return(0);
 	}
-	socket_set_nonblock(sock, 1);
-	socket_set_nonblock(0, 1);
 	server_idx = sockbuf_new();
 	sockbuf_set_sock(server_idx, sock, SOCKBUF_CLIENT);
 	sockbuf_set_handler(server_idx, &server_event, NULL);
 	sslmode_init();
 
 	stdin_idx = sockbuf_new();
+	socket_set_nonblock(0, 1);
 	sockbuf_set_sock(stdin_idx, 0, 0);
 	sockbuf_set_handler(stdin_idx, &stdin_event, NULL);
 	linemode_on(stdin_idx);
 	while (1) {
-		sockbuf_update_all(-1);
+		sockbuf_update_all(1000);
 	}
 	return(0);
 }
Index: eggdrop1.7/testcode/my_poll.c
diff -u eggdrop1.7/testcode/my_poll.c:1.1 eggdrop1.7/testcode/my_poll.c:1.2
--- eggdrop1.7/testcode/my_poll.c:1.1	Fri Aug  9 18:42:04 2002
+++ eggdrop1.7/testcode/my_poll.c	Sun Aug 11 15:50:35 2002
@@ -3,7 +3,7 @@
 #include <sys/select.h>
 #include "my_poll.h"
 
-int poll(struct pollfd *pollfds, int npollfds, int timeout)
+int my_poll(struct pollfd *pollfds, int npollfds, int timeout)
 {
 	fd_set reads, writes, excepts;
 	int i, n;
Index: eggdrop1.7/testcode/sockbuf.c
diff -u eggdrop1.7/testcode/sockbuf.c:1.8 eggdrop1.7/testcode/sockbuf.c:1.9
--- eggdrop1.7/testcode/sockbuf.c:1.8	Fri Aug  9 18:42:04 2002
+++ eggdrop1.7/testcode/sockbuf.c	Sun Aug 11 15:50:35 2002
@@ -11,6 +11,7 @@
 	#include <sys/poll.h>
 #else
 	#include "my_poll.h"
+	#define poll my_poll
 #endif
 
 #include <errno.h>
----------------------- End of diff -----------------------



More information about the Changes mailing list