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
alex037yang
OpenXG-RAN
Commits
2bd870af
Commit
2bd870af
authored
Mar 19, 2016
by
Cedric Roux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- read may return partial content from a socket, deal with that
parent
ef289848
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
tracer/main.c
tracer/main.c
+18
-2
No files found.
tracer/main.c
View file @
2bd870af
...
@@ -44,7 +44,22 @@ static inline int GET(int s, void *out, int count)
...
@@ -44,7 +44,22 @@ static inline int GET(int s, void *out, int count)
#else
/* T_USE_SHARED_MEMORY */
#else
/* T_USE_SHARED_MEMORY */
#define GET read
#define GET fullread
int
fullread
(
int
fd
,
void
*
_buf
,
int
count
)
{
char
*
buf
=
_buf
;
int
ret
=
0
;
int
l
;
while
(
count
)
{
l
=
read
(
fd
,
buf
,
count
);
if
(
l
<=
0
)
{
printf
(
"read socket problem
\n
"
);
abort
();
}
count
-=
l
;
buf
+=
l
;
ret
+=
l
;
}
return
ret
;
}
#endif
/* T_USE_SHARED_MEMORY */
#endif
/* T_USE_SHARED_MEMORY */
...
@@ -236,7 +251,8 @@ void get_message(int s)
...
@@ -236,7 +251,8 @@ void get_message(int s)
buf[11],buf[12],buf[13],buf[14],buf[15]);
buf[11],buf[12],buf[13],buf[14],buf[15]);
#endif
#endif
if
(
size
!=
4
*
7680
)
if
(
size
!=
4
*
7680
)
{
printf
(
"bad T_ENB_INPUT_SIGNAL, only 7680 samples allowed
\n
"
);
abort
();}
{
printf
(
"bad T_ENB_INPUT_SIGNAL, only 7680 samples allowed "
"(received %d bytes = %d samples)
\n
"
,
size
,
size
/
4
);
abort
();}
if
(
ul_plot
)
iq_plot_set
(
ul_plot
,
(
short
*
)
buf
,
7680
,
subframe
*
7680
,
0
);
if
(
ul_plot
)
iq_plot_set
(
ul_plot
,
(
short
*
)
buf
,
7680
,
subframe
*
7680
,
0
);
break
;
break
;
}
}
...
...
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