Commit fc042aca authored by Jonathon Duerig's avatar Jonathon Duerig

Cleaned up and added a couple of lines of comment about what 'Send' and 'Ack'...

Cleaned up and added a couple of lines of comment about what 'Send' and 'Ack' really mean. All that really matters is distinguishing between outgoing packets and incoming packets. 'Send' and 'Ack' are unfortunate names reflecting my previous muddled thinking about this. So for 'Send' read outgoing, and for 'Ack', read incoming. A low-priority task is to change the naming to reflect this semantic change.
parent 7847602e
......@@ -578,38 +578,22 @@ namespace
return;
}
// We want to distinguish between packets that are outgoing and
// packets that are incoming. All other separation can be done
// inside the sensors themselves. We call these 'Send' and 'Ack'
// packets because my thinking was originally muddied about this.
if (outgoing) {
/*
* Outgoing packets
*/
if (isAck) {
/*
* XXX - This is not yet implemented (I think)
*/
//logWrite(ERROR,"Unhandled: outgoing ACK");
}
// JD: This should be called even when there is no data. Otherwise,
// there is confusion at connection startup and when there are other
// zero length segments which should be sent.
// if (hasData) {
packet.packetType = PACKET_INFO_SEND_COMMAND;
pos->second->capturePacket(&packet);
// }
packet.packetType = PACKET_INFO_SEND_COMMAND;
pos->second->capturePacket(&packet);
} else {
/*
* Incoming packets
*/
if (isAck) {
packet.packetType = PACKET_INFO_ACK_COMMAND;
pos->second->capturePacket(&packet);
}
// See above
// if (hasData) {
/*
* XXX - This is not yet implemented (I think)
*/
//logWrite(ERROR,"Unhandled: incoming data");
// }
packet.packetType = PACKET_INFO_ACK_COMMAND;
pos->second->capturePacket(&packet);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment