Novell.Directory.Ldap.Message.putReply C# (CSharp) Method

putReply() private method

private putReply ( RfcLdapMessage message ) : void
message Novell.Directory.Ldap.Rfc2251.RfcLdapMessage
return void
        internal virtual void putReply(RfcLdapMessage message)
        {
            if (!acceptReplies)
            {
                return ;
            }
            lock(replies)
            {
                replies.Add(message);
            }
            message.RequestingMessage = msg; // Save request message info
            switch (message.Type)
            {

                case LdapMessage.SEARCH_RESPONSE:
                case LdapMessage.SEARCH_RESULT_REFERENCE:
                case LdapMessage.INTERMEDIATE_RESPONSE:
                    break;

                default:
                    int res;
                    stopTimer();
                    // Accept no more results for this message
                    // Leave on connection queue so we can abandon if necessary
                    acceptReplies = false;
                    complete = true;
                    if (bindprops != null)
                    {
                        res = ((RfcResponse) message.Response).getResultCode().intValue();
                        if (res == LdapException.SASL_BIND_IN_PROGRESS)
                        {
                        }
                        else
                        {
                            // We either have success or failure on the bind
                            if (res == LdapException.SUCCESS)
                            {
                                // Set bind properties into connection object
                                conn.BindProperties = bindprops;
                            }
                            else
                            {
                            }
                            // If not a sasl bind in-progress, release the bind
                            // semaphore and wake up all waiting threads
                            int id;
                            if (conn.BindSemIdClear)
                            {
                                // Semaphore id for normal operations
                                id = msgId;
                            }
                            else
                            {
                                // Semaphore id for sasl bind
                                id = conn.BindSemId;
                                conn.clearBindSemId();
                            }
                            conn.freeWriteSemaphore(id);
                        }
                    }
                    break;

            }
            // wake up waiting threads
            sleepersAwake();
            return ;
        }