pkgsrc/net/pptp/patches/patch-ab

37 lines
1 KiB
Text

$NetBSD: patch-ab,v 1.4 2006/05/12 09:30:55 joerg Exp $
Added more logging.
--- pptp.c.orig 2005-07-28 03:15:11.000000000 +0200
+++ pptp.c 2006-03-14 13:51:22.000000000 +0100
@@ -7,7 +7,7 @@
#include <sys/types.h>
#include <sys/socket.h>
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__DragonFly__)
#include <libutil.h>
#elif defined(__NetBSD__) || defined(__OpenBSD__)
#include <util.h>
@@ -261,6 +261,8 @@ int main(int argc, char **argv, char **e
inetaddr = get_ip_address(argv[optind]);
optind++;
+ log("using remote IP address %s\n", inet_ntoa(inetaddr));
+
/* Find the ppp options, extract phone number */
pppdargc = argc - optind;
pppdargv = argv + optind;
@@ -504,6 +506,12 @@ void launch_pppd(char *ttydev, int argc,
for (j = 0; j < argc; j++)
new_argv[i++] = argv[j];
new_argv[i] = NULL;
+
+ fprintf(stderr, "running pppd:");
+ for (i = 0; new_argv[i] != NULL; i++)
+ fprintf(stderr, " %s", new_argv[i]);
+ fprintf(stderr, "\n");
+
execvp(new_argv[0], new_argv);
}