Commit 73be707d 73be707da183c2ed8d59e7da781790c8ee759d1d by Sergey Poznyakoff

Bugfixes.

* libmailutils/cfg/parser.y (STRTONUM, STRxTONUM)
(GETSNUM, GETUNUM): Remove unused arguments.
* libmailutils/stream/tcp.c (mu_tcp_stream_create_from_sa): Take
care not to destroy sockaddr arguments in case of failure.
1 parent d1e06eeb
...@@ -1387,7 +1387,7 @@ subsection. ...@@ -1387,7 +1387,7 @@ subsection.
1387 @node General Server Configuration 1387 @node General Server Configuration
1388 @subsubsection General Server Configuration 1388 @subsubsection General Server Configuration
1389 @cindex server configuration, general 1389 @cindex server configuration, general
1390 @subsubheading Syntax 1390 @* Syntax:
1391 @smallexample 1391 @smallexample
1392 # @r{Set daemon mode.} 1392 # @r{Set daemon mode.}
1393 mode @samp{inetd|daemon}; 1393 mode @samp{inetd|daemon};
...@@ -1403,7 +1403,7 @@ port @var{portspec}; ...@@ -1403,7 +1403,7 @@ port @var{portspec};
1403 timeout @var{time}; 1403 timeout @var{time};
1404 @end smallexample 1404 @end smallexample
1405 1405
1406 @subsubheading Description 1406 @* Description:
1407 These statements configure general server-related issues. 1407 These statements configure general server-related issues.
1408 1408
1409 @deffn {Configuration} mode @var{string}; 1409 @deffn {Configuration} mode @var{string};
...@@ -1476,7 +1476,7 @@ requests during @var{time} seconds, the child process terminates. ...@@ -1476,7 +1476,7 @@ requests during @var{time} seconds, the child process terminates.
1476 @subsubsection Server Statement 1476 @subsubsection Server Statement
1477 @cindex server statement 1477 @cindex server statement
1478 @kwindex server 1478 @kwindex server
1479 @subsubheading Syntax 1479 @* Syntax:
1480 @smallexample 1480 @smallexample
1481 server @var{ipaddr}[:@var{port}] @{ 1481 server @var{ipaddr}[:@var{port}] @{
1482 # @r{Run this server as a single process.} 1482 # @r{Run this server as a single process.}
...@@ -1490,7 +1490,7 @@ server @var{ipaddr}[:@var{port}] @{ ...@@ -1490,7 +1490,7 @@ server @var{ipaddr}[:@var{port}] @{
1490 @} 1490 @}
1491 @end smallexample 1491 @end smallexample
1492 1492
1493 @subsubheading Description 1493 @* Description:
1494 The @code{server} block statement configures a single TCP or UDP 1494 The @code{server} block statement configures a single TCP or UDP
1495 server. It takes effect only in daemon mode (@pxref{server mode}). 1495 server. It takes effect only in daemon mode (@pxref{server mode}).
1496 The argument to this statement specifies the IP address, and, 1496 The argument to this statement specifies the IP address, and,
...@@ -2427,7 +2427,7 @@ The actual escape character may be changed by setting the value of ...@@ -2427,7 +2427,7 @@ The actual escape character may be changed by setting the value of
2427 @end menu 2427 @end menu
2428 2428
2429 @node Quitting Compose Mode 2429 @node Quitting Compose Mode
2430 @subsubheading Quitting Compose Mode 2430 @subsubsection Quitting Compose Mode
2431 @kyindex ~., mail escape 2431 @kyindex ~., mail escape
2432 @kyindex ~x, mail escape 2432 @kyindex ~x, mail escape
2433 2433
...@@ -2450,7 +2450,7 @@ when mail variable @code{ignore} is set. In this case, you can use ...@@ -2450,7 +2450,7 @@ when mail variable @code{ignore} is set. In this case, you can use
2450 @samp{~x} escape to achieve the same effect. 2450 @samp{~x} escape to achieve the same effect.
2451 2451
2452 @node Getting Help on Compose Escapes 2452 @node Getting Help on Compose Escapes
2453 @subsubheading Getting Help on Compose Escapes: ~? 2453 @subsubsection Getting Help on Compose Escapes: ~?
2454 @kyindex ~?, mail escape 2454 @kyindex ~?, mail escape
2455 2455
2456 The @samp{~?} escape prints on screen a brief summary of the available 2456 The @samp{~?} escape prints on screen a brief summary of the available
...@@ -2458,7 +2458,7 @@ compose escapes. @emph{Please note}, that @samp{~h} escape prompts ...@@ -2458,7 +2458,7 @@ compose escapes. @emph{Please note}, that @samp{~h} escape prompts
2458 for changing the header values, and does @emph{not} give help. 2458 for changing the header values, and does @emph{not} give help.
2459 2459
2460 @node Editing the Message 2460 @node Editing the Message
2461 @subsubheading Editing the Message: ~e and ~v 2461 @subsubsection Editing the Message: ~e and ~v
2462 @kyindex ~e, mail escape 2462 @kyindex ~e, mail escape
2463 @kyindex ~v, mail escape 2463 @kyindex ~v, mail escape
2464 2464
...@@ -2474,7 +2474,7 @@ the message with headers included, thus allowing you to change ...@@ -2474,7 +2474,7 @@ the message with headers included, thus allowing you to change
2474 the headers as well. 2474 the headers as well.
2475 2475
2476 @node Modifying the Headers 2476 @node Modifying the Headers
2477 @subsubheading Modifying the Headers: ~h, ~t, ~c, ~b, ~s 2477 @subsubsection Modifying the Headers: ~h, ~t, ~c, ~b, ~s
2478 2478
2479 To add new addresses to the list of message recipients, use @samp{~t} 2479 To add new addresses to the list of message recipients, use @samp{~t}
2480 command, e.g.: 2480 command, e.g.:
...@@ -2498,7 +2498,7 @@ you with the values of @code{To}, @code{Cc}, @code{Bcc}, and ...@@ -2498,7 +2498,7 @@ you with the values of @code{To}, @code{Cc}, @code{Bcc}, and
2498 commands. 2498 commands.
2499 2499
2500 @node Enclosing Another Message 2500 @node Enclosing Another Message
2501 @subsubheading Enclosing Another Message: ~m and ~M 2501 @subsubsection Enclosing Another Message: ~m and ~M
2502 @kyindex ~m, mail escape 2502 @kyindex ~m, mail escape
2503 @kyindex ~M, mail escape 2503 @kyindex ~M, mail escape
2504 2504
...@@ -2515,7 +2515,7 @@ In both cases, the contents of @code{indentprefix} mail variable is ...@@ -2515,7 +2515,7 @@ In both cases, the contents of @code{indentprefix} mail variable is
2515 prepended to each line enclosed. 2515 prepended to each line enclosed.
2516 2516
2517 @node Adding a File to the Message 2517 @node Adding a File to the Message
2518 @subsubheading Adding a File to the Message: ~r and ~d 2518 @subsubsection Adding a File to the Message: ~r and ~d
2519 2519
2520 To append the contents of file @var{filename} to the message, type 2520 To append the contents of file @var{filename} to the message, type
2521 2521
...@@ -2537,7 +2537,7 @@ The @samp{~d} escape is a shorthand for ...@@ -2537,7 +2537,7 @@ The @samp{~d} escape is a shorthand for
2537 @end smallexample 2537 @end smallexample
2538 2538
2539 @node Printing And Saving the Message 2539 @node Printing And Saving the Message
2540 @subsubheading Printing And Saving the Message 2540 @subsubsection Printing And Saving the Message
2541 @kyindex ~p, mail escape 2541 @kyindex ~p, mail escape
2542 @kyindex ~w, mail escape 2542 @kyindex ~w, mail escape
2543 2543
...@@ -2547,7 +2547,7 @@ an arbitrary file using @samp{~w} escape. It takes the filename as its ...@@ -2547,7 +2547,7 @@ an arbitrary file using @samp{~w} escape. It takes the filename as its
2547 argument. 2547 argument.
2548 2548
2549 @node Signing the Message 2549 @node Signing the Message
2550 @subsubheading Signing the Message: ~a and ~A 2550 @subsubsection Signing the Message: ~a and ~A
2551 @kyindex ~a, mail escape 2551 @kyindex ~a, mail escape
2552 @kyindex ~A, mail escape 2552 @kyindex ~A, mail escape
2553 2553
...@@ -2560,7 +2560,7 @@ variable @code{Sign}, and use @samp{~A} escape to insert it into ...@@ -2560,7 +2560,7 @@ variable @code{Sign}, and use @samp{~A} escape to insert it into
2560 the message. 2560 the message.
2561 2561
2562 @node Printing Another Message 2562 @node Printing Another Message
2563 @subsubheading Printing Another Message: ~f and ~F 2563 @subsubsection Printing Another Message: ~f and ~F
2564 @kyindex ~f, mail escape 2564 @kyindex ~f, mail escape
2565 @kyindex ~F, mail escape 2565 @kyindex ~F, mail escape
2566 2566
...@@ -2573,14 +2573,14 @@ lists to select headers to be displayed, whereas the latter prints ...@@ -2573,14 +2573,14 @@ lists to select headers to be displayed, whereas the latter prints
2573 all headers. 2573 all headers.
2574 2574
2575 @node Inserting Value of a Mail Variable 2575 @node Inserting Value of a Mail Variable
2576 @subsubheading Inserting Value of a Mail Variable: ~i 2576 @subsubsection Inserting Value of a Mail Variable: ~i
2577 @kyindex ~i, mail escape 2577 @kyindex ~i, mail escape
2578 2578
2579 The @samp{~i} escape enters the value of the named mail variable into 2579 The @samp{~i} escape enters the value of the named mail variable into
2580 the body of the message being composed. 2580 the body of the message being composed.
2581 2581
2582 @node Executing Other Mail Commands 2582 @node Executing Other Mail Commands
2583 @subsubheading Executing Other Mail Commands: ~: and ~- 2583 @subsubsection Executing Other Mail Commands: ~: and ~-
2584 @kyindex ~:, mail escape 2584 @kyindex ~:, mail escape
2585 @kyindex ~-, mail escape 2585 @kyindex ~-, mail escape
2586 2586
...@@ -2603,7 +2603,7 @@ the only commands that can reasonably be used are: @code{alias}, ...@@ -2603,7 +2603,7 @@ the only commands that can reasonably be used are: @code{alias},
2603 @code{unalias}, @code{alternate}, @code{set}, and @code{unset}. 2603 @code{unalias}, @code{alternate}, @code{set}, and @code{unset}.
2604 2604
2605 @node Executing Shell Commands 2605 @node Executing Shell Commands
2606 @subsubheading Executing Shell Commands: ~! and ~| 2606 @subsubsection Executing Shell Commands: ~! and ~|
2607 @kyindex ~!, mail escape 2607 @kyindex ~!, mail escape
2608 @kyindex ~|, mail escape 2608 @kyindex ~|, mail escape
2609 2609
...@@ -2693,7 +2693,7 @@ commands the user enters. ...@@ -2693,7 +2693,7 @@ commands the user enters.
2693 2693
2694 @c ********************************** 2694 @c **********************************
2695 @node Quitting the Program 2695 @node Quitting the Program
2696 @subsubheading Quitting the Program 2696 @subsubsection Quitting the Program
2697 2697
2698 Following commands quit the program: 2698 Following commands quit the program:
2699 2699
...@@ -2716,7 +2716,7 @@ upon. ...@@ -2716,7 +2716,7 @@ upon.
2716 Typing EOF (@samp{C-D}) alone is equivalent to @samp{quit}. 2716 Typing EOF (@samp{C-D}) alone is equivalent to @samp{quit}.
2717 2717
2718 @node Obtaining Online Help 2718 @node Obtaining Online Help
2719 @subsubheading Obtaining Online Help 2719 @subsubsection Obtaining Online Help
2720 @kyindex help, mail command 2720 @kyindex help, mail command
2721 @kyindex ?, mail command 2721 @kyindex ?, mail command
2722 @kyindex list, mail command 2722 @kyindex list, mail command
...@@ -2744,7 +2744,7 @@ Display program warranty statement. ...@@ -2744,7 +2744,7 @@ Display program warranty statement.
2744 @end table 2744 @end table
2745 2745
2746 @node Moving Within a Mailbox 2746 @node Moving Within a Mailbox
2747 @subsubheading Moving Within a Mailbox 2747 @subsubsection Moving Within a Mailbox
2748 @kyindex next, mail command 2748 @kyindex next, mail command
2749 @kyindex prev, mail command 2749 @kyindex prev, mail command
2750 2750
...@@ -2762,7 +2762,7 @@ Move to the previous message. ...@@ -2762,7 +2762,7 @@ Move to the previous message.
2762 @end table 2762 @end table
2763 2763
2764 @node Changing mailbox/directory 2764 @node Changing mailbox/directory
2765 @subsubheading Changing Mailbox/Directory 2765 @subsubsection Changing Mailbox/Directory
2766 @kyindex chdir, mail command 2766 @kyindex chdir, mail command
2767 @kyindex file, mail command 2767 @kyindex file, mail command
2768 @kyindex folder, mail command 2768 @kyindex folder, mail command
...@@ -2791,7 +2791,7 @@ name followed by the summary information regarding it, e.g.: ...@@ -2791,7 +2791,7 @@ name followed by the summary information regarding it, e.g.:
2791 @end table 2791 @end table
2792 2792
2793 @node Controlling Header Display 2793 @node Controlling Header Display
2794 @subsubheading Controlling Header Display 2794 @subsubsection Controlling Header Display
2795 @kyindex discard, mail command 2795 @kyindex discard, mail command
2796 @kyindex ignore, mail command 2796 @kyindex ignore, mail command
2797 @kyindex retain, mail command 2797 @kyindex retain, mail command
...@@ -2820,7 +2820,7 @@ arguments, this command prints the contents of retained list. ...@@ -2820,7 +2820,7 @@ arguments, this command prints the contents of retained list.
2820 @end table 2820 @end table
2821 2821
2822 @node Displaying Information 2822 @node Displaying Information
2823 @subsubheading Displaying Information 2823 @subsubsection Displaying Information
2824 @kyindex =, mail command 2824 @kyindex =, mail command
2825 @kyindex headers, mail command 2825 @kyindex headers, mail command
2826 @kyindex from, mail command 2826 @kyindex from, mail command
...@@ -2872,7 +2872,7 @@ Displays current mailbox summary. E.g.: ...@@ -2872,7 +2872,7 @@ Displays current mailbox summary. E.g.:
2872 @end table 2872 @end table
2873 2873
2874 @node Displaying Messages 2874 @node Displaying Messages
2875 @subsubheading Displaying Messages 2875 @subsubsection Displaying Messages
2876 @kyindex print, mail command 2876 @kyindex print, mail command
2877 @kyindex type, mail command 2877 @kyindex type, mail command
2878 @kyindex Print, mail command 2878 @kyindex Print, mail command
...@@ -2945,7 +2945,7 @@ Example: ...@@ -2945,7 +2945,7 @@ Example:
2945 @end table 2945 @end table
2946 2946
2947 @node Marking Messages 2947 @node Marking Messages
2948 @subsubheading Marking Messages 2948 @subsubsection Marking Messages
2949 @kyindex tag, mail command 2949 @kyindex tag, mail command
2950 @kyindex hold, mail command 2950 @kyindex hold, mail command
2951 @kyindex preserve, mail command 2951 @kyindex preserve, mail command
...@@ -2971,7 +2971,7 @@ does not override the effect of @code{delete} command. ...@@ -2971,7 +2971,7 @@ does not override the effect of @code{delete} command.
2971 @end table 2971 @end table
2972 2972
2973 @node Disposing of Messages 2973 @node Disposing of Messages
2974 @subsubheading Disposing of Messages 2974 @subsubsection Disposing of Messages
2975 @kyindex delete, mail command 2975 @kyindex delete, mail command
2976 @kyindex undelete, mail command 2976 @kyindex undelete, mail command
2977 @kyindex dt, mail command 2977 @kyindex dt, mail command
...@@ -2995,7 +2995,7 @@ prints the message, immediately following last deleted one. ...@@ -2995,7 +2995,7 @@ prints the message, immediately following last deleted one.
2995 @end table 2995 @end table
2996 2996
2997 @node Saving Messages 2997 @node Saving Messages
2998 @subsubheading Saving Messages 2998 @subsubsection Saving Messages
2999 @kyindex save, mail command 2999 @kyindex save, mail command
3000 @kyindex Save, mail command 3000 @kyindex Save, mail command
3001 @kyindex write, mail command 3001 @kyindex write, mail command
...@@ -3060,7 +3060,7 @@ deletion. ...@@ -3060,7 +3060,7 @@ deletion.
3060 @end table 3060 @end table
3061 3061
3062 @node Editing Messages 3062 @node Editing Messages
3063 @subsubheading Editing Messages 3063 @subsubsection Editing Messages
3064 @kyindex edit, mail command 3064 @kyindex edit, mail command
3065 @kyindex visual, mail command 3065 @kyindex visual, mail command
3066 3066
...@@ -3081,7 +3081,7 @@ Edits each message in @var{msglist} with the editor, specified in ...@@ -3081,7 +3081,7 @@ Edits each message in @var{msglist} with the editor, specified in
3081 @end table 3081 @end table
3082 3082
3083 @node Aliasing 3083 @node Aliasing
3084 @subsubheading Aliasing 3084 @subsubsection Aliasing
3085 @kyindex alias, mail command 3085 @kyindex alias, mail command
3086 @kyindex group, mail command 3086 @kyindex group, mail command
3087 @kyindex unalias, mail command 3087 @kyindex unalias, mail command
...@@ -3111,7 +3111,7 @@ alternate names is displayed. ...@@ -3111,7 +3111,7 @@ alternate names is displayed.
3111 @end table 3111 @end table
3112 3112
3113 @node Replying 3113 @node Replying
3114 @subsubheading Replying 3114 @subsubsection Replying
3115 @kyindex mail, mail command 3115 @kyindex mail, mail command
3116 @kyindex reply, mail command 3116 @kyindex reply, mail command
3117 @kyindex Reply, mail command 3117 @kyindex Reply, mail command
...@@ -3226,7 +3226,7 @@ Subject: Re: News ...@@ -3226,7 +3226,7 @@ Subject: Re: News
3226 @end smallexample 3226 @end smallexample
3227 3227
3228 @node Controlling Sender Fields 3228 @node Controlling Sender Fields
3229 @subsubheading Controlling Sender Fields 3229 @subsubsection Controlling Sender Fields
3230 @kyindex sender, mail command 3230 @kyindex sender, mail command
3231 @kyindex nosender, mail command 3231 @kyindex nosender, mail command
3232 3232
...@@ -3279,7 +3279,7 @@ Sender address is obtained from the envelope ...@@ -3279,7 +3279,7 @@ Sender address is obtained from the envelope
3279 @end smallexample 3279 @end smallexample
3280 3280
3281 @node Incorporating New Mail 3281 @node Incorporating New Mail
3282 @subsubheading Incorporating New Mail 3282 @subsubsection Incorporating New Mail
3283 @kyindex incorporate, mail command 3283 @kyindex incorporate, mail command
3284 3284
3285 The @code{incorporate} (@code{inc}) command incorporates newly arrived 3285 The @code{incorporate} (@code{inc}) command incorporates newly arrived
...@@ -3288,7 +3288,7 @@ before returning to @command{mail} command prompt if the variable ...@@ -3288,7 +3288,7 @@ before returning to @command{mail} command prompt if the variable
3288 @code{autoinc} is set. 3288 @code{autoinc} is set.
3289 3289
3290 @node Shell Escapes 3290 @node Shell Escapes
3291 @subsubheading Shell Escapes 3291 @subsubsection Shell Escapes
3292 @kyindex shell, mail command 3292 @kyindex shell, mail command
3293 @kyindex !, mail command 3293 @kyindex !, mail command
3294 3294
...@@ -4730,7 +4730,7 @@ its standard. ...@@ -4730,7 +4730,7 @@ its standard.
4730 @end menu 4730 @end menu
4731 4731
4732 @node Invoking Sieve 4732 @node Invoking Sieve
4733 @subsubheading Invoking @command{sieve} 4733 @subsubsection Invoking @command{sieve}
4734 4734
4735 The @command{sieve} invocation syntax is: 4735 The @command{sieve} invocation syntax is:
4736 4736
...@@ -4816,7 +4816,7 @@ Log all actions executed. See also @ref{Sieve Configuration, verbose}. ...@@ -4816,7 +4816,7 @@ Log all actions executed. See also @ref{Sieve Configuration, verbose}.
4816 @end table 4816 @end table
4817 4817
4818 @node Sieve Configuration 4818 @node Sieve Configuration
4819 @subsubheading Sieve Configuration 4819 @subsubsection Sieve Configuration
4820 4820
4821 The behavior of @command{sieve} is affected by the following 4821 The behavior of @command{sieve} is affected by the following
4822 configuration statements: 4822 configuration statements:
...@@ -4905,7 +4905,7 @@ executed. ...@@ -4905,7 +4905,7 @@ executed.
4905 @end deffn 4905 @end deffn
4906 4906
4907 @node Logging and Debugging 4907 @node Logging and Debugging
4908 @subsubheading Logging and debugging 4908 @subsubsection Logging and debugging
4909 4909
4910 The default behavior of @command{sieve} is to remain silent about 4910 The default behavior of @command{sieve} is to remain silent about
4911 anything except errors. However, it is sometimes necessary to see 4911 anything except errors. However, it is sometimes necessary to see
...@@ -4958,7 +4958,7 @@ This option causes @command{sieve} to output its diagnostics to ...@@ -4958,7 +4958,7 @@ This option causes @command{sieve} to output its diagnostics to
4958 the given syslog facility. 4958 the given syslog facility.
4959 4959
4960 @node Extending Sieve 4960 @node Extending Sieve
4961 @subsubheading Extending @command{sieve} 4961 @subsubsection Extending @command{sieve}
4962 4962
4963 The basic set of sieve actions, tests and comparators may be extended 4963 The basic set of sieve actions, tests and comparators may be extended
4964 using loadable extensions. Usual @code{require} mechanism is used for 4964 using loadable extensions. Usual @code{require} mechanism is used for
......
...@@ -381,7 +381,7 @@ Currently implemented directives are @code{include} and @code{searchpath}. ...@@ -381,7 +381,7 @@ Currently implemented directives are @code{include} and @code{searchpath}.
381 @end menu 381 @end menu
382 382
383 @node #include 383 @node #include
384 @subheading Sieve #include directive 384 @subsection Sieve #include directive
385 @kwindex #include, sieve 385 @kwindex #include, sieve
386 386
387 The @code{#include} directive reads in the contents of the given file. 387 The @code{#include} directive reads in the contents of the given file.
...@@ -401,7 +401,7 @@ If @var{filename} starts with a directory separator character ...@@ -401,7 +401,7 @@ If @var{filename} starts with a directory separator character
401 (@samp{/}) both forms have the same effect. 401 (@samp{/}) both forms have the same effect.
402 402
403 @node #searchpath 403 @node #searchpath
404 @subheading Sieve #searchpath directive 404 @subsection Sieve #searchpath directive
405 @kwindex #searchpath, sieve 405 @kwindex #searchpath, sieve
406 406
407 The @code{#searchpath} directive adds its argument to the list of 407 The @code{#searchpath} directive adds its argument to the list of
...@@ -939,7 +939,7 @@ header :contains ["X-Caffeine"] [""] @result{} true ...@@ -939,7 +939,7 @@ header :contains ["X-Caffeine"] [""] @result{} true
939 @var{header-names}(string-list) @ 939 @var{header-names}(string-list) @
940 @var{count}(number) 940 @var{count}(number)
941 @noindent 941 @noindent
942 @subsubheading Synopsis 942 @*Synopsis:
943 @smallexample 943 @smallexample
944 require "test-numaddr"; 944 require "test-numaddr";
945 @dots{} 945 @dots{}
...@@ -948,7 +948,7 @@ if numaddr @var{args} ...@@ -948,7 +948,7 @@ if numaddr @var{args}
948 @dots{} 948 @dots{}
949 @} 949 @}
950 @end smallexample 950 @end smallexample
951 @subsubheading Description 951 @*Description:
952 This test is provided as an example of loadable extension tests. You 952 This test is provided as an example of loadable extension tests. You
953 must use @samp{require "test-numaddr"} statement before actually using 953 must use @samp{require "test-numaddr"} statement before actually using
954 it. 954 it.
...@@ -973,7 +973,7 @@ If the tagged argument is not given, @samp{:over} is assumed. ...@@ -973,7 +973,7 @@ If the tagged argument is not given, @samp{:over} is assumed.
973 [:socket @var{unix-socket}(string)] @ 973 [:socket @var{unix-socket}(string)] @
974 [:user @var{name}(string)] @ 974 [:user @var{name}(string)] @
975 [:over | :under @var{limit}(string)] 975 [:over | :under @var{limit}(string)]
976 @subsubheading Synopsis 976 @*Synopsis:
977 @smallexample 977 @smallexample
978 require "test-spamd"; 978 require "test-spamd";
979 @dots{} 979 @dots{}
...@@ -984,7 +984,7 @@ if spamd @var{args} ...@@ -984,7 +984,7 @@ if spamd @var{args}
984 @} 984 @}
985 @end smallexample 985 @end smallexample
986 986
987 @subsubheading Description 987 @*Description:
988 This test is an interface to SpamAssassin filter. It connects to the 988 This test is an interface to SpamAssassin filter. It connects to the
989 @command{spamd} daemon using connection parameters specified by tagged 989 @command{spamd} daemon using connection parameters specified by tagged
990 arguments @code{:host} and @code{:port} (if the daemon is listening on 990 arguments @code{:host} and @code{:port} (if the daemon is listening on
...@@ -1021,7 +1021,7 @@ Comma-separated list of keywords, describing the spam checks that ...@@ -1021,7 +1021,7 @@ Comma-separated list of keywords, describing the spam checks that
1021 succeeded for this message. 1021 succeeded for this message.
1022 @end table 1022 @end table
1023 1023
1024 @subsubheading Example 1024 @*Example:
1025 @smallexample 1025 @smallexample
1026 request "test-spamd"; 1026 request "test-spamd";
1027 1027
...@@ -1036,7 +1036,7 @@ if spamd :host 127.0.0.1 :port 3333 ...@@ -1036,7 +1036,7 @@ if spamd :host 127.0.0.1 :port 3333
1036 @deftypefn Test {} list [@var{comparator}] [@var{match-type}] @ 1036 @deftypefn Test {} list [@var{comparator}] [@var{match-type}] @
1037 [ :delim @var{delimiters}(string) ] @ 1037 [ :delim @var{delimiters}(string) ] @
1038 @var{headers}(string-list) @var{keys}(string-list) 1038 @var{headers}(string-list) @var{keys}(string-list)
1039 @subsubheading Synopsis 1039 @*Synopsis:
1040 @smallexample 1040 @smallexample
1041 require "test-list"; 1041 require "test-list";
1042 if list @var{args} 1042 if list @var{args}
...@@ -1044,14 +1044,14 @@ if list @var{args} ...@@ -1044,14 +1044,14 @@ if list @var{args}
1044 @dots{} 1044 @dots{}
1045 @} 1045 @}
1046 @end smallexample 1046 @end smallexample
1047 @subsubheading Description 1047 @*Description:
1048 The @code{list} test evaluates to true if any of @var{headers} match any 1048 The @code{list} test evaluates to true if any of @var{headers} match any
1049 key from @var{keys}. Each header is regarded as containing a list of 1049 key from @var{keys}. Each header is regarded as containing a list of
1050 keywords. By default, comma is assumed as list separator. This can be 1050 keywords. By default, comma is assumed as list separator. This can be
1051 overridden by specifying the @code{:delim} tag, whose value is a 1051 overridden by specifying the @code{:delim} tag, whose value is a
1052 string consisting of valid list delimiter characters. 1052 string consisting of valid list delimiter characters.
1053 1053
1054 @subsubheading Example 1054 @*Example:
1055 This test can be used in conjunction with the @code{spamd} test 1055 This test can be used in conjunction with the @code{spamd} test
1056 described above: 1056 described above:
1057 1057
...@@ -1075,7 +1075,7 @@ if spamd :host 127.0.0.1 :port 3333 ...@@ -1075,7 +1075,7 @@ if spamd :host 127.0.0.1 :port 3333
1075 1075
1076 @deftypefn Test {} timestamp [:before | :after] @ 1076 @deftypefn Test {} timestamp [:before | :after] @
1077 @var{header}(string) @var{date}(string) 1077 @var{header}(string) @var{date}(string)
1078 @subsubheading Synopsis 1078 @*Synopsis:
1079 @smallexample 1079 @smallexample
1080 require "test-timestamp"; 1080 require "test-timestamp";
1081 1081
...@@ -1084,7 +1084,7 @@ if timestamp @var{arg} ...@@ -1084,7 +1084,7 @@ if timestamp @var{arg}
1084 @dots{} 1084 @dots{}
1085 @} 1085 @}
1086 @end smallexample 1086 @end smallexample
1087 @subsubheading Description 1087 @*Description:
1088 The @code{timestamp} test compares the value of a structured date header 1088 The @code{timestamp} test compares the value of a structured date header
1089 field (@var{header}) with the given date (@var{date}). 1089 field (@var{header}) with the given date (@var{date}).
1090 1090
...@@ -1101,7 +1101,7 @@ If no tagged argument is supplied, @code{:after} is assumed. ...@@ -1101,7 +1101,7 @@ If no tagged argument is supplied, @code{:after} is assumed.
1101 Almost any date format is understood. @xref{Date Input Formats}, for 1101 Almost any date format is understood. @xref{Date Input Formats}, for
1102 a detailed information on date formats. 1102 a detailed information on date formats.
1103 1103
1104 @subsubheading Example 1104 @*Example:
1105 The test below succeeds if the date in @samp{X-Expire-Timestamp} 1105 The test below succeeds if the date in @samp{X-Expire-Timestamp}
1106 header is more than 5 days older than the current date: 1106 header is more than 5 days older than the current date:
1107 1107
...@@ -1366,12 +1366,12 @@ required prior to use (@pxref{Require Statement}). ...@@ -1366,12 +1366,12 @@ required prior to use (@pxref{Require Statement}).
1366 1366
1367 @deftypefn Action {} moderator [:keep] [:address @var{address}(string)] @ 1367 @deftypefn Action {} moderator [:keep] [:address @var{address}(string)] @
1368 [:source @var{sieve-file}(string)] 1368 [:source @var{sieve-file}(string)]
1369 @subsubheading Synopsis 1369 @*Synopsis:
1370 @smallexample 1370 @smallexample
1371 require "moderator" 1371 require "moderator"
1372 moderator @var{args}; 1372 moderator @var{args};
1373 @end smallexample 1373 @end smallexample
1374 @subsubheading Description 1374 @*Description:
1375 @cindex mailman 1375 @cindex mailman
1376 This action is a moderator robot for Mailman-driven mail archives. 1376 This action is a moderator robot for Mailman-driven mail archives.
1377 A Mailman moderation request is a MIME message consisting of the 1377 A Mailman moderation request is a MIME message consisting of the
...@@ -1408,7 +1408,7 @@ does not have exactly 3 MIME parts, or if parts 2 and 3 are not of ...@@ -1408,7 +1408,7 @@ does not have exactly 3 MIME parts, or if parts 2 and 3 are not of
1408 make sure the message is actually a valid Mailman moderation request 1408 make sure the message is actually a valid Mailman moderation request
1409 (see the example below). 1409 (see the example below).
1410 1410
1411 @subsubheading Example 1411 @*Example:
1412 @smallexample 1412 @smallexample
1413 if allof(header :is "Sender" "mailman-bounces@@gnu.org", 1413 if allof(header :is "Sender" "mailman-bounces@@gnu.org",
1414 header :is "X-List-Administrivia" "yes") 1414 header :is "X-List-Administrivia" "yes")
...@@ -1419,7 +1419,7 @@ if allof(header :is "Sender" "mailman-bounces@@gnu.org", ...@@ -1419,7 +1419,7 @@ if allof(header :is "Sender" "mailman-bounces@@gnu.org",
1419 @end deftypefn 1419 @end deftypefn
1420 1420
1421 @deftypefn Action {} pipe [:envelope] @var{command}(string) 1421 @deftypefn Action {} pipe [:envelope] @var{command}(string)
1422 @subsubheading Synopsis 1422 @*Synopsis:
1423 @smallexample 1423 @smallexample
1424 require "pipe"; 1424 require "pipe";
1425 if pipe @var{args} 1425 if pipe @var{args}
...@@ -1427,7 +1427,7 @@ if pipe @var{args} ...@@ -1427,7 +1427,7 @@ if pipe @var{args}
1427 @dots{} 1427 @dots{}
1428 @} 1428 @}
1429 @end smallexample 1429 @end smallexample
1430 @subsubheading Description 1430 @*Description:
1431 The @code{pipe} action sends executes a command specified by its 1431 The @code{pipe} action sends executes a command specified by its
1432 argument and sends the entire message to its standard input. The 1432 argument and sends the entire message to its standard input. The
1433 @var{command} argument supplies the command line. 1433 @var{command} argument supplies the command line.
...@@ -1435,7 +1435,7 @@ argument and sends the entire message to its standard input. The ...@@ -1435,7 +1435,7 @@ argument and sends the entire message to its standard input. The
1435 The envelope of the message is included, if the @code{:envelope} tag 1435 The envelope of the message is included, if the @code{:envelope} tag
1436 is given. 1436 is given.
1437 1437
1438 @subsubheading Example 1438 @*Example:
1439 The example below uses the @command{maidag} utility 1439 The example below uses the @command{maidag} utility
1440 (@pxref{maidag}) to forward the message to user @samp{gray} on 1440 (@pxref{maidag}) to forward the message to user @samp{gray} on
1441 the machine @samp{mail.gnu.org}. 1441 the machine @samp{mail.gnu.org}.
...@@ -1454,12 +1454,12 @@ pipe "/usr/sbin/maidag --url smtp://gray@@mail.gnu.org" ...@@ -1454,12 +1454,12 @@ pipe "/usr/sbin/maidag --url smtp://gray@@mail.gnu.org"
1454 [:reply_regex @var{expr}(string)] @ 1454 [:reply_regex @var{expr}(string)] @
1455 [:reply_prefix @var{prefix}(string)] @ 1455 [:reply_prefix @var{prefix}(string)] @
1456 @var{reply-text}(string) 1456 @var{reply-text}(string)
1457 @subsubheading Syntax 1457 @*Syntax:
1458 @smallexample 1458 @smallexample
1459 require "vacation"; 1459 require "vacation";
1460 vacation @var{args}; 1460 vacation @var{args};
1461 @end smallexample 1461 @end smallexample
1462 @subsubheading Description 1462 @*Description:
1463 The @code{vacation} action returns a message with @var{reply-text} to 1463 The @code{vacation} action returns a message with @var{reply-text} to
1464 the sender. It is intended to inform the sender that the recipient is 1464 the sender. It is intended to inform the sender that the recipient is
1465 not currently reading his mail. 1465 not currently reading his mail.
......
...@@ -780,7 +780,7 @@ pop_section (struct scan_tree_data *dat) ...@@ -780,7 +780,7 @@ pop_section (struct scan_tree_data *dat)
780 return sec; 780 return sec;
781 } 781 }
782 782
783 #define STRTONUM(s, type, base, res, limit, d, loc) \ 783 #define STRTONUM(s, type, base, res, limit, loc) \
784 { \ 784 { \
785 type sum = 0; \ 785 type sum = 0; \
786 \ 786 \
...@@ -815,7 +815,7 @@ pop_section (struct scan_tree_data *dat) ...@@ -815,7 +815,7 @@ pop_section (struct scan_tree_data *dat)
815 res = sum; \ 815 res = sum; \
816 } 816 }
817 817
818 #define STRxTONUM(s, type, res, limit, d, loc) \ 818 #define STRxTONUM(s, type, res, limit, loc) \
819 { \ 819 { \
820 int base; \ 820 int base; \
821 if (*s == '0') \ 821 if (*s == '0') \
...@@ -832,14 +832,14 @@ pop_section (struct scan_tree_data *dat) ...@@ -832,14 +832,14 @@ pop_section (struct scan_tree_data *dat)
832 base = 8; \ 832 base = 8; \
833 } else \ 833 } else \
834 base = 10; \ 834 base = 10; \
835 STRTONUM (s, type, base, res, limit, d, loc); \ 835 STRTONUM (s, type, base, res, limit, loc); \
836 } 836 }
837 837
838 #define GETUNUM(str, type, res, d, loc) \ 838 #define GETUNUM(str, type, res, loc) \
839 { \ 839 { \
840 type tmpres; \ 840 type tmpres; \
841 const char *s = str; \ 841 const char *s = str; \
842 STRxTONUM (s, type, tmpres, 0, d, loc); \ 842 STRxTONUM (s, type, tmpres, 0, loc); \
843 if (*s) \ 843 if (*s) \
844 { \ 844 { \
845 mu_diag_at_locus (MU_LOG_ERROR, loc, \ 845 mu_diag_at_locus (MU_LOG_ERROR, loc, \
...@@ -851,7 +851,7 @@ pop_section (struct scan_tree_data *dat) ...@@ -851,7 +851,7 @@ pop_section (struct scan_tree_data *dat)
851 res = tmpres; \ 851 res = tmpres; \
852 } 852 }
853 853
854 #define GETSNUM(str, type, res, d, loc) \ 854 #define GETSNUM(str, type, res, loc) \
855 { \ 855 { \
856 unsigned type tmpres; \ 856 unsigned type tmpres; \
857 const char *s = str; \ 857 const char *s = str; \
...@@ -871,7 +871,7 @@ pop_section (struct scan_tree_data *dat) ...@@ -871,7 +871,7 @@ pop_section (struct scan_tree_data *dat)
871 limit = TYPE_MAXIMUM (type); \ 871 limit = TYPE_MAXIMUM (type); \
872 } \ 872 } \
873 \ 873 \
874 STRxTONUM (s, unsigned type, tmpres, limit, d, loc); \ 874 STRxTONUM (s, unsigned type, tmpres, limit, loc); \
875 if (*s) \ 875 if (*s) \
876 { \ 876 { \
877 mu_diag_at_locus (MU_LOG_ERROR, loc, \ 877 mu_diag_at_locus (MU_LOG_ERROR, loc, \
...@@ -955,7 +955,7 @@ parse_cidr (struct scan_tree_data *sdata, const struct mu_locus *locus, ...@@ -955,7 +955,7 @@ parse_cidr (struct scan_tree_data *sdata, const struct mu_locus *locus,
955 955
956 p++; 956 p++;
957 s = p; 957 s = p;
958 STRxTONUM (s, unsigned long, mask, 0, sdata->tree->debug, locus); 958 STRxTONUM (s, unsigned long, mask, 0, locus);
959 if (*s == '.') 959 if (*s == '.')
960 { 960 {
961 struct in_addr a; 961 struct in_addr a;
...@@ -991,7 +991,7 @@ parse_cidr (struct scan_tree_data *sdata, const struct mu_locus *locus, ...@@ -991,7 +991,7 @@ parse_cidr (struct scan_tree_data *sdata, const struct mu_locus *locus,
991 p = str; 991 p = str;
992 for (i = 0; i < 3; i++) 992 for (i = 0; i < 3; i++)
993 { 993 {
994 STRxTONUM (p, unsigned short, x, 255, sdata->tree->debug, locus); 994 STRxTONUM (p, unsigned short, x, 255, locus);
995 if (*p != '.') 995 if (*p != '.')
996 break; 996 break;
997 addr.s_addr = (addr.s_addr << 8) + x; 997 addr.s_addr = (addr.s_addr << 8) + x;
...@@ -1071,36 +1071,31 @@ valcvt (struct scan_tree_data *sdata, const struct mu_locus *locus, ...@@ -1071,36 +1071,31 @@ valcvt (struct scan_tree_data *sdata, const struct mu_locus *locus,
1071 } 1071 }
1072 1072
1073 case mu_cfg_short: 1073 case mu_cfg_short:
1074 GETSNUM (val->v.string, short, *(short*)tgt, sdata->tree->debug, locus); 1074 GETUNUM (val->v.string, short, *(short*)tgt, locus);
1075 break; 1075 break;
1076 1076
1077 case mu_cfg_ushort: 1077 case mu_cfg_ushort:
1078 GETUNUM (val->v.string, unsigned short, *(unsigned short*)tgt, 1078 GETUNUM (val->v.string, unsigned short, *(unsigned short*)tgt, locus);
1079 sdata->tree->debug, locus);
1080 break; 1079 break;
1081 1080
1082 case mu_cfg_int: 1081 case mu_cfg_int:
1083 GETSNUM (val->v.string, int, *(int*)tgt, sdata->tree->debug, locus); 1082 GETSNUM (val->v.string, int, *(int*)tgt, locus);
1084 break; 1083 break;
1085 1084
1086 case mu_cfg_uint: 1085 case mu_cfg_uint:
1087 GETUNUM (val->v.string, unsigned int, *(unsigned int*)tgt, 1086 GETUNUM (val->v.string, unsigned int, *(unsigned int*)tgt, locus);
1088 sdata->tree->debug, locus);
1089 break; 1087 break;
1090 1088
1091 case mu_cfg_long: 1089 case mu_cfg_long:
1092 GETSNUM (val->v.string, long, *(long*)tgt, 1090 GETSNUM (val->v.string, long, *(long*)tgt, locus);
1093 sdata->tree->debug, locus);
1094 break; 1091 break;
1095 1092
1096 case mu_cfg_ulong: 1093 case mu_cfg_ulong:
1097 GETUNUM (val->v.string, unsigned long, *(unsigned long*)tgt, 1094 GETUNUM (val->v.string, unsigned long, *(unsigned long*)tgt, locus);
1098 sdata->tree->debug, locus);
1099 break; 1095 break;
1100 1096
1101 case mu_cfg_size: 1097 case mu_cfg_size:
1102 GETUNUM (val->v.string, size_t, *(size_t*)tgt, 1098 GETUNUM (val->v.string, size_t, *(size_t*)tgt, locus);
1103 sdata->tree->debug, locus);
1104 break; 1099 break;
1105 1100
1106 case mu_cfg_off: 1101 case mu_cfg_off:
...@@ -1110,8 +1105,7 @@ valcvt (struct scan_tree_data *sdata, const struct mu_locus *locus, ...@@ -1110,8 +1105,7 @@ valcvt (struct scan_tree_data *sdata, const struct mu_locus *locus,
1110 return 1; 1105 return 1;
1111 1106
1112 case mu_cfg_time: 1107 case mu_cfg_time:
1113 GETUNUM (val->v.string, time_t, *(time_t*)tgt, 1108 GETUNUM (val->v.string, time_t, *(time_t*)tgt, locus);
1114 sdata->tree->debug, locus);
1115 break; 1109 break;
1116 1110
1117 case mu_cfg_bool: 1111 case mu_cfg_bool:
......
...@@ -292,7 +292,11 @@ mu_tcp_stream_create_from_sa (mu_stream_t *pstream, ...@@ -292,7 +292,11 @@ mu_tcp_stream_create_from_sa (mu_stream_t *pstream,
292 if (rc == 0 || rc == EAGAIN || rc == EINPROGRESS) 292 if (rc == 0 || rc == EAGAIN || rc == EINPROGRESS)
293 *pstream = stream; 293 *pstream = stream;
294 else 294 else
295 mu_stream_destroy (&stream); 295 {
296 /* Make sure sockaddrs are not freed on error */
297 tcp->remote_addr = tcp->source_addr = NULL;
298 mu_stream_destroy (&stream);
299 }
296 return rc; 300 return rc;
297 } 301 }
298 302
......