[Xorp-cvs] XORP cvs commit: xorp/libxorp

Bruce Simpson bms@icir.org
Fri, 17 Mar 2006 20:57:00 GMT


CVSROOT:	/usr/local/www/data/cvs
Module name:	xorp
Changes by:	bms@xorpc.icir.org	2006-03-17 20:57:00 UTC

XORP CVS repository


Modified files:
	libxorp       win_dispatcher.cc win_dispatcher.hh 

Log message:
	Make the Windows native event dispatch code more stable,
	by introducing two methods:
	 WinDispatcher::callback_bad_handle()
	 WinDispatcher::callback_bad_socket(XorpFd& fd)
	
	Previously if we encountered a bad handle in
	WinDispatcher::wait_and_dispatch(), we would blow
	up with XLOG_FATAL(). Now we proactively dispatch
	all callbacks registered on any bad handles in
	the array, just like SelectorList does.
	
	Sockets, however, are a special case. We rely on
	WSAEnumNetworkEvents() to detect bad sockets, because
	the handles registered and thus visible to
	callback_bad_handle() are actually Event handles
	used to dispatch events on each socket and not the
	sockets themselves with which there is a 1:1
	correspondence.
	
	If we detect a bad socket, we do the same as for
	a bad handle.
	
	While we are here fix some nits in error messages
	in the asserts for fatal edge cases around WFMO.

Revision  Changes                                Path
1.8       +78 -21;  commitid: efc5441b22967ea6;  xorp/libxorp/win_dispatcher.cc
1.9       +3 -1;  commitid: efc5441b22967ea6;    xorp/libxorp/win_dispatcher.hh