|
|
27639a |
diff -up pptp-1.7.2/pptp.c.const pptp-1.7.2/pptp.c
|
|
|
27639a |
--- pptp-1.7.2/pptp.c.const 2011-11-30 18:58:39.713148113 +0000
|
|
|
27639a |
+++ pptp-1.7.2/pptp.c 2011-12-01 09:23:29.716446618 +0000
|
|
|
27639a |
@@ -565,10 +565,13 @@ int get_call_id(int sock, pid_t gre, pid
|
|
|
27639a |
void launch_pppd(char *ttydev, int argc, char **argv)
|
|
|
27639a |
{
|
|
|
27639a |
char *new_argv[argc + 4];/* XXX if not using GCC, hard code a limit here. */
|
|
|
27639a |
+ char str_pppd[] = PPPD_BINARY;
|
|
|
27639a |
+ char str_direct[] = "-direct";
|
|
|
27639a |
+ char str_38400[] = "38400";
|
|
|
27639a |
int i = 0, j;
|
|
|
27639a |
- new_argv[i++] = PPPD_BINARY;
|
|
|
27639a |
+ new_argv[i++] = str_pppd;
|
|
|
27639a |
#ifdef USER_PPP
|
|
|
27639a |
- new_argv[i++] = "-direct";
|
|
|
27639a |
+ new_argv[i++] = str_direct;
|
|
|
27639a |
/* ppp expects to have stdin connected to ttydev */
|
|
|
27639a |
if ((j = open(ttydev, O_RDWR)) == -1)
|
|
|
27639a |
fatal("Cannot open %s: %s", ttydev, strerror(errno));
|
|
|
27639a |
@@ -577,7 +580,7 @@ void launch_pppd(char *ttydev, int argc,
|
|
|
27639a |
close(j);
|
|
|
27639a |
#else
|
|
|
27639a |
new_argv[i++] = ttydev;
|
|
|
27639a |
- new_argv[i++] = "38400";
|
|
|
27639a |
+ new_argv[i++] = str_38400;
|
|
|
27639a |
#endif
|
|
|
27639a |
for (j = 0; j < argc; j++)
|
|
|
27639a |
new_argv[i++] = argv[j];
|
|
|
27639a |
diff -up pptp-1.7.2/util.c.const pptp-1.7.2/util.c
|
|
|
27639a |
--- pptp-1.7.2/util.c.const 2008-05-14 07:33:55.000000000 +0100
|
|
|
27639a |
+++ pptp-1.7.2/util.c 2011-11-30 18:58:39.719148114 +0000
|
|
|
27639a |
@@ -16,7 +16,7 @@
|
|
|
27639a |
#endif
|
|
|
27639a |
|
|
|
27639a |
/* implementation of log_string, defined as extern in util.h */
|
|
|
27639a |
-char *log_string = "anon";
|
|
|
27639a |
+const char *log_string = "anon";
|
|
|
27639a |
|
|
|
27639a |
static void open_log(void) __attribute__ ((constructor));
|
|
|
27639a |
static void close_log(void) __attribute__ ((destructor));
|
|
|
27639a |
diff -up pptp-1.7.2/util.h.const pptp-1.7.2/util.h
|
|
|
27639a |
--- pptp-1.7.2/util.h.const 2008-05-14 07:33:55.000000000 +0100
|
|
|
27639a |
+++ pptp-1.7.2/util.h 2011-11-30 18:59:47.458171318 +0000
|
|
|
27639a |
@@ -10,7 +10,7 @@
|
|
|
27639a |
/* log_string is an identifier for this pptp process, passed from
|
|
|
27639a |
command line using --log-string=X, and included with every log message.
|
|
|
27639a |
Useful for people with multiple pptp sessions open at a time */
|
|
|
27639a |
-extern char * log_string;
|
|
|
27639a |
+extern const char * log_string;
|
|
|
27639a |
|
|
|
27639a |
/* log_level sets the logging verbosity. Values range from 0 (errors only)
|
|
|
27639a |
to 1 (errors and warnings) to 2 (high verbosity, for debugging) */
|