Modularizando o src

Dependencies:   EALib EthernetInterface_vz mbed-rtos mbed

Fork of header_main_colinas_V0-20-09-14 by VZTECH

Revision:
39:89e023ea5968
Parent:
38:af5ecd6997ab
Child:
40:990683572031
--- a/main.cpp	Wed Oct 01 19:14:38 2014 +0000
+++ b/main.cpp	Thu Oct 02 12:38:42 2014 +0000
@@ -140,7 +140,6 @@
         }
 //----------------------
             if( t.read() > 5 ){
-                static int count = 0;            
                 for( register uint8_t i = 0; i < v_cb->size(); i++ ){
                     Call_Box * cb = ( Call_Box * )v_cb->get_element( i );
                     if( debug_alive ){ 
@@ -157,26 +156,6 @@
                 CAB_LED = !CAB_LED;
                 
                 if( debug_cks ) debug_msg("PKG_CSK OK: %d :: PKG_CSK ERR: %d", pkg_cksok, pkg_ckserr );
-                
-                //<><><><><><><><><><>
-                /*
-                debug_sip = 1;
-                if( count  == 8 ){ 
-                    data = buffer;
-                    type = __INVITE__;
-                    ext = 854;
-                    port = 0x1011;
-                }
-                count++;
-                
-                if( count  == 6
-                 ){
-                    data = buffer;
-                    type = __INVITE__;
-                    ext = 854;
-                    port = 0x1011;
-                }
-                */
             }
 //----------------------
         switch( type ){
@@ -412,22 +391,21 @@
             if (flag == 1) { flag = 0; }
         }
         
-        int length;
+        int length = 0;
         if( udp_timer.read() > 1 && !listen_udp ){
-            data = (uint8_t *)listen_eth_udp( (char *)buffer, &length );
+            //data = (uint8_t *)listen_eth_udp( (char *)buffer, &length );
             if( length ){ 
                 listen_udp = true;
                 debug_msg("");
             }else udp_timer.reset();
         }
         if( listen_udp ){
-            data = (uint8_t *)listen_eth_udp( (char *)buffer, &length );
+            //data = (uint8_t *)listen_eth_udp( (char *)buffer, &length );
             if( udp_timer.read() > 30 ){
                 listen_udp = false;
                 udp_timer.reset();    
             }
         }
-        
         type = __DO_NOTHING__;
     }
 }
\ No newline at end of file