Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SMILE FEE
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Armin Luntzer
SMILE FEE
Commits
a894cf85
Commit
a894cf85
authored
4 years ago
by
Armin Luntzer
Browse files
Options
Downloads
Patches
Plain Diff
fixed: usr_pkt_to_gresb() did not convert the raw buffer to a gresb data payload
parent
dc4c6575
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
GRESB/gresb_bridge.c
+10
-2
10 additions, 2 deletions
GRESB/gresb_bridge.c
with
10 additions
and
2 deletions
GRESB/gresb_bridge.c
+
10
−
2
View file @
a894cf85
...
...
@@ -234,6 +234,7 @@ static int usr_pkt_to_gresb(int fd, struct bridge_cfg *cfg)
{
int
ret
;
ssize_t
recv_bytes
;
uint8_t
*
gresb_pkt
;
unsigned
char
*
recv_buffer
;
...
...
@@ -248,13 +249,20 @@ static int usr_pkt_to_gresb(int fd, struct bridge_cfg *cfg)
printf
(
"%c"
,
recv_buffer
[
i
]);
}
#endif
gresb_pkt
=
gresb_create_host_data_pkt
(
recv_buffer
,
recv_bytes
);
if
(
!
gresb_pkt
)
{
printf
(
"error creating packet
\n
"
);
exit
(
EXIT_FAILURE
);
}
/* we SEND to the TX port */
ret
=
send_all
(
cfg
->
gresb_tx
->
socket
,
re
cv_buffer
,
recv_bytes
);
ret
=
send_all
(
cfg
->
gresb_tx
->
socket
,
gresb_pkt
,
g
re
sb_get_host_data_pkt_size
(
gresb_pkt
)
);
if
(
ret
==
-
1
)
perror
(
"send"
);
gresb_destroy_host_data_pkt
((
struct
host_to_gresb_pkt
*
)
gresb_pkt
);
free
(
recv_buffer
);
return
recv_bytes
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment