[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: RFC: Dillo update to 0.7.2
On Sun, May 04, 2003 at 07:08:52PM +0200, Damien Couderc wrote:
> On Sun, 4 May 2003 15:25:32 +0200
> Daniel Hartmeier <daniel@benzedrine.cx> wrote:
>
> > On Wed, Apr 30, 2003 at 04:13:36PM +0200, Damien Couderc wrote:
> >
> > > I'll check it but next time think to send a diff because it's
> > > easier for us to check.
> >
> > Works fine on macppc, including IPv6/v4 and name resolution, with
> > the new patches. Clever feature, text selection :)
>
> $OpenBSD: patch-src_IO_http_c,v 1.6 2003/04/28 18:20:53 couderc Exp $
> --- src/IO/http.c.orig Tue Mar 4 20:34:59 2003
> +++ src/IO/http.c Wed Apr 23 20:24:09 2003
> @@ -43,7 +43,6 @@
> (a_Web_valid(web) && (!(root) || (web)->flags & WEB_RootUrl)) ? \
> a_Interface_msg((web)->bw, fmt) : (root)
>
> -#define DEBUG_LEVEL 5
> #include "../debug.h"
>
>
> @@ -246,7 +245,7 @@ static int Http_connect_socket(ChainLink
> {
> gint status;
> #ifdef ENABLE_IPV6
> - struct sockaddr_storage name;
> + struct sockaddr_in6 name;
> #else
> struct sockaddr_in name;
> #endif
> @@ -276,6 +275,7 @@ static int Http_connect_socket(ChainLink
> {
> struct sockaddr_in *sin = (struct sockaddr_in *)&name;
> sin->sin_family = dh->af;
> + sin->sin_len = sizeof(struct sockaddr_in);
> sin->sin_port = S->port ? htons(S->port) :
> htons(DILLO_URL_HTTP_PORT);
> memcpy(&sin->sin_addr, dh->data, dh->alen);
> if (a_Web_valid(S->web) && (S->web->flags & WEB_RootUrl))
> @@ -288,6 +288,7 @@ static int Http_connect_socket(ChainLink
> char buf[128];
> struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)&name;
> sin6->sin6_family = dh->af;
> + sin6->sin6_len = sizeof(struct sockaddr_in6);
> sin6->sin6_port = S->port ? htons(S->port) :
> htons(DILLO_URL_HTTP_PORT);
> memcpy(&sin6->sin6_addr, dh->data, dh->alen);
>
> hmm, shouldn't sin6->sin6_len receive sizeof(struct sockaddr_in6)
> instead of socket_len ?
Why? socket_len is set correctly inside the different case labels.
Or am I missing something?
Cheers,
Jon
>
> Damien