[syslinux:lwip] prdhcp.c32: Fix what is retrieved.

syslinux-bot for Gene Cumm gene.cumm at gmail.com
Wed Apr 25 15:33:08 PDT 2012


Commit-ID:  bd71f69ea0aa1e50f4bd4accc9f63be6f0d69cbb
Gitweb:     http://www.syslinux.org/commit/bd71f69ea0aa1e50f4bd4accc9f63be6f0d69cbb
Author:     Gene Cumm <gene.cumm at gmail.com>
AuthorDate: Fri, 3 Feb 2012 23:14:04 -0500
Committer:  Gene Cumm <gene.cumm at gmail.com>
CommitDate: Fri, 3 Feb 2012 23:14:04 -0500

prdhcp.c32: Fix what is retrieved.

Signed-off-by: Gene Cumm <gene.cumm at gmail.com>

---
 com32/modules/prdhcp.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/com32/modules/prdhcp.c b/com32/modules/prdhcp.c
index 5b572b0..321d4e7 100644
--- a/com32/modules/prdhcp.c
+++ b/com32/modules/prdhcp.c
@@ -136,11 +136,12 @@ void print_dhcp_pkt_all(void)
     pxe_bootp_t *p;
     size_t len;
     int i;
+    int ptype[3] = {PXENV_PACKET_TYPE_DHCP_DISCOVER, PXENV_PACKET_TYPE_DHCP_ACK, PXENV_PACKET_TYPE_CACHED_REPLY};
 
     for (i = 0; i < 3; i++) {
-	if (!pxe_get_cached_info(PXENV_PACKET_TYPE_CACHED_REPLY,
+	if (!pxe_get_cached_info(ptype[i],
 		(void **)&(p), &(len))) {
-	    dprintf("Got packet #%d\n", i);
+	    dprintf("Got packet #%d/%d\n", (i + 1), ptype[i]);
 	    print_pxe_bootp_t(p, len);
 	    pressanykey();
 	}


More information about the Syslinux-commits mailing list