[Freeswitch-dev] freeswitch development question (memory allocation?)

Apostolos Pantsiopoulos regs at kinetix.gr
Thu Jan 29 04:40:11 PST 2009


I have the code below :

struct radacct_thread_handle {
        switch_core_session_t *session;
        switch_mutex_t *mutex;
        switch_thread_cond_t *cond;
};

static switch_status_t my_on_routing(switch_core_session_t *session){

        switch_thread_t *thread;
        switch_threadattr_t *thd_attr = NULL;     

        switch_memory_pool_t *pool;

        struct radacct_thread_handle *thread_params = NULL;
       
        pool = switch_core_session_get_pool(session);     

        thread_params->session = session;
       
        ...
       
}

when the program reaches the last line (thread_params->session = session;)
I get a core dump. Is this a memory allocation error? Is it because I am 
making
use of the wrong pool? Please enlighten me because I am not an experienced c
programmer, and I am struggling to get familiar with the FS API.

-- 
-------------------------------------------
Apostolos Pantsiopoulos
Kinetix Tele.com R & D
email: regs at kinetix.gr
------------------------------------------- 




More information about the Freeswitch-dev mailing list