Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 296267 | Differences between
and this patch

Collapse All | Expand All

(-)ppp-2.4.4.orig/pppd/auth.c (-1 / +1 lines)
Lines 648-654 Link Here
648
     * we delete its pid file.
648
     * we delete its pid file.
649
     */
649
     */
650
    if (!doing_multilink && !demand)
650
    if (!doing_multilink && !demand)
651
	remove_pidfiles();
651
	remove_pidfile(pidfilename);
652
652
653
    /*
653
    /*
654
     * If we may want to bring the link up again, transfer
654
     * If we may want to bring the link up again, transfer
(-)ppp-2.4.4.orig/pppd/main.c (-9 / +18 lines)
Lines 134-140 Link Here
134
134
135
char *progname;			/* Name of this program */
135
char *progname;			/* Name of this program */
136
char hostname[MAXNAMELEN];	/* Our hostname */
136
char hostname[MAXNAMELEN];	/* Our hostname */
137
static char pidfilename[MAXPATHLEN];	/* name of pid file */
137
char pidfilename[MAXPATHLEN];	/* name of pid file */
138
static char linkpidfile[MAXPATHLEN];	/* name of linkname pid file */
138
static char linkpidfile[MAXPATHLEN];	/* name of linkname pid file */
139
char ppp_devnam[MAXPATHLEN];	/* name of PPP tty (maybe ttypx) */
139
char ppp_devnam[MAXPATHLEN];	/* name of PPP tty (maybe ttypx) */
140
uid_t uid;			/* Our real user-id */
140
uid_t uid;			/* Our real user-id */
Lines 244-249 Link Here
244
static void toggle_debug __P((int));
244
static void toggle_debug __P((int));
245
static void open_ccp __P((int));
245
static void open_ccp __P((int));
246
static void bad_signal __P((int));
246
static void bad_signal __P((int));
247
static void remove_pidfilenames __P((void));
247
static void holdoff_end __P((void *));
248
static void holdoff_end __P((void *));
248
static void forget_child __P((int pid, int status));
249
static void forget_child __P((int pid, int status));
249
static int reap_kids __P((void));
250
static int reap_kids __P((void));
Lines 846-861 Link Here
846
}
847
}
847
848
848
/*
849
/*
849
 * remove_pidfile - remove our pid files
850
 * remove_pidfile - remove one of the 2 pidfiles (pidfilename or linkpidfile)
850
 */
851
 */
851
void remove_pidfiles()
852
void 
853
remove_pidfile(filename)
854
    char* filename;
852
{
855
{
853
    if (pidfilename[0] != 0 && unlink(pidfilename) < 0 && errno != ENOENT)
856
    if (filename[0] != 0 && unlink(filename) < 0 && errno != ENOENT)
854
	warn("unable to delete pid file %s: %m", pidfilename);
857
	warn("unable to delete pid file %s: %m", filename);
855
    pidfilename[0] = 0;
858
    filename[0] = 0;
856
    if (linkpidfile[0] != 0 && unlink(linkpidfile) < 0 && errno != ENOENT)
859
}
857
	warn("unable to delete pid file %s: %m", linkpidfile);
860
858
    linkpidfile[0] = 0;
861
/*
862
 * remove_pidfiles - remove our pid files
863
 */
864
static void remove_pidfiles()
865
{
866
    remove_pidfile(pidfilename);
867
    remove_pidfile(linkpidfile);
859
}
868
}
860
869
861
/*
870
/*
(-)ppp-2.4.4.orig/pppd/multilink.c (-1 / +1 lines)
Lines 267-273 Link Here
267
	notice("Connection terminated.");
267
	notice("Connection terminated.");
268
	print_link_stats();
268
	print_link_stats();
269
	if (!demand) {
269
	if (!demand) {
270
		remove_pidfiles();
270
		remove_pidfile(pidfilename);
271
		script_unsetenv("IFNAME");
271
		script_unsetenv("IFNAME");
272
	}
272
	}
273
273
(-)ppp-2.4.4.orig/pppd/pppd.h (-1 / +2 lines)
Lines 214-219 Link Here
214
extern int	ifunit;		/* Interface unit number */
214
extern int	ifunit;		/* Interface unit number */
215
extern char	ifname[];	/* Interface name */
215
extern char	ifname[];	/* Interface name */
216
extern char	hostname[];	/* Our hostname */
216
extern char	hostname[];	/* Our hostname */
217
extern char pidfilename[];	/* name of pid file */
217
extern u_char	outpacket_buf[]; /* Buffer for outgoing packets */
218
extern u_char	outpacket_buf[]; /* Buffer for outgoing packets */
218
extern int	devfd;		/* fd of underlying device */
219
extern int	devfd;		/* fd of underlying device */
219
extern int	fd_ppp;		/* fd for talking PPP */
220
extern int	fd_ppp;		/* fd for talking PPP */
Lines 499-505 Link Here
499
int  ppp_send_config __P((int, int, u_int32_t, int, int));
500
int  ppp_send_config __P((int, int, u_int32_t, int, int));
500
int  ppp_recv_config __P((int, int, u_int32_t, int, int));
501
int  ppp_recv_config __P((int, int, u_int32_t, int, int));
501
const char *protocol_name __P((int));
502
const char *protocol_name __P((int));
502
void remove_pidfiles __P((void));
503
void remove_pidfile __P((char *));
503
void lock_db __P((void));
504
void lock_db __P((void));
504
void unlock_db __P((void));
505
void unlock_db __P((void));
505
506

Return to bug 296267