Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
PRRT
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
37
Issues
37
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LARN
PRRT
Commits
d7689b13
Commit
d7689b13
authored
Aug 06, 2018
by
Andreas Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix maximum value vs. value count for SEQNO_SPACE and TIMESTAMP_SPACE.
parent
54e839ad
Pipeline
#2806
failed with stages
in 1 minute and 11 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
7 deletions
+7
-7
prrt/defines.h
prrt/defines.h
+2
-2
prrt/proto/stores/packetDeliveryStore.c
prrt/proto/stores/packetDeliveryStore.c
+2
-2
prrt/proto/stores/repairBlockStore.c
prrt/proto/stores/repairBlockStore.c
+1
-1
prrt/proto/types/channelStateInformation.c
prrt/proto/types/channelStateInformation.c
+1
-1
prrt/util/time.c
prrt/util/time.c
+1
-1
No files found.
prrt/defines.h
View file @
d7689b13
...
...
@@ -24,9 +24,9 @@
#define MAX_PAYLOAD_LENGTH 65507 // maximum UDP packet length (2^16 - 1 - 8 (UDP Header) - 20 (IP Header))
#define SEQNO_SPACE
UINT16_MAX
// 2**16 as seqno is uint16_t
#define SEQNO_SPACE
(UINT16_MAX+1)
// 2**16 as seqno is uint16_t
#define TIMESTAMP_SPACE
UINT32_MAX
#define TIMESTAMP_SPACE
(UINT32_MAX+1)
#define GF_BITS 8
...
...
prrt/proto/stores/packetDeliveryStore.c
View file @
d7689b13
...
...
@@ -127,7 +127,7 @@ PrrtPacket *PrrtPacketDeliveryStore_get_packet(PrrtPacketDeliveryStore *store, p
check
(
pthread_mutex_lock
(
&
store
->
lock
)
==
EXIT_SUCCESS
,
"Lock failed."
);
if
(
start
>
stop
)
{
packet
=
BPTree_get_first_in_range
(
store
->
tree
,
(
BPTreeKey_t
)
start
,
TIMESTAMP_SPACE
-
1
);
packet
=
BPTree_get_first_in_range
(
store
->
tree
,
(
BPTreeKey_t
)
start
,
TIMESTAMP_SPACE
-
1
);
if
(
packet
==
NULL
)
{
packet
=
BPTree_get_first_in_range
(
store
->
tree
,
0
,
(
BPTreeKey_t
)
stop
);
}
...
...
@@ -173,7 +173,7 @@ void PrrtPacketDeliveryStore_cleanup(PrrtPacketDeliveryStore *store, prrtTimesta
BPTree_get_range
(
store
->
tree
,
packetList
,
now
-
TIMESTAMP_SPACE
/
2
,
now
);
}
else
{
BPTree_get_range
(
store
->
tree
,
packetList
,
0
,
now
);
BPTree_get_range
(
store
->
tree
,
packetList
,
now
+
TIMESTAMP_SPACE
/
2
,
TIMESTAMP_SPACE
);
BPTree_get_range
(
store
->
tree
,
packetList
,
now
+
TIMESTAMP_SPACE
/
2
,
TIMESTAMP_SPACE
-
1
);
}
while
(
List_count
(
packetList
)
>
0
)
{
PrrtPacket
*
packet
=
List_shift
(
packetList
);
...
...
prrt/proto/stores/repairBlockStore.c
View file @
d7689b13
...
...
@@ -91,7 +91,7 @@ bool PrrtRepairBlockStore_expire_block_range(PrrtRepairBlockStore *store, prrtSe
List
*
blocks
=
List_create
();
if
(
start
>
stop
)
{
BPTree_get_range
(
store
->
blockTree
,
blocks
,
start
,
(
prrtSequenceNumber_t
)
(
SEQNO_SPACE
-
1
));
BPTree_get_range
(
store
->
blockTree
,
blocks
,
start
,
(
prrtSequenceNumber_t
)
(
SEQNO_SPACE
-
1
));
BPTree_get_range
(
store
->
blockTree
,
blocks
,
0
,
stop
);
}
else
{
BPTree_get_range
(
store
->
blockTree
,
blocks
,
start
,
stop
);
...
...
prrt/proto/types/channelStateInformation.c
View file @
d7689b13
...
...
@@ -13,7 +13,7 @@ PrrtChannelStateInformation * PrrtChannelStateInformation_create()
check
(
pthread_mutex_init
(
&
csi
->
lock
,
NULL
)
==
0
,
"Mutex init failed."
);
csi
->
rtprop
=
TIMESTAMP_SPACE
;
csi
->
rtprop
=
TIMESTAMP_SPACE
-
1
;
csi
->
rtprop_filter_length_us
=
2
*
1000
*
1000
;
// 2 seconds
csi
->
deliveryRate
=
0
;
...
...
prrt/util/time.c
View file @
d7689b13
...
...
@@ -32,6 +32,6 @@ int64_t PrrtTimestamp_cmp(prrtTimestamp_t a, prrtTimestamp_t b) {
if
(
diff
<
TIMESTAMP_SPACE
/
2
)
{
return
diff
;
}
else
{
return
((
int64_t
)
diff
)
-
((
int64_t
)(
TIMESTAMP_SPACE
)
+
1
);
return
((
int64_t
)
diff
)
-
((
int64_t
)(
TIMESTAMP_SPACE
));
}
}
\ No newline at end of file
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