Modularizando o src

Dependencies:   EALib EthernetInterface_vz mbed-rtos mbed

Fork of header_main_colinas_V0-20-09-14 by VZTECH

sip_manager.cpp

Committer:
klauss
Date:
2014-11-24
Revision:
74:81c47fff88a5
Child:
81:3656f00ab3db

File content as of revision 74:81c47fff88a5:

#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 );
}