partysip-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Partysip-dev] compiling partysip


From: Tim Na
Subject: Re: [Partysip-dev] compiling partysip
Date: Thu, 16 May 2002 17:06:46 +0900

Hi, 
I am trying to run partysip with Solaris 2.7.
I have changed code in pplsocket.h so that it would compile as you suggested.
It compiles fine, but I get a bus error as Ralf said. ( I am not sure if this 
is the same thing as he got.)
I gdbed core file and it happened in  psp_core2.c while loading the plugin as 
shown below.


Reading symbols from /usr/local/lib/partysip/libpsp_syntax.so...done.
Reading symbols from /usr/local/lib/partysip/libpsp_filter.so...done.
Reading symbols from /usr/local/lib/partysip/libpsp_auth.so...done.
#0  0x2abb0 in psp_core_add_uap_plugin (plug=0x45158)
    at ../../partysip-0.4.3/src/psp_core2.c:78
78        ADD_ELEMENT(core->uap->uap_plugins, plug);
(gdb) l
73        return 0;
74      }
75
76      int  psp_core_add_uap_plugin(uap_plugin_t *plug)
77      {
78        ADD_ELEMENT(core->uap->uap_plugins, plug);
79        return 0;
80      }
81
82      int  psp_core_load_slp_plugin(slp_plugin_t **p, psp_plugin_t *psp)
(gdb) p plug
$1 = (uap_plugin_t *) 0x45158
(gdb) p core
$2 = (psp_core_t *) 0x431a8
(gdb) p core->uap
$3 = (pspm_uap_t *) 0x441f0
(gdb) p core->uap->uap_plugins
$4 = (uap_plugin_t *) 0x5552493e
(gdb) 
$5 = (uap_plugin_t *) 0x5552493e
(gdb) q


Not sure where that bus error happened...
I need to look into it more closely but just wondered if anyone has solved this 
issue.
Thanks.

Regards,
Tim Na


----- Original Message ----- 
From: "Aymeric Moizard" <address@hidden>
To: "Ralf Mahlo" <address@hidden>
Cc: <address@hidden>
Sent: Wednesday, May 15, 2002 5:19 PM
Subject: Re: [Partysip-dev] compiling partysip


> 
> 
> On Wed, 15 May 2002, Ralf Mahlo wrote:
> 
> > Hi!
> > I'm working with Solaris 2.6 . First when I tried to compile I've got the 
> > error: in pplsocket.c ,
> > function ppl_gethostbyname : too much arguments for gethostbyname_r (in 
> > Solaris there are only 5
> > arguments, don't know about other systems...). However, I changed 
> > result_buffer with result and
> > deleted the old (5.) '&result'. (maybe that's wrong...)
> 
> ... yes, this is probably wrong.
> gethostbyname is a reentrant method: this is why I assume 'result' should
> be a presiously allocated element and not a pointer to a non allocated
> 'struct hostent'
> 
> Could you try fixing it this way: (
> 
> > PPL_DECLARE(int) ppl_gethostbyname(struct sockaddr_in *sin, char *hostname, 
> > int port)
> > {
> > //  struct hostent result_buffer;
> >   char tmp[GETHOSTBYNAME_BUFLEN];
> >   struct hostent *result;    <<- replace with 'struct hostent result'
> >   int my_error;
> >
> >   gethostbyname_r(hostname,       /* the FQDN */
> >     result,  /* the result buffer */     <<- replace with '&result'
> >     tmp,
> >     GETHOSTBYNAME_BUFLEN - 1,
> > //    &result,
> >     &my_error);
> >
> >   if (!result)
> >     return my_error;
> > }
> >
> > After that I can compile the program completely, but get the warning : in 
> > psp_plugin.c , function
> > psp_plugin_load : warning: ANSI forbids assignment between function pointer 
> > and `void *' for the
> > lines 69, 77 and 85 ...
> 
> This is also true on linux... partysip is not ANSI, but nearly... If
> somebody know THE proper way to get rid of this warning let me know...
> 
> > I can run the program, but while loading the authentication plugin, I get a 
> > bus error...
> 
> as you (the method gethostbyname) are wrinting in a non-allocated buffer,
> this seems normal to get something like a bus error...
> But of course, it may come from somewhere else... Let me know if the
> change I propose make it work.
> 
> > Another question to the partysip.conf file: is it necessary to change the 
> > content of the file with
> > my own data or does it work as well with the current content?? (okay, when 
> > I want to use it, it must
> > be changed, but for now (only for testing, if it works) ?)
> 
> The included file 'partysip.conf' is by default given with authentication
> on. But of course, the database of users does not contains your user. So
> any request is expected to get a 401 or 407 response. If you change that
> line (authentication = off), things should work.
> 
> Aymeric
> 
> > Regards, Ralf
> >
> >
> > _______________________________________________
> > Partysip-dev mailing list
> > address@hidden
> > http://mail.freesoftware.fsf.org/mailman/listinfo/partysip-dev
> >
> 
> 
> _______________________________________________
> Partysip-dev mailing list
> address@hidden
> http://mail.freesoftware.fsf.org/mailman/listinfo/partysip-dev
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]