[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Partysip-dev] Re: partysip compiling
From: |
Tim Na |
Subject: |
[Partysip-dev] Re: partysip compiling |
Date: |
Fri, 17 May 2002 16:15:10 +0900 |
Hi, Ralf.
I found the reason for the bus error (or seg fault).
in pspm_uap_init() function, core->uap->uap_plugins wasn't initilized to NULL.
So I added the line for the initialization.
int pspm_uap_init (pspm_uap_t **pspm)
{
int i;
(*pspm) = (pspm_uap_t*) smalloc(sizeof(pspm_uap_t));
if (*pspm==NULL) return -1;
i = module_init(& ((*pspm)->module), MOD_THREAD, "uap");
if (i!=0) goto mui_error1;
(*pspm)->uap_plugins = NULL; /* Added by Tim Na */
/* (*pspm)->uap_pending = NULL; */
(*pspm)->uas_request = (fifo_t*)smalloc(sizeof(fifo_t));
if ((*pspm)->uas_request==NULL) goto mui_error2;
After this, I wondered how this code worked in Linux machine without any
problem. (Red Hat 7.1)
As I traced the fuction, amazingly, after the smallloc of (*pspm), uap_plugins
was initialized to NULL.!!!
I wonder how that magic happened there without explicit assignment... :-(
(perhaps I wasn't paying attention during the lecture in pointers..)
Any comment on this?
Anyway, it works now.. : )
----- Original Message -----
From: "Ralf Mahlo" <address@hidden>
To: "Tim Na" <address@hidden>
Sent: Friday, May 17, 2002 2:47 PM
Subject: partysip compiling
> Hi Tim Na,
>
> thank you very much for sending me your changes...
> Today I'll start to look deeper into the source code. I think, there could be
> a problem with
> "ADD_ELEMENT" , defined in /ppl/include/ppl.h , because the bus error
> happens, when 'first_element
> != NULL' ... I'll check this...
>
> Regards, Ralf
>
> P.S.: Are you directly from Korea?
What do you mean "directly"? I am working in Korea right now if that is what
you are asking. : )
>
>
- [Partysip-dev] Re: partysip compiling,
Tim Na <=