ModBusTCP with some fixes

Revision:
5:1bf121618c2f
Parent:
3:ebea8e061ae6
--- a/ModBus-Req.cpp	Fri Jun 30 10:40:06 2017 +0000
+++ b/ModBus-Req.cpp	Thu Dec 03 14:01:33 2020 +0000
@@ -41,6 +41,7 @@
     
     switch(fc) {
         case 0x04: //return mb_read_register(data_in, length); 
+        {
             //Read Requet received
             // Getting Start Address and Length
             
@@ -69,11 +70,15 @@
              
             _handler[i].funcCgiRead(id, start_adress, number_of_registers);
             break;
+        }
         case 0x10: //return mb_write_register(data_in, length);
+        {
             break;
-                
-        default:  mb_exception_handler(id, buffer, size, 0x01);
-                
+        }        
+        default:  
+        {
+            mb_exception_handler(id, buffer, size, 0x01);
+        }        
     }
 }