Re: debug
Esteban Cacavelos <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
Thanks for the reply. Yes, that was the problem. If i use gwlib functions to manage threads it works properly. Anyway, i would like to know why this happens. 2009/12/28 Andreas Fink <[email protected]> > you should not use pthread_create but the kannel gwlib functions to create > threads. I presume the thread has no way to find the console. Thats the > additional stuff the kannel gwlib sets up for you. > > On 28.12.2009, at 15:45, Esteban Cacavelos wrote: > > Hi there, i have the following problem: > > i am trying to get information about strings through octstr_dum function > but the function never returns. > > the call is made from a thread that is created in the main program. > > > > int main (int argc, char *argv[]) > { > > Octstr *a; > > int cf_index; > > pthread_t trhdReadBD; > > gwlib_init(); > a = octstr_format("sdfdsf"); > > octstr_dump(a, 0); /*that works correctly*/ > > > pthread_create (&trhdReadBD, NULL, &vo_ptrReadBD,NULL); > pthread_join (trhdReadBD, NULL); > > > return 0; > } > > void *vo_ptrReadBD(void *unused){ > > Octstr *string > > > > string = octstr_format("sdfdsf"); > > /*the string is correctly charged*/ > printf ("the string is : %s",octstr_get_cstr(string) ); > > octstr_dump(string, 0);/*this doesn't work correctly*/ > > } > > Thanks ! > > > > > -- Esteban L. Cacavelos de Amoriza Cel: 0981 220 429