<<< Date Index >>>     <<< Thread Index >>>

Re: ipv6 broken



On Sun, Dec 28, 2003 at 01:36:48AM +0000, Patrick Welche wrote:
> @@ -151,23 +198,23 @@
>  
>  #ifdef USE_SASL2
>    size = sizeof (local);
> -  if (getsockname (conn->fd, &local, &size)){
> +  if (getsockname (conn->fd, (struct sockaddr *)&local, &size)){
>      dprint (1, (debugfile, "mutt_sasl_client_new: getsockname for local 
> failed\n"));
>      return -1;
>    }
>    else 
> -  if (iptostring(&local, size, iplocalport, IP_PORT_BUFLEN) != SASL_OK){
> +  if (iptostring((struct sockaddr *)&local, local.ss_len, iplocalport, 
> IP_PORT_BUFLEN) != SASL_OK){

What's wrong with size here?  ss_len is non-standard and thus not availlable
on all platforms.

So I propose to go back to size?  Do you see a problem with it?

Index: mutt_sasl.c
===================================================================
RCS file: /home/roessler/cvs/mutt/mutt_sasl.c,v
retrieving revision 3.5
diff -u -r3.5 mutt_sasl.c
--- mutt_sasl.c 29 Dec 2003 11:37:41 -0000      3.5
+++ mutt_sasl.c 30 Dec 2003 10:12:03 -0000
@@ -203,7 +203,7 @@
     return -1;
   }
   else 
-  if (iptostring((struct sockaddr *)&local, local.ss_len, iplocalport, 
IP_PORT_BUFLEN) != SASL_OK){
+  if (iptostring((struct sockaddr *)&local, size, iplocalport, IP_PORT_BUFLEN) 
!= SASL_OK){
     dprint (1, (debugfile, "mutt_sasl_client_new: iptostring for local 
failed\n"));
     return -1;
   }
@@ -214,7 +214,7 @@
     return -1;
   }
   else 
-  if (iptostring((struct sockaddr *)&remote, remote.ss_len, ipremoteport, 
IP_PORT_BUFLEN) != SASL_OK){
+  if (iptostring((struct sockaddr *)&remote, size, ipremoteport, 
IP_PORT_BUFLEN) != SASL_OK){
     dprint (1, (debugfile, "mutt_sasl_client_new: iptostring for remote 
failed\n"));
     return -1;
   }

Robert

-- 
Robert Schiele                  Tel.: +49-621-181-2517
Dipl.-Wirtsch.informatiker      mailto:rschiele@xxxxxxxxxxxxxxx

Attachment: pgpLChla8ogln.pgp
Description: PGP signature