diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2010-12-21 19:21:41 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2010-12-21 19:21:41 +0300 |
commit | 0489841b673164b666a800255d86ab94d25cd45b (patch) | |
tree | dfa53d40a190c762be6cfabd00121cfb8f07602b /accel-pptpd/ppp/ppp.c | |
parent | 1dfb91adffc315294a948f3cae24a87a3f3d0d89 (diff) | |
download | accel-ppp-0489841b673164b666a800255d86ab94d25cd45b.tar.gz accel-ppp-0489841b673164b666a800255d86ab94d25cd45b.zip |
ppp: more informative error logs at establish phase
Diffstat (limited to 'accel-pptpd/ppp/ppp.c')
-rw-r--r-- | accel-pptpd/ppp/ppp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/accel-pptpd/ppp/ppp.c b/accel-pptpd/ppp/ppp.c index e37f658..1489898 100644 --- a/accel-pptpd/ppp/ppp.c +++ b/accel-pptpd/ppp/ppp.c @@ -102,29 +102,29 @@ int __export establish_ppp(struct ppp_t *ppp) ppp->chan_fd = open("/dev/ppp", O_RDWR); if (ppp->chan_fd < 0) { - log_ppp_error("Couldn't reopen /dev/ppp\n"); + log_ppp_error("open(chan) /dev/ppp: %s\n", strerror(errno)); return -1; } if (ioctl(ppp->chan_fd, PPPIOCATTCHAN, &ppp->chan_idx) < 0) { - log_ppp_error("Couldn't attach to channel %d\n", ppp->chan_idx); + log_ppp_error("ioctl(PPPIOCATTCHAN): %s\n", strerror(errno)); goto exit_close_chan; } ppp->unit_fd = open("/dev/ppp", O_RDWR); if (ppp->unit_fd < 0) { - log_ppp_error("Couldn't reopen /dev/ppp\n"); + log_ppp_error("open(unit) /dev/ppp: %s\n", strerror(errno)); goto exit_close_chan; } ppp->unit_idx = -1; if (ioctl(ppp->unit_fd, PPPIOCNEWUNIT, &ppp->unit_idx) < 0) { - log_ppp_error("Couldn't create new ppp unit\n"); + log_ppp_error("ioctl(PPPIOCNEWUNIT): %s\n", strerror(errno)); goto exit_close_unit; } if (ioctl(ppp->chan_fd, PPPIOCCONNECT, &ppp->unit_idx) < 0) { - log_ppp_error("Couldn't attach to PPP unit %d\n", ppp->unit_idx); + log_ppp_error("ioctl(PPPIOCCONNECT): %s\n", strerror(errno)); goto exit_close_unit; } |