Abdellazizhammami / arduino

Automatically exported from code.google.com/p/arduino
Other
0 stars 0 forks source link

parseDHCPResponse dont exit on endOption #715

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
parseDHCPResponse do not exit if it read the endOption. If there is more then 
one dhcp replay, it continue parsing the next one.

--- Dhcp.cpp.orig   2011-11-17 08:34:56.000000000 +0100
+++ Dhcp.cpp    2011-11-17 08:35:34.000000000 +0100
@@ -253,6 +253,8 @@
             switch (_dhcpUdpSocket.read()) 
             {
                 case endOption :
+                    _dhcpUdpSocket.flush();
+                    return type;
                     break;

                 case padOption :

Original issue reported on code.google.com by marius.r...@gmail.com on 17 Nov 2011 at 7:37