Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 318058 Details for
Bug 426398
net-dialup/pptpclient - stability fixes
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
fix const usage
pptpclient-1.7.2-const.patch (text/plain), 2.07 KB, created by
Dirk Olmes
on 2012-07-13 06:18:34 UTC
(
hide
)
Description:
fix const usage
Filename:
MIME Type:
Creator:
Dirk Olmes
Created:
2012-07-13 06:18:34 UTC
Size:
2.07 KB
patch
obsolete
>diff -up pptp-1.7.2/pptp.c.const pptp-1.7.2/pptp.c >--- pptp-1.7.2/pptp.c.const 2011-11-30 18:58:39.713148113 +0000 >+++ pptp-1.7.2/pptp.c 2011-12-01 09:23:29.716446618 +0000 >@@ -565,10 +565,13 @@ int get_call_id(int sock, pid_t gre, pid > void launch_pppd(char *ttydev, int argc, char **argv) > { > char *new_argv[argc + 4];/* XXX if not using GCC, hard code a limit here. */ >+ char str_pppd[] = PPPD_BINARY; >+ char str_direct[] = "-direct"; >+ char str_38400[] = "38400"; > int i = 0, j; >- new_argv[i++] = PPPD_BINARY; >+ new_argv[i++] = str_pppd; > #ifdef USER_PPP >- new_argv[i++] = "-direct"; >+ new_argv[i++] = str_direct; > /* ppp expects to have stdin connected to ttydev */ > if ((j = open(ttydev, O_RDWR)) == -1) > fatal("Cannot open %s: %s", ttydev, strerror(errno)); >@@ -577,7 +580,7 @@ void launch_pppd(char *ttydev, int argc, > close(j); > #else > new_argv[i++] = ttydev; >- new_argv[i++] = "38400"; >+ new_argv[i++] = str_38400; > #endif > for (j = 0; j < argc; j++) > new_argv[i++] = argv[j]; >diff -up pptp-1.7.2/util.c.const pptp-1.7.2/util.c >--- pptp-1.7.2/util.c.const 2008-05-14 07:33:55.000000000 +0100 >+++ pptp-1.7.2/util.c 2011-11-30 18:58:39.719148114 +0000 >@@ -16,7 +16,7 @@ > #endif > > /* implementation of log_string, defined as extern in util.h */ >-char *log_string = "anon"; >+const char *log_string = "anon"; > > static void open_log(void) __attribute__ ((constructor)); > static void close_log(void) __attribute__ ((destructor)); >diff -up pptp-1.7.2/util.h.const pptp-1.7.2/util.h >--- pptp-1.7.2/util.h.const 2008-05-14 07:33:55.000000000 +0100 >+++ pptp-1.7.2/util.h 2011-11-30 18:59:47.458171318 +0000 >@@ -10,7 +10,7 @@ > /* log_string is an identifier for this pptp process, passed from > command line using --log-string=X, and included with every log message. > Useful for people with multiple pptp sessions open at a time */ >-extern char * log_string; >+extern const char * log_string; > > /* log_level sets the logging verbosity. Values range from 0 (errors only) > to 1 (errors and warnings) to 2 (high verbosity, for debugging) */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 426398
:
318054
|
318056
| 318058 |
318060
|
318062
|
318064
|
318066
|
318068