summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/chat.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1998-08-07 18:42:51 +0000
committerbrian <brian@FreeBSD.org>1998-08-07 18:42:51 +0000
commitf9ee8808e7fd6798eb442188b9b4b8e23c461f07 (patch)
tree4a1f01689ab26830c419f0100830cd94b3e03a62 /usr.sbin/ppp/chat.c
parentda1fbd5e2562a9182735d47266f718c37ce51225 (diff)
downloadFreeBSD-src-f9ee8808e7fd6798eb442188b9b4b8e23c461f07.zip
FreeBSD-src-f9ee8808e7fd6798eb442188b9b4b8e23c461f07.tar.gz
o Support callback types NONE, E.164, AUTH and CBCP.
(see the new ``set callback'' and ``set cbcp'' commands) o Add a ``cbcp'' log level and mbuf type. o Don't dump core when \T is given in ``set login'' or ``set hangup''. o Allow ``*'' and blanks as placeholders in ppp.secret and allow a fifth field for specifying auth/cbcp dialback parameters. o Remove a few extraneous #includes o Define the default number of REQs (restart counter) in defs.h rather than hardcoding ``5'' all over the place. o Fix a few man page inconsistencies.
Diffstat (limited to 'usr.sbin/ppp/chat.c')
-rw-r--r--usr.sbin/ppp/chat.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/usr.sbin/ppp/chat.c b/usr.sbin/ppp/chat.c
index 76699fb..fa81677 100644
--- a/usr.sbin/ppp/chat.c
+++ b/usr.sbin/ppp/chat.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: chat.c,v 1.49 1998/06/24 19:33:31 brian Exp $
+ * $Id: chat.c,v 1.50 1998/06/27 14:18:01 brian Exp $
*/
#include <sys/types.h>
@@ -64,6 +64,7 @@
#include "iplist.h"
#include "ipcp.h"
#include "filter.h"
+#include "cbcp.h"
#include "datalink.h"
#include "bundle.h"
@@ -673,9 +674,11 @@ ExpandString(struct chat *c, const char *str, char *result, int reslen,
result += strlen(result);
break;
case 'T':
- strncpy(result, c->phone, reslen);
- reslen -= strlen(result);
- result += strlen(result);
+ if (c->phone) {
+ strncpy(result, c->phone, reslen);
+ reslen -= strlen(result);
+ result += strlen(result);
+ }
break;
case 'U':
strncpy(result, c->physical->dl->bundle->cfg.auth.name, reslen);
OpenPOWER on IntegriCloud