add debugging for assignment send and remove a useless cast

This commit is contained in:
Stephen Birarda 2013-09-12 17:37:37 -07:00
parent 11cc79fd41
commit 8d7b4ab321
2 changed files with 2 additions and 1 deletions

View file

@ -59,6 +59,7 @@ void childClient() {
if (usecTimestampNow() - usecTimestamp(&lastRequest) >= ASSIGNMENT_REQUEST_INTERVAL_USECS) {
gettimeofday(&lastRequest, NULL);
// if we're here we have no assignment, so send a request
qDebug() << "Sending an assignment request -" << requestAssignment << "\n";
nodeList->sendAssignment(requestAssignment);
}

View file

@ -393,7 +393,7 @@ void NodeList::sendAssignment(Assignment& assignment) {
? (sockaddr*) &GLOBAL_ASSIGNMENT_SOCKET
: _assignmentServerSocket;
_nodeSocket.send((sockaddr*) assignmentServerSocket, assignmentPacket, numHeaderBytes + numAssignmentBytes);
_nodeSocket.send(assignmentServerSocket, assignmentPacket, numHeaderBytes + numAssignmentBytes);
}
Node* NodeList::addOrUpdateNode(sockaddr* publicSocket, sockaddr* localSocket, char nodeType, uint16_t nodeId) {