Changeset 350

Show
Ignore:
Timestamp:
07/27/10 07:14:23 (6 weeks ago)
Author:
cyrusdaboo
Message:

Handle unsolicited capability response during authentication.

Location:
Mulberry/branches/v4.1d1/Sources_Common/Plugins/Authentication
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • Mulberry/branches/v4.1d1/Sources_Common/Plugins/Authentication/CAuthPlugin.cp

    r216 r350  
    127127bool CAuthPlugin::DoAuthentication(const CAuthenticator* acct_auth, 
    128128                                                                        CINETAccount::EINETServerType type, const char* type_string, 
    129                                                                         CTCPStream& stream, CLog& log, char* buffer, size_t buflen) 
     129                                                                        CTCPStream& stream, CLog& log, char* buffer, size_t buflen, cdstring& capabilities) 
    130130{ 
    131131        bool result = true; 
     
    312312                                case CINETAccount::eIMSP: 
    313313                                        // Check for unsolicited 
    314                                         if ((buffer[0] == '*') && (buffer[1] == ' ')) 
     314                                        if (::strncmp(buffer, "* CAPABILITY", 12) == 0) 
     315                                        { 
     316                                                capabilities = buffer; 
     317                                                break; 
     318                                        } 
     319                                        else if ((buffer[0] == '*') && (buffer[1] == ' ')) 
    315320                                                // Keep going and get another lines 
    316321                                                break; 
  • Mulberry/branches/v4.1d1/Sources_Common/Plugins/Authentication/CAuthPlugin.h

    r19 r350  
    8484                                                                                CLog& log, 
    8585                                                                                char* buffer, 
    86                                                                                 size_t buflen); 
     86                                                                                size_t buflen, 
     87                                                                                cdstring& capabilities); 
    8788 
    8889protected: