Knowledge Base

BUG: Must Set QOS in WSAAccept Condition Func If lpSQos Not NULL

Article ID: 193919

Article Last Modified on 7/11/2005


APPLIES TO


This article was previously published under Q193919

SYMPTOMS

When you use the WSAAccept condition function to decide whether to accept, reject, or defer an incoming connection, you must set QOS on the socket if lpSQos is not NULL. Otherwise, WSAAccept fails with error 11014 - WSA_QOS_TRAFFIC_CTRL_ERROR. Also, dereferencing lpSQos does not reveal valid data for setting QOS. Therefore, you should not use the contents of lpSQos.

RESOLUTION

To work around this problem, set QOS on the socket in the condition function using the WSAIoctl API with the SIO_SET_QOS function code and pass in a valid QOS structure. Please note that you must do this even if the socket was already made into a QOS socket prior to calling WSAAccept using SIO_SET_QOS.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.

Keywords: kbbug kbgqos kbwinsock kbapi kbnetwork KB193919