Modularizando o src
Dependencies: EALib EthernetInterface_vz mbed-rtos mbed
Fork of header_main_colinas_V0-20-09-14 by
Diff: sip_manager.cpp
- Revision:
- 74:81c47fff88a5
- Child:
- 81:3656f00ab3db
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sip_manager.cpp Mon Nov 24 16:43:16 2014 +0000 @@ -0,0 +1,25 @@ +#include "sip_manager.h" + +int sip_manager( Vector * v_cb ){ + static int index = 0; + if( v_cb != NULL ){ + if( v_cb->size() > 0 ){ + if( index >= v_cb->size() ) index = 0; + }else return 0; + Call_Box * cb = (Call_Box * )v_cb->get_element( index ); + /* Retorna + = 0 :: ok + < 0 :: tive problemas + > 0 :: devo remover essa call do vetor de calls + */ + int returned_value = 0; + + if( cb->status == cb_on_call || cb->status == cb_idle ){ + //debug_msg(""); + returned_value = cb->listen_SIP_server(); + } + index++; + return( returned_value ); + } + return( -1 ); +} \ No newline at end of file