[mw-devel] CVS Update at silver.sucs.org: marvin

Peter Berry pwb at sucs.org
Mon Mar 8 01:28:23 GMT 2004


CVSROOT:	/usr/local/src/cvs
Module name:	marvin
Changes by:	pwb at silver.sucs.org	04/03/08 01:28:22

Modified files:
	.              : client.c server.c session.c utils.c xml.c 

Log message:
	Added some comments in main_loop() (client and server)
	Changed some linked list loops from 'while' to 'for' where this makes more sense
	Changed the if-else-if ladder in session_recv() to a switch (client and server)
	Removed a redundant 'else' in session_drop()
	Prettified code in a few places by adding whitespace
	
	A couple of questions:
	* What is the purpose of 'int net' in client.c ? It seems redundant to me (the server just uses 'ptr->socket' which is currently always the same as 'net' in client.c).
	* Can we really only do one I/O operation on each socket for each call to select() ? I.e. can the 'else's be removed ?
	* The client currently has debug mode turned off; is there a reason for this ? (also '#define DEBUG' and #ifdefs might be more sensible than a variable)
	
	Possible bugs:
	* Sometimes it seems the server doesn't actually receive any data - e.g. size=0 expect=5 . In fact it seems only to receive the first message intact. But the quit command always works, so apaprently it really does receive it.




More information about the mw-devel mailing list