Modularizando o src

Dependencies:   EALib EthernetInterface_vz mbed-rtos mbed

Fork of header_main_colinas_V0-20-09-14 by VZTECH

Revision:
121:ee02790d00b7
Parent:
119:ee6a53069455
Child:
122:480c44b0e205
--- a/call_manager.cpp	Mon May 04 17:25:29 2015 +0000
+++ b/call_manager.cpp	Fri May 08 04:15:23 2015 +0000
@@ -1,4 +1,4 @@
-#include "call_manager.h"
+#include "header_app_includes.h"
 
 Timer invite_pkg_retry_timer;
 Timer bye_pkg_retry_timer;
@@ -74,7 +74,7 @@
                 }
             }
             v_call->remove_element( i );
-            Call_Box * cb = __find_CB__( v_cb, call->get_cb_ext() );
+            Call_Box * cb = find_CB( v_cb, call->get_cb_ext() );
             if( cb != NULL ){ 
                 data[ TIMESLICE_PLACE ] = 0;
                 
@@ -95,7 +95,7 @@
         uint8_t write_buffer[ CB_BUFFER_SIZE ];
     
         if( inviting_cb != NULL ){
-            if( inviting_cb->status == cb_idle ){            
+            if( inviting_cb -> get_status () == cb_idle ){            
                 inviting_cb->cb_set_status( cb_trying );
                 if( debug_invite ) debug_msg("[%d] Request invite <cb_idle,cb_trying>", inviting_cb->get_ext ()  );
             }
@@ -114,7 +114,8 @@
             
             VZ_call * call = NULL;
     
-            switch( cb->status ){            
+            switch( cb -> get_status () )
+            {            
                 case cb_trying : {                
                     uint8_t timeslice = ts->get_timeslice ();
                     
@@ -170,14 +171,11 @@
                             if( debug_invite ) debug_msg( "[%d] call denied <sip_denied>::<cb_ringing,cb_denied>", ext );
                         } else {
                             if ( cb->time_to_retry () )
-                            {
-                                if ( cb->sip != NULL )
+                            {                                
+                                if ( cb -> get_sip_status () == sip_waiting_trying )
                                 {
-                                    if ( cb->sip->get_status () == sip_waiting_trying )
-                                    {
-                                        if ( debug_invite ) debug_msg ("[%4i %3i] Resend invite to *", ext, cb -> get_invite_try_number ()  );
-                                        cb->retry_send_invite_pkg_to_ast ();    
-                                    }
+                                    if ( debug_invite ) debug_msg ("[%4i %3i] Resend invite to *", ext, cb -> get_invite_try_number ()  );
+                                    cb->retry_send_invite_pkg_to_ast ();    
                                 }
                             }    
                         }