-
-
Save haakonnessjoen/7709c5f648ed3818f986 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/mactelnetd.c b/mactelnetd.c | |
index 89c94c5..1679343 100644 | |
--- a/mactelnetd.c | |
+++ b/mactelnetd.c | |
@@ -755,6 +755,7 @@ static void handle_packet(unsigned char *data, int data_len, const struct sockad | |
init_packet(&pdata, MT_PTYPE_ACK, pkthdr.dstaddr, pkthdr.srcaddr, pkthdr.seskey, pkthdr.counter); | |
send_udp(curconn, &pdata); | |
} | |
+ syslog(LOG_DEBUG, _("(%d) DEBUG: Data ack ts=%ld, now=%ld lastack=%d pkcntr=%d"), curconn->seskey, curconn->lastdata, time(NULL), curconn->lastack, pkthdr.counter); | |
curconn->lastdata = time(NULL); | |
return; | |
@@ -1197,6 +1198,7 @@ int main (int argc, char **argv) { | |
for (p = connections_head; p != NULL; p = p->next) { | |
if (now - p->lastdata >= MT_CONNECTION_TIMEOUT) { | |
syslog(LOG_INFO, _("(%d) Session timed out"), p->seskey); | |
+ syslog(LOG_DEBUG, _("(%d) DEBUG: Timeout ts=%ld, now=%ld lastack=%d"), p->seskey, p->lastdata, time(NULL), p->lastack); | |
init_packet(&pdata, MT_PTYPE_DATA, p->dstmac, p->srcmac, p->seskey, p->outcounter); | |
/*_ Please include both \r and \n in translation, this is needed for the terminal emulator. */ | |
add_control_packet(&pdata, MT_CPTYPE_PLAINDATA, _("Timeout\r\n"), 9); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment