Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
PPSi
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
50
Issues
50
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
PPSi
Commits
63e90550
Commit
63e90550
authored
Dec 28, 2011
by
Aurelio Colosimo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
next_delay handled with a default value
parent
18deb6e0
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
3 deletions
+12
-3
constants.h
include/pproto/constants.h
+2
-0
state-disabled.c
proto-standard/state-disabled.c
+2
-1
state-faulty.c
proto-standard/state-faulty.c
+2
-2
state-initializing.c
proto-standard/state-initializing.c
+2
-0
state-listening.c
proto-standard/state-listening.c
+2
-0
state-passive.c
proto-standard/state-passive.c
+2
-0
No files found.
include/pproto/constants.h
View file @
63e90550
...
...
@@ -56,6 +56,8 @@
#define PP_PDELAY_RESP_FOLLOW_UP_LENGTH 54
#define PP_MANAGEMENT_LENGTH 48
#define PP_DEFAULT_NEXT_DELAY_MS 1000
/* UDP/IPv4 dependent */
#define PP_SUBDOMAIN_ADDRESS_LENGTH 4
#define PP_PORT_ADDRESS_LENGTH 2
...
...
proto-standard/state-disabled.c
View file @
63e90550
...
...
@@ -5,6 +5,7 @@
int
pp_disabled
(
struct
pp_instance
*
ppi
,
unsigned
char
*
pkt
,
int
plen
)
{
/* TODO */
/* nothing to do */
ppi
->
next_delay
=
PP_DEFAULT_NEXT_DELAY_MS
;
return
0
;
}
proto-standard/state-faulty.c
View file @
63e90550
...
...
@@ -12,7 +12,7 @@
int
pp_faulty
(
struct
pp_instance
*
ppi
,
unsigned
char
*
pkt
,
int
plen
)
{
pp_printf
(
"event FAULT_CLEARED
\n
"
);
ppi
->
next_state
=
1000
;
ppi
->
next_delay
=
PP
S_INITIALIZING
;
ppi
->
next_state
=
PPS_INITIALIZING
;
ppi
->
next_delay
=
PP
_DEFAULT_NEXT_DELAY
;
return
0
;
}
proto-standard/state-initializing.c
View file @
63e90550
...
...
@@ -61,10 +61,12 @@ int pp_initializing(struct pp_instance *ppi, unsigned char *pkt, int plen)
msg_pack_header
(
ppi
->
buf_out
,
ppi
);
ppi
->
next_state
=
PPS_LISTENING
;
ppi
->
next_delay
=
PP_DEFAULT_NEXT_DELAY
;
return
0
;
failure:
pp_printf
(
"Failed to initialize network
\n
"
);
ppi
->
next_state
=
PPS_FAULTY
;
ppi
->
next_delay
=
PP_DEFAULT_NEXT_DELAY
;
return
0
;
}
proto-standard/state-listening.c
View file @
63e90550
...
...
@@ -40,5 +40,7 @@ state_updated:
pp_timer_stop
(
ppi
->
timers
[
PP_TIMER_ANNOUNCE_RECEIPT
]);
}
ppi
->
next_delay
=
PP_DEFAULT_NEXT_DELAY
;
return
0
;
}
proto-standard/state-passive.c
View file @
63e90550
...
...
@@ -53,5 +53,7 @@ state_updated:
pp_timer_stop
(
ppi
->
timers
[
PP_TIMER_PDELAYREQ_INTERVAL
]);
}
ppi
->
next_delay
=
PP_DEFAULT_NEXT_DELAY
;
return
0
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment