![](/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: main.cpp
- Revision:
- 16:b45b5b7363d7
- Parent:
- 15:9c7456c1b6f4
- Child:
- 17:67a6b557eda5
diff -r 9c7456c1b6f4 -r b45b5b7363d7 main.cpp --- a/main.cpp Thu Sep 18 13:56:13 2014 +0000 +++ b/main.cpp Thu Sep 18 13:59:58 2014 +0000 @@ -138,10 +138,9 @@ Call_Box * cb = ( Call_Box * )v_cb->get_element( i ); debug_msg(" Type :: %d -- Ext :: %d -- TimeSlice :: %d -- remain_timeslices :: %d :: v_call->size() :: %d :: Status :: %d :: SIP Status %d", type , cb->get_ext(), cb->get_timeslice(), ts->remain_timeslices(), v_call->size(), cb->status, cb->sip->status ); } - if( v_cb->size() != 0 ) debug_msg(""); + debug_msg(""); t.reset(); led3 = !led3; - hack_led = !hack_led; } //---------------------- switch( type ){ @@ -240,7 +239,7 @@ debug_msg(" -- %d on %d -- ", cb->get_ext(), data[ __TIMESLICE_PLACE__ ] ); __send_to_cb__( __build_cb_package__( ext, port, __INVITE__, ( char * )data, cb->get_msg_id(), __CB_BUFFER_SIZE__ - __VZ_HEADER_OFFSET__, write_buffer ) ); - debug_msg( "-- Trying -- aceitando pedido de invite --" ); + debug_msg( "-- Trying -- aceitando pedido de invite -- %s ", write_buffer ); //debug_pkg( 300, write_buffer ); }else{ set_status( cb->status,cb_idle); @@ -250,21 +249,13 @@ debug_msg(" -- %d on %d -- ", cb->get_ext(), data[ __TIMESLICE_PLACE__ ] ); __send_to_cb__( __build_cb_package__( ext, port, __CB_BYE__, ( char * )data, cb->get_msg_id(), __CB_BUFFER_SIZE__ - __VZ_HEADER_OFFSET__, write_buffer ) ); - debug_msg( "-- Trying -- Negando pedido de invite --" ); + debug_msg( "-- Trying -- Negando pedido de invite -- %s ", write_buffer ); set_status( cb->sip->status, sip_idle); } } }break; case cb_busy : { - set_status( cb->status,cb_idle); - ts->return_timeslice( cb->get_timeslice() ); - cb->set_timeslice( 0x00 ); - data[ __TIMESLICE_PLACE__ ] = 0x00; - debug_msg(" -- %d on %d -- ", cb->get_ext(), data[ __TIMESLICE_PLACE__ ] ); - __send_to_cb__( __build_cb_package__( ext, port, __CB_BYE__, - ( char * )data, cb->get_msg_id(), __CB_BUFFER_SIZE__ - __VZ_HEADER_OFFSET__, write_buffer ) ); - debug_msg( "-- Trying -- Negando pedido de invite << Busy Here >> --" ); - set_status( cb->sip->status, sip_idle ); + // tratar sip }break; } }break;