mirror of
https://github.com/linux-can/can-utils.git
synced 2026-08-05 14:29:54 +02:00
testj1939: use send() when connect()ed
When using connect(), don't re-use the peername but use send() without destination information
This commit is contained in:
+5
-1
@@ -163,7 +163,11 @@ int main(int argc, char *argv[])
|
||||
dat[j] = ((2*j) << 4) + ((2*j+1) & 0xf);
|
||||
|
||||
/* send data */
|
||||
if (valid_peername)
|
||||
/*
|
||||
* when using connect, do not provide additional
|
||||
* destination information and use send()
|
||||
*/
|
||||
if (valid_peername && !todo_connect)
|
||||
ret = sendto(sock, dat, todo_send, 0,
|
||||
(void *)&peername, sizeof(peername));
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user