ipq807x: Add the debug log for the tftp died issue

Change-Id: Ie81a360ecefe3999b893c815ace21b425a0e96e1
Signed-off-by: Sham Muthayyan <smuthayy@codeaurora.org>
This commit is contained in:
Sham Muthayyan 2018-01-18 14:09:05 +05:30
parent be6400b9d7
commit 35c8790688

View file

@ -467,6 +467,8 @@ static void icmp_handler(unsigned type, unsigned code, unsigned dest,
{
if (type == ICMP_NOT_REACH && code == ICMP_NOT_REACH_PORT) {
/* Oh dear the other end has gone away */
printf("TFTP server dies: print the pkt buffer\n");
print_buffer(0, pkt, 1, len, 0);
restart("TFTP server died");
}
}
@ -542,7 +544,11 @@ static void tftp_handler(uchar *pkt, unsigned dest, struct in_addr sip,
debug("Got OACK: %s %s\n",
pkt, pkt + strlen((char *)pkt) + 1);
tftp_state = STATE_OACK;
tftp_remote_port = src;
if (tftp_remote_port != src) {
printf("\nGot TFTP_OACK: TFTP remote port: changes from %d to %d\n",
tftp_remote_port, src);
tftp_remote_port = src;
}
/*
* Check for 'blksize' option.
* Careful: "i" is signed, "len" is unsigned, thus
@ -595,7 +601,11 @@ static void tftp_handler(uchar *pkt, unsigned dest, struct in_addr sip,
tftp_state == STATE_RECV_WRQ) {
/* first block received */
tftp_state = STATE_DATA;
tftp_remote_port = src;
if (tftp_remote_port != src) {
printf("\nGot TFTP_DATA: TFTP remote port: changes from %d to %d\n",
tftp_remote_port, src);
tftp_remote_port = src;
}
new_transfer();
#ifdef CONFIG_MCAST_TFTP