diff --git a/pppdcapiplugin/capiplugin.8 b/pppdcapiplugin/capiplugin.8 index 3c444e78..de627c4c 100644 --- a/pppdcapiplugin/capiplugin.8 +++ b/pppdcapiplugin/capiplugin.8 @@ -304,6 +304,10 @@ On an outcoming call the remote party will reject the call and callback. .B dialmax \fI Maximum number of times the list of phone numbers is tried before giving up. Default value is 4. +.br +If dialmax is set to 0, +the list is retried infinitely until a connection is made +(or the process is stopped). .TP .B dialtimeout \fI diff --git a/pppdcapiplugin/capiplugin.c b/pppdcapiplugin/capiplugin.c index 90334170..a663a0f0 100644 --- a/pppdcapiplugin/capiplugin.c +++ b/pppdcapiplugin/capiplugin.c @@ -1807,7 +1807,7 @@ static void makeleasedline(void) if (status != EXIT_OK) die(status); - } while (++retry < opt_dialmax); + } while ((++retry < opt_dialmax) || (opt_dialmax == 0)); connected: if (conn_isconnected(cp)) { @@ -1874,7 +1874,7 @@ again: if (status != EXIT_OK) die(status); } - } while (++retry < opt_dialmax); + } while ((++retry < opt_dialmax) || (opt_dialmax == 0)); connected: if (conn_isconnected(cp)) { @@ -1964,7 +1964,7 @@ again: info("capiplugin: callback failed (no call)"); } } - } while (++retry < opt_dialmax); + } while ((++retry < opt_dialmax) || (opt_dialmax == 0)); fatal("capiplugin: callback failed (no call)"); }