![](/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_manager.cpp
- Revision:
- 93:69ccd653c7ca
- Parent:
- 92:92df17f538a8
- Child:
- 97:8985817e8847
--- a/call_manager.cpp Sat Jan 10 16:35:11 2015 +0000 +++ b/call_manager.cpp Sat Jan 10 16:44:22 2015 +0000 @@ -96,8 +96,6 @@ uint8_t data[ __CB_BUFFER_SIZE__ ]; uint8_t write_buffer[ __CB_BUFFER_SIZE__ ]; - static uint8_t supress = 0; - if( inviting_cb != NULL ){ //if( inviting_cb->status != cb_on_call ){ @@ -144,26 +142,13 @@ cb->cb_set_status( cb_ringing ); - cb->set_invite_response_pending(); + cb->set_invite_response_pending(); - supress++; + //cb->set_msg_id( ( cb->get_msg_id() + 1 ) & ( ~BIT7 ) ); + cb->set_msg_id( ( cb->get_msg_id() + 1 ) & ~BIT7 ); - if( supress == 0x04 ) supress = 0x00; - - if( supress & BIT0 ) - { - debug_msg("supress entendi"); - } - else - { - debug_msg("don't supress entendi "); - - //cb->set_msg_id( ( cb->get_msg_id() + 1 ) & ( ~BIT7 ) ); - cb->set_msg_id( ( cb->get_msg_id() + 1 ) & ~BIT7 ); - - send2callboxes( __build_cb_package__( ext, port, __INVITE__, - ( char * )data, cb->get_msg_id(), __CB_BUFFER_SIZE__ - __VZ_HEADER_OFFSET__, write_buffer ) ); - } + send2callboxes( __build_cb_package__( ext, port, __INVITE__, + ( char * )data, cb->get_msg_id(), __CB_BUFFER_SIZE__ - __VZ_HEADER_OFFSET__, write_buffer ) ); if( debug_invite ) debug_msg("-- %d on TS::%d --", cb->get_ext(), data[ __TIMESLICE_PLACE__ ] ); } @@ -187,16 +172,9 @@ //cb->set_msg_id( ( cb->get_msg_id() & ~BIT7 ) + 1 ); cb->set_msg_id( ( cb->get_msg_id() + 1 ) & ~BIT7 ); - if( supress & BIT1 ) - { - debug_msg("supress ok vai la"); - } - else - { - send2callboxes( __build_cb_package__( ext, port, __INVITE__, ( char * )data, - cb->get_msg_id(), __CB_BUFFER_SIZE__ - __VZ_HEADER_OFFSET__, write_buffer ) ); - debug_msg("send ok liga o mic"); - } + send2callboxes( __build_cb_package__( ext, port, __INVITE__, ( char * )data, + cb->get_msg_id(), __CB_BUFFER_SIZE__ - __VZ_HEADER_OFFSET__, write_buffer ) ); + debug_msg("send ok liga o mic"); cb->set_invite_response_pending();