partysip-dev
[Top][All Lists]
Advanced

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

Re: [Partysip-dev] compiling partysip


From: Ralf Mahlo
Subject: Re: [Partysip-dev] compiling partysip
Date: Thu, 16 May 2002 11:04:33 +0200

Aymeric Moizard wrote:

> Let me give you more informations:
>
> The behavior that I'm expecting is:
>  If no remote socket is found, the SECOND sendto call
>  returns ECONNREFUSED.
>
> On linux, I have the following behavior:
>  connect + sendto  <- stupid, but works fine  <-- doesn't work on Solaris 2.6
>  connect + send    <- better, and works fine
>  sendto only       <- never returns ECONNREFUSED.

Yes, connect + send works fine (how I proposed as second solution...) .  :)

>
>
> As you said below, the rfc2543 recommands to use connect + send, but
> the latest draft appears to bypass this information.
>
> My last proposal is to keep the old behavior (replacing the sendto by
> send, but keeping the connect call).
>
> Just to make sure? when all of you get this error, are you sure you are
> sending the message to a remote IP/port where a socket is listening???
>
> Can you try this code: (with send instead of sendto)
>
>   connect(sock,(struct sockaddr *) &addr,sizeof(addr));
>   if (0  > send (sock, (const void*) buf, strlen (buf), 0))
>
> Let me know if you still get a network error or a wrong behavior
> even if a remote application is listening.
>
> Thanks
> Aymeric
>
> > Doesn't RFC 2543 (which is deprecated..?) recommand to use connect() for 
> > UDP as well?
> > Though I do not find that recommandation anymore in the new bis-09 draft, I 
> > believe
> > using send() function should be the solution...
> > Any comment?
> >
> > Regards,
> > Tim Na
> >
> > > >
> > > >   But I write the simple UDP client which send "HELLO
> > > > MSG" to port 5060 and it is working without any
> > > > problem.
> > > >
> > > > Can u guys help in this.
> > > >
> > > > Jayesh
> > > >
> > > > --- Aymeric Moizard <address@hidden> wrote:
> > > > >
> > > > >
> > > > > 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
> > > >
> > > > __________________________________________________
> > > > Do You Yahoo!?
> > > > LAUNCH - Your Yahoo! Music Experience
> > > > http://launch.yahoo.com
> > > >
> > > > _______________________________________________
> > > > 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
> > >
> >
> > _______________________________________________
> > 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]