mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
counters should be unsigned
git-svn-id: https://zerberus.eonerc.rwth-aachen.de:8443/svn/s2ss/trunk@36 8ec27952-4edc-4aab-86aa-e87bb2611832
This commit is contained in:
parent
92ed4b4709
commit
c69efeec92
2 changed files with 9 additions and 8 deletions
|
@ -26,19 +26,16 @@ struct path
|
|||
int (*hooks[MAX_HOOKS])(struct msg *m);
|
||||
|
||||
/// Counter for received messages
|
||||
int received;
|
||||
unsigned int received;
|
||||
|
||||
/// Counter for messages which arrived reordered
|
||||
int delayed;
|
||||
unsigned int delayed;
|
||||
|
||||
/// Counter for messages which arrived multiple times
|
||||
int duplicated;
|
||||
unsigned int duplicated;
|
||||
|
||||
/// Last known message number
|
||||
int sequence;
|
||||
|
||||
/// The current path state
|
||||
enum path_state state;
|
||||
unsigned int sequence;
|
||||
|
||||
/// The path thread
|
||||
pthread_t tid;
|
||||
|
|
|
@ -17,7 +17,10 @@ extern struct config config;
|
|||
|
||||
int path_create(struct path *p, struct node *in, struct node *out)
|
||||
{
|
||||
memset(p, 0, sizeof(struct path));
|
||||
/* Reset counters */
|
||||
p->received = 0;
|
||||
p->delayed = 0;
|
||||
p->duplicated = 0;
|
||||
|
||||
p->in = in;
|
||||
p->out = out;
|
||||
|
@ -44,6 +47,7 @@ static void * path_run(void *arg)
|
|||
p->duplicated++;
|
||||
}
|
||||
|
||||
p->sequence = m.sequence;
|
||||
p->received++;
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue