Issue Details (XML | Word | Printable)

Key: CORE-1276
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Vlad Khorsun
Reporter: Vlad Khorsun
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Firebird Core

Sometime INET error reported as 0 in firebird.log instead of real error code

Created: 22/May/07 06:04 AM   Updated: 10/Jul/07 01:18 PM
Component/s: None
Affects Version/s: 2.0.1
Fix Version/s: 2.1 Beta 1, 2.0.2

Time Tracking:
Not Specified

Environment: User reported WinXP, FB 2.0.1 SS but i sure it can happen in every FB SS versions on windows


 Description  « Hide
inet.cpp have many places in code when we analyse error code not immediate after sockets function call but after following THREAD_ENTER call.
It seems Win API functions called by THREAD_ENTER (WaitForMultipleObjects for example) can reset error code returned by WSAGetLastError.
Solution is to read WSAGetLastError into local variable immediate after socket function call and operate with this variable not calling WSAGetLastError again

 All   Comments   Work Log   Change History   Version Control   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Vlad Khorsun added a comment - 22/May/07 06:36 AM
User report was:

INET/select_wait: select failed, errno =0
SRVR_multi_thread/RECEIVE: error on main_port, shutting down

After it server stop accept new connections but worked well with existing ones

Vlad Khorsun added a comment - 22/May/07 06:38 AM
Can't verify fix as i can't reproduce the error