Commit 478b1a5e authored by Alessandro Rubini's avatar Alessandro Rubini Committed by Aurelio Colosimo

state-initializing: don't shutdown the first time (ENOTSOCK)

parent e1cc21b2
...@@ -9,15 +9,19 @@ ...@@ -9,15 +9,19 @@
/* /*
* Initializes network and other stuff * Initializes network and other stuff
*/ */
static int pp_did_init;
int pp_initializing(struct pp_instance *ppi, unsigned char *pkt, int plen) int pp_initializing(struct pp_instance *ppi, unsigned char *pkt, int plen)
{ {
unsigned char *id, *mac; unsigned char *id, *mac;
pp_net_shutdown(ppi); if (pp_did_init)
pp_net_shutdown(ppi);
if (pp_net_init(ppi) < 0) if (pp_net_init(ppi) < 0)
goto failure; goto failure;
pp_did_init = 1;
/* Initialize default data set */ /* Initialize default data set */
DSDEF(ppi)->twoStepFlag = PP_TWO_STEP_FLAG; DSDEF(ppi)->twoStepFlag = PP_TWO_STEP_FLAG;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment