void CIcqProto::handleAuthorizationFam(BYTE *pBuffer, size_t wBufferLength, snac_header *pSnacHeader, serverthread_info *info) { switch (pSnacHeader->wSubtype) { case ICQ_SIGNON_ERROR: { WORD wError; if (wBufferLength >= 2) unpackWord(&pBuffer, &wError); else wError = 0; LogFamilyError(ICQ_AUTHORIZATION_FAMILY, wError); break; } case ICQ_SIGNON_AUTH_KEY: handleAuthKeyResponse(pBuffer, wBufferLength, info); break; case ICQ_SIGNON_LOGIN_REPLY: handleLoginReply(pBuffer, wBufferLength, info); break; default: debugLogA("Warning: Ignoring SNAC(x%02x,x%02x) - Unknown SNAC (Flags: %u, Ref: %u)", ICQ_AUTHORIZATION_FAMILY, pSnacHeader->wSubtype, pSnacHeader->wFlags, pSnacHeader->dwRef); break; } }
void Server::processClient() { qDebug() << "Data received"; QString msg, type; QByteArray buffer; buffer = socket->readAll(); msg = buffer; p.parse(msg); qDebug() << msg; type = typeid(*(p.getReply())).name(); if (type.contains("LoginReply")) handleLoginReply(); processComplete(); // If we can get here we're good /*qint16 size; QString msg; QByteArray buffer; qDebug() << "avaliable on start" << socket->bytesAvailable(); buffer = socket->readAll(); qDebug() << "read to buffer" << buffer.size(); qDebug() << "availiable now" << socket->bytesAvailable(); QDataStream in (buffer); in >> size; qDebug() << "size" << size; in >> msg; qDebug() << "msg" << msg;*/ }
void CIcqProto::handleCloseChannel(BYTE *buf, WORD datalen, serverthread_info *info) { oscar_tlv_chain *chain = NULL; // Parse server reply, prepare reconnection if (!info->bLoggedIn && datalen && !info->newServerReady) handleLoginReply(buf, datalen, info); if (info->isMigrating) handleMigration(info); if ((!info->bLoggedIn || info->isMigrating) && info->newServerReady) { if (!connectNewServer(info)) { // Connecting failed if (info->isMigrating) icq_LogUsingErrorCode(LOG_ERROR, GetLastError(), LPGEN("Unable to connect to migrated ICQ communication server")); else icq_LogUsingErrorCode(LOG_ERROR, GetLastError(), LPGEN("Unable to connect to ICQ communication server")); SetCurrentStatus(ID_STATUS_OFFLINE); info->isMigrating = 0; } info->newServerReady = 0; return; } if (chain = readIntoTLVChain(&buf, datalen, 0)) { // TLV 9 errors (runtime errors?) WORD wError = chain->getWord(0x09, 1); if (wError) { SetCurrentStatus(ID_STATUS_OFFLINE); handleRuntimeError(wError); } disposeChain(&chain); } // Server closed connection on error, or sign off NetLib_CloseConnection(&hServerConn, TRUE); }
void Twitter::verifyCredentials() { connect(get(LOGIN_URL, "login"), SIGNAL(finished()), this, SLOT(handleLoginReply())); }