[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: smtpserver dying when using specific PARAM BindAddress



On Fri, Aug 29, 2003 at 12:01:47PM -0300, Mariano Absatz wrote:
> Hi again...
> 
> well I couldn't solve it by myself... but at least I think I know where the 
> problem lies ("geographically" I mean, not logically).
...
> Now I started with the fresh smtpserver.conf, and started doing changes 
> from top to bottom, the first one being the specific IP address:
> PARAM BindAddress         [192.168.1.81]
...
> Now, my C knowledge is really limited and I don't know the code, but maybe 
> the realloc at line 224 of cfgread.c is a good place to start... I dunno.
> 
> Here's a cutout from "cvs diff -u -r 1.45 -r 1.46 cfgread.c" 
> Maybe this went wrong somehow?

  Yes.  That indexed assignment should be to:

	bindaddrs[ bindaddrs_count -1 ] = 

  Oops..  I keep making this same mistake every so often :-(

> @@ -211,8 +212,15 @@
>        if (bindport != 0 && bindport != 0xFFFFU)
>         bindport_set = 1;
>      } else if (cistrcmp(name, "BindAddress") == 0 && param1) {
> -       called_getbindaddr=1;
> -       bindaddr_set = !zgetbindaddr(param1,&bindaddr);
> +      called_getbindaddr=1;
> +      if (!zgetbindaddr(param1,&bindaddr)) {
> +       bindaddrs_count += 1;
> +       bindaddrs = realloc( bindaddrs, sizeof(Usockaddr) * bindaddrs_count 
> );
> +       if (!bindaddrs)
> +         bindaddrs_count = 0;
> +       else
> +         bindaddrs[ bindaddrs_count ] = bindaddr;
> +      }
>      }
>  
>      /* SMTP Protocol limit & policy tune options */
> 
> TIA.
> --
> Mariano Absatz - El Baby
> mailto:baby@baby.com.ar
-- 
/Matti Aarnio	<mea@nic.funet.fi>
-
To unsubscribe from this list: send the line "unsubscribe zmailer" in
the body of a message to majordomo@nic.funet.fi