nova verzija tcp+udp->serial com

Revision:
8:c0f54b381346
Parent:
7:7ea932eb31f6
Child:
9:893843262a1f
--- a/doHTML.cpp	Sat Apr 18 22:32:13 2020 +0000
+++ b/doHTML.cpp	Sun Apr 19 22:13:45 2020 +0000
@@ -255,20 +255,36 @@
 
     void C_HTMLparse::set_UdpIP( int i, const char* str )
     {
-        if( (i > 0) && (i <= 5 ) && test_ip( str ) )     COPY_IP_ATTR_VALUE( UDPs[i], str )         //// dxml_set_attr( UDPs[i], "value", str); 
+        if( (i > 0) && (i <= 5 ) )
+        {
+            if( test_ip( str ) )     COPY_IP_ATTR_VALUE( UDPs[i], str )
+            else                    COPY_IP_ATTR_VALUE( UDPs[i], " " )
+        }
     }    
     void C_HTMLparse::set_UdpPort( int i, const char* str )
     {
-        if( (i>0) && (i<= 4) && test_num( str ) )        COPY_PORT_ATTR_VALUE( UDPs[i+5], str )     ////dxml_set_attr( UDPs[i+6], "value", str) ;
+        if( (i>0) && (i<= 4) )
+        {
+            if (test_num( str ) )        COPY_PORT_ATTR_VALUE( UDPs[i+5], str )  
+            else                        COPY_PORT_ATTR_VALUE( UDPs[i+5], " " )
+        }
     }
     
     void C_HTMLparse::set_TcpIP( int i, const char* str )
     {
-        if( (i > 0) && (i <= 5 ) && test_ip( str ) )     COPY_IP_ATTR_VALUE( TCPs[i], str )       /////// dxml_set_attr( TCPs[i], "value", str); 
+        if( (i > 0) && (i <= 5 ) )
+        {
+            if( test_ip( str ) )     COPY_IP_ATTR_VALUE( TCPs[i], str )       /////// dxml_set_attr( TCPs[i], "value", str); 
+            else                     COPY_IP_ATTR_VALUE( TCPs[i], " " )       /////// dxml_set_attr( TCPs[i], "value", str); 
+        }
     }    
     void C_HTMLparse::set_TcpPort( int i, const char* str )
     {
-        if( (i>0) && (i<= 4) && test_num( str ) )        COPY_PORT_ATTR_VALUE( TCPs[i+5], str )       ////dxml_set_attr( TCPs[i+6], "value", str) ;
+        if( (i>0) && (i<= 4) )
+        {
+            if( test_num( str ) )        COPY_PORT_ATTR_VALUE( TCPs[i+5], str )       ////dxml_set_attr( TCPs[i+6], "value", str) ;
+            else                        COPY_PORT_ATTR_VALUE( TCPs[i+5], " " )
+        }
     }
 
     const char *C_HTMLparse::get_myIP( void )