Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
canghaiwuhen
OpenXG-RAN
Commits
11090635
Commit
11090635
authored
Aug 14, 2020
by
Haruki NAOI
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix: Receive multiple sf_indication.
(cherry picked from commit edd9d0e8237dad97901bee1f6bfc6a40af2246d0)
parent
2a9f33e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
nfapi/open-nFAPI/vnf/src/vnf_p7_interface.c
nfapi/open-nFAPI/vnf/src/vnf_p7_interface.c
+15
-0
No files found.
nfapi/open-nFAPI/vnf/src/vnf_p7_interface.c
View file @
11090635
...
...
@@ -393,6 +393,10 @@ int nfapi_vnf_p7_time(nfapi_vnf_p7_config_t* config){
int
ret
;
static
int
sync
=
0
;
uint8_t
timeout_flag
=
0
;
struct
timespec
time_out
;
struct
timespec
time_now
;
sock_1ms
=
socket
(
AF_INET
,
SOCK_DGRAM
,
0
);
addr
.
sin_family
=
AF_INET
;
addr
.
sin_port
=
htons
(
50040
);
...
...
@@ -478,9 +482,20 @@ int nfapi_vnf_p7_time(nfapi_vnf_p7_config_t* config){
break
;
}
}
if
(
timeout_flag
==
1
){
clock_gettime
(
CLOCK_REALTIME
,
&
time_now
);
uint32_t
time_diff
=
(
time_now
.
tv_sec
-
time_out
.
tv_sec
)
*
1000000
+
(
time_now
.
tv_nsec
-
time_out
.
tv_nsec
)
/
1000
;
if
(
time_diff
<
500
){
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"after timeout,recv signal : time interval = %d
\n
"
,
time_diff
);
continue
;
}
timeout_flag
=
0
;
}
}
else
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"recv timeout sfnsf = 0x%x
\n
"
,
curr
->
sfn_sf
);
timeout_flag
=
1
;
clock_gettime
(
CLOCK_REALTIME
,
&
time_out
);
}
sync
=
1
;
...
...
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