Re: [U-Boot] [PATCH v3 2/5] TFTP: rename STATE_RRQ to STATE_SEND_RRQ

2011-05-19 Thread Detlev Zundel
Luca Ceresoli luca.ceres...@comelit.it writes:

 With the upcoming TFTP server implementation, requests can be either
 outgoing or incoming, so avoid ambiguities.

 Signed-off-by: Luca Ceresoli luca.ceres...@comelit.it
 Cc: Wolfgang Denk w...@denx.de

Acked-by: Detlev Zundel d...@denx.de

Cheers
  Detlev

-- 
More than any other time in history, mankind faces a crossroads.  One
path leads  to despair  and utter  hopelessness.   The other to total
extinction.  Let us pray, we have the wisdom to choose correctly.
-- Woody Allen
--
DENX Software Engineering GmbH,  MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 2/5] TFTP: rename STATE_RRQ to STATE_SEND_RRQ

2011-05-19 Thread Wolfgang Denk
Dear Luca Ceresoli,

In message 1305626621-15008-3-git-send-email-luca.ceres...@comelit.it you 
wrote:
 With the upcoming TFTP server implementation, requests can be either
 outgoing or incoming, so avoid ambiguities.
 
 Signed-off-by: Luca Ceresoli luca.ceres...@comelit.it
 Cc: Wolfgang Denk w...@denx.de
 
 ---
 Changes in v2: none.
 
 Changes in v3:
  - rebased on top of the net/tftp.c cleanup.
 
  net/tftp.c |   12 ++--
  1 files changed, 6 insertions(+), 6 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Some programming languages manage to  absorb  change,  but  withstand
progress.  -- Epigrams in Programming, ACM SIGPLAN Sept. 1982
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v3 2/5] TFTP: rename STATE_RRQ to STATE_SEND_RRQ

2011-05-17 Thread Luca Ceresoli
With the upcoming TFTP server implementation, requests can be either
outgoing or incoming, so avoid ambiguities.

Signed-off-by: Luca Ceresoli luca.ceres...@comelit.it
Cc: Wolfgang Denk w...@denx.de

---
Changes in v2: none.

Changes in v3:
 - rebased on top of the net/tftp.c cleanup.

 net/tftp.c |   12 ++--
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/net/tftp.c b/net/tftp.c
index b9d0f3b..6386740 100644
--- a/net/tftp.c
+++ b/net/tftp.c
@@ -80,7 +80,7 @@ static intTftpTsize;
 static short   TftpNumchars;
 #endif
 
-#define STATE_RRQ  1
+#define STATE_SEND_RRQ 1
 #define STATE_DATA 2
 #define STATE_TOO_LARGE3
 #define STATE_BAD_MAGIC4
@@ -215,7 +215,7 @@ TftpSend(void)
 
switch (TftpState) {
 
-   case STATE_RRQ:
+   case STATE_SEND_RRQ:
xp = pkt;
s = (ushort *)pkt;
*s++ = htons(TFTP_RRQ);
@@ -309,7 +309,7 @@ TftpHandler(uchar *pkt, unsigned dest, IPaddr_t sip, 
unsigned src,
 #endif
return;
}
-   if (TftpState != STATE_RRQ  src != TftpRemotePort)
+   if (TftpState != STATE_SEND_RRQ  src != TftpRemotePort)
return;
 
if (len  2)
@@ -399,10 +399,10 @@ TftpHandler(uchar *pkt, unsigned dest, IPaddr_t sip, 
unsigned src,
puts(\n\t );
}
 
-   if (TftpState == STATE_RRQ)
+   if (TftpState == STATE_SEND_RRQ)
debug(Server did not acknowledge timeout option!\n);
 
-   if (TftpState == STATE_RRQ || TftpState == STATE_OACK) {
+   if (TftpState == STATE_SEND_RRQ || TftpState == STATE_OACK) {
/* first block received */
TftpState = STATE_DATA;
TftpRemotePort = src;
@@ -632,7 +632,7 @@ TftpStart(void)
 
TftpRemotePort = WELL_KNOWN_PORT;
TftpTimeoutCount = 0;
-   TftpState = STATE_RRQ;
+   TftpState = STATE_SEND_RRQ;
/* Use a pseudo-random port unless a specific port is set */
TftpOurPort = 1024 + (get_timer(0) % 3072);
 
-- 
1.7.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot