History

cleanup and dead code removal

Brad Hefta-Gaub committed 10 years ago

Commit 2eef07e1 parent 12a185712 files · +11 −124Browse files

Showing the changes to libraries/networking/src/DomainHandler.cpp (1 of 12 files). Show all

Unified · Split

libraries/networking/src/DomainHandler.cpp+0−24
@@ -104,9 +104,6 @@ void DomainHandler::hardReset() { · 103 unmodified lines
104 104
105 _hasCheckedForAccessToken = false;105 _hasCheckedForAccessToken = false;
106 106
107 //qDebug() << __FUNCTION__ << "about to call _domainConnectionRefusals.clear();";
108 //_domainConnectionRefusals.clear();
109
110 // clear any pending path we may have wanted to ask the previous DS about107 // clear any pending path we may have wanted to ask the previous DS about
111 _pendingPath.clear();108 _pendingPath.clear();
112}109}
@@ -145,7 +142,6 @@ void DomainHandler::setSocketAndID(const QString& hostname, quint16 port, const · 32 unmodified lines
145 _hostname = hostname;142 _hostname = hostname;
146 143
147 // FIXME - is this the right place???144 // FIXME - is this the right place???
148 qDebug() << __FUNCTION__ << "about to call _domainConnectionRefusals.clear();";
149 _domainConnectionRefusals.clear();145 _domainConnectionRefusals.clear();
150 146
151 qCDebug(networking) << "Updated domain hostname to" << _hostname;147 qCDebug(networking) << "Updated domain hostname to" << _hostname;
@@ -374,40 +370,20 @@ void DomainHandler::processDomainServerConnectionDeniedPacket(QSharedPointer<Rec · 222 unmodified lines
374 // Read deny reason from packet370 // Read deny reason from packet
375 uint8_t reasonCodeWire;371 uint8_t reasonCodeWire;
376 372
377 qDebug() << __FUNCTION__ << "line:" << __LINE__ << "message->getPosition():" << message->getPosition();
378 message->readPrimitive(&reasonCodeWire);373 message->readPrimitive(&reasonCodeWire);
379 qDebug() << __FUNCTION__ << "reasonCodeWire:" << reasonCodeWire;
380 ConnectionRefusedReason reasonCode = static_cast<ConnectionRefusedReason>(reasonCodeWire);374 ConnectionRefusedReason reasonCode = static_cast<ConnectionRefusedReason>(reasonCodeWire);
381 qDebug() << __FUNCTION__ << "reasonCode:" << (int)reasonCode;
382
383 qDebug() << __FUNCTION__ << "line:" << __LINE__ << "message->getPosition():" << message->getPosition();
384
385 quint16 reasonSize;375 quint16 reasonSize;
386 message->readPrimitive(&reasonSize);376 message->readPrimitive(&reasonSize);
387 qDebug() << __FUNCTION__ << "reasonSize:" << reasonSize;
388 qDebug() << __FUNCTION__ << "line:" << __LINE__ << "message->getPosition():" << message->getPosition();
389 auto reasonText = message->readWithoutCopy(reasonSize);377 auto reasonText = message->readWithoutCopy(reasonSize);
390 qDebug() << __FUNCTION__ << "line:" << __LINE__ << "reasonText:" << reasonText;
391 QString reasonMessage = QString::fromUtf8(reasonText);378 QString reasonMessage = QString::fromUtf8(reasonText);
392 qDebug() << __FUNCTION__ << "line:" << __LINE__ << "reasonMessage:" << reasonMessage;
393
394 qDebug() << __FUNCTION__ << "line:" << __LINE__ << "message->getPosition():" << message->getPosition();
395 379
396 // output to the log so the user knows they got a denied connection request380 // output to the log so the user knows they got a denied connection request
397 // and check and signal for an access token so that we can make sure they are logged in381 // and check and signal for an access token so that we can make sure they are logged in
398 qCWarning(networking) << "The domain-server denied a connection request: " << reasonMessage;382 qCWarning(networking) << "The domain-server denied a connection request: " << reasonMessage;
399 383
400 qDebug(networking) << "_domainConnectionRefusals:" << _domainConnectionRefusals;
401
402 if (!_domainConnectionRefusals.contains(reasonMessage)) {384 if (!_domainConnectionRefusals.contains(reasonMessage)) {
403 qDebug(networking) << "about to call _domainConnectionRefusals.append(reasonMessage);";
404 _domainConnectionRefusals.append(reasonMessage);385 _domainConnectionRefusals.append(reasonMessage);
405 qDebug(networking) << "_domainConnectionRefusals:" << _domainConnectionRefusals;
406
407
408 emit domainConnectionRefused(reasonMessage, (int)reasonCode);386 emit domainConnectionRefused(reasonMessage, (int)reasonCode);
409 } else {
410 qDebug(networking) << "ALREADY EMITTED domainConnectionRefused() ----------------------------";
411 }387 }
412 388
413 auto accountManager = DependencyManager::get<AccountManager>();389 auto accountManager = DependencyManager::get<AccountManager>();

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t