![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Modularizando o src
Dependencies: EALib EthernetInterface_vz mbed-rtos mbed
Fork of header_main_colinas_V0-20-09-14 by
Diff: call_box.cpp
- Revision:
- 115:a1e1e2e60a2c
- Parent:
- 114:472502b31a12
- Child:
- 116:39a41ebb675c
--- a/call_box.cpp Mon Apr 20 14:40:09 2015 +0000 +++ b/call_box.cpp Thu Apr 23 13:57:54 2015 +0000 @@ -72,6 +72,11 @@ } void Call_Box::registry( void ){ + if( drop_registry_pkg ){ + debug_msg("Dropando registry pck from %d", this->ext ); + return; + } + if( this->sip == NULL ){ deleted_sip++; this->sip = new Sip( ext, port ); @@ -110,8 +115,8 @@ } } -VZ_call * Call_Box::invite( void ){ - //t.stop(); +VZ_call * Call_Box::invite ( void ) +{ VZ_call * call = NULL; if( this->sip == NULL ){ @@ -243,21 +248,17 @@ else return( REQUEST_PING ); } -void Call_Box::set_invite_response_ok( void ){ this->invite_response = true; } - -//void Call_Box::set_first_invite_response_ok( void ){ this->invite_first_response = true; -// debug_msg(""); -//} +void Call_Box::set_invite_response_ok ( void ) +{ + this->invite_response = true; + if ( debug_invite ) debug_msg ("Invite response :: ok"); +} void Call_Box::set_invite_response_pending( void ){ this->invite_response = false; } bool Call_Box::get_invite_response( void ){ return( this->invite_response ); } -//void Call_Box::set_first_invite_response_pending( void ){ this->first_invite_response = false; } -//bool Call_Box::get_first_invite_response( void ){ return( this->first_invite_response ); } - - void Call_Box::invite_retry_count_reset( void ){ invite_retry_count = MAX_INVITE_RETRY; } -uint8_t Call_Box::get_invite_retry_count( void ){ +uint16_t Call_Box::get_invite_retry_count( void ){ return ( invite_retry_count ) ? invite_retry_count-- : 0; }