![](/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
sip_manager.cpp
- Committer:
- klauss
- Date:
- 2014-12-30
- Revision:
- 82:f55d13babca0
- Parent:
- 81:3656f00ab3db
- Child:
- 121:ee02790d00b7
File content as of revision 82:f55d13babca0:
#include "sip_manager.h" int sip_manager( Vector * v_cb ){ static int sip_index = 0; if( v_cb != NULL ){ if( v_cb->size() > 0 ){ if( sip_index >= v_cb->size() ) sip_index = 0; }else return 0; Call_Box * cb = (Call_Box * )v_cb->get_element( sip_index ); /* Retorna = 0 :: ok < 0 :: tive problemas > 0 :: devo remover essa call do vetor de calls */ int returned_value = 0; //FIXME pensar em ouvir todos os cbx que estiverem em ligacao apenas, sao poucos //if( cb->status == cb_on_call || cb->status == cb_idle ){ if( cb->status == cb_on_call ){ returned_value = cb->listen_SIP_server(); } sip_index++; return( returned_value ); } return( -1 ); }