Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
PolyORB-HI-C
Commits
fe352d78
Commit
fe352d78
authored
May 04, 2018
by
Maxime Perrotin
Browse files
Revert "* Minor reformatting"
This reverts commit
96cccc1e
parent
92f55e24
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/drivers/po_hi_driver_sockets.c
View file @
fe352d78
...
...
@@ -405,17 +405,14 @@ void* __po_hi_sockets_poller (__po_hi_device_id* dev_id_addr)
for
(
dev
=
0
;
dev
<
__PO_HI_NB_DEVICES
;
dev
++
)
{
__DEBUGMSG
(
"[DRIVER SOCKETS] Try to watch if it comes from device %d (socket=%d)
\n
"
,
dev
,
__po_hi_c_sockets_read_sockets
[
dev
]);
if
(
(
__po_hi_c_sockets_read_sockets
[
dev
]
!=
-
1
)
&&
FD_ISSET
(
__po_hi_c_sockets_read_sockets
[
dev
],
&
selector
))
__DEBUGMSG
(
"[DRIVER SOCKETS] Try to watch if it comes from device %d (socket=%d)
\n
"
,
dev
,
__po_hi_c_sockets_read_sockets
[
dev
]);
if
(
(
__po_hi_c_sockets_read_sockets
[
dev
]
!=
-
1
)
&&
FD_ISSET
(
__po_hi_c_sockets_read_sockets
[
dev
],
&
selector
))
{
__DEBUGMSG
(
"[DRIVER SOCKETS] Receive message from dev %d
\n
"
,
dev
);
#ifdef __PO_HI_USE_PROTOCOL_MYPROTOCOL_I
{
protocol_conf
=
__po_hi_transport_get_protocol_configuration
(
virtual_bus_myprotocol_i
);
protocol_conf
=
__po_hi_transport_get_protocol_configuration
(
virtual_bus_myprotocol_i
);
int
datareceived
;
len
=
recv
(
__po_hi_c_sockets_read_sockets
[
dev
],
&
datareceived
,
sizeof
(
int
),
MSG_WAITALL
);
...
...
@@ -435,19 +432,16 @@ void* __po_hi_sockets_poller (__po_hi_device_id* dev_id_addr)
memset
(
__po_hi_c_sockets_poller_msg
.
content
,
'\0'
,
__PO_HI_MESSAGES_MAX_SIZE
);
#ifdef _WIN32
len
=
recv
(
__po_hi_c_sockets_read_sockets
[
dev
],
__po_hi_c_sockets_poller_msg
.
content
,
__PO_HI_MESSAGES_MAX_SIZE
,
0
);
len
=
recv
(
__po_hi_c_sockets_read_sockets
[
dev
],
__po_hi_c_sockets_poller_msg
.
content
,
__PO_HI_MESSAGES_MAX_SIZE
,
0
);
#else
/* In the following, we first retrieve the size of the
payload, then the payload itself */
int
datareceived
;
len
=
recv
(
__po_hi_c_sockets_read_sockets
[
dev
],
&
datareceived
,
sizeof
(
int
),
MSG_WAITALL
);
len
=
recv
(
__po_hi_c_sockets_read_sockets
[
dev
],
&
datareceived
,
sizeof
(
int
),
MSG_WAITALL
);
datareceived
=
__po_hi_swap_byte
(
datareceived
);
len
=
recv
(
__po_hi_c_sockets_read_sockets
[
dev
],
__po_hi_c_sockets_poller_msg
.
content
,
datareceived
,
MSG_WAITALL
);
len
=
recv
(
__po_hi_c_sockets_read_sockets
[
dev
],
__po_hi_c_sockets_poller_msg
.
content
,
datareceived
,
MSG_WAITALL
);
#endif
__po_hi_c_sockets_poller_msg
.
length
=
len
;
...
...
Write
Preview
Supports
Markdown
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