Remove some unused code.
***********************************************************************/
static char const RCSID[] =
-"$Id: discovery.c,v 1.2 2004/01/13 04:03:58 paulus Exp $";
+"$Id: discovery.c,v 1.3 2004/11/04 10:07:37 paulus Exp $";
#include "pppoe.h"
/* Skip discovery? */
if (conn->skipDiscovery) {
conn->discoveryState = STATE_SESSION;
- if (conn->killSession) {
- sendPADT(conn, "RP-PPPoE: Session killed manually");
- exit(0);
- }
return;
}
padiAttempts++;
if (padiAttempts > MAX_PADI_ATTEMPTS) {
warn("Timeout waiting for PADO packets");
+ close(conn->discoverySocket);
+ conn->discoverySocket = -1;
return;
}
sendPADI(conn);
/* If we're only printing access concentrator names, we're done */
if (conn->printACNames) {
- printf("--------------------------------------------------\n");
- exit(0);
+ die(0);
}
timeout = PADI_TIMEOUT;
padrAttempts++;
if (padrAttempts > MAX_PADI_ATTEMPTS) {
warn("Timeout waiting for PADS packets");
+ close(conn->discoverySocket);
+ conn->discoverySocket = -1;
return;
}
sendPADR(conn);
***********************************************************************/
static char const RCSID[] =
-"$Id: plugin.c,v 1.11 2004/10/24 23:06:31 paulus Exp $";
+"$Id: plugin.c,v 1.12 2004/11/04 10:07:37 paulus Exp $";
#define _GNU_SOURCE 1
#include "pppoe.h"
return;
}
close(conn->sessionSocket);
+ /* don't send PADT?? */
+ close(conn->discoverySocket);
}
static void
* This program may be distributed according to the terms of the GNU
* General Public License, version 2 or (at your option) any later version.
*
-* $Id: pppoe.h,v 1.1 2001/12/14 02:55:20 mostrows Exp $
+* $Id: pppoe.h,v 1.2 2004/11/04 10:07:37 paulus Exp $
*
***********************************************************************/
int printACNames; /* Just print AC names */
int skipDiscovery; /* Skip discovery */
int noDiscoverySocket; /* Don't even open discovery socket */
- int killSession; /* Kill session and exit */
FILE *debugFile; /* Debug file for dumping packets */
int numPADOs; /* Number of PADO packets received */
PPPoETag cookie; /* We have to send this if we get it */