Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
bytevia
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Michael Pastushkov
bytevia
Commits
06c2d634
Commit
06c2d634
authored
Sep 18, 2024
by
Michael Pastushkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
d21971cf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
src/bytevia.c
+4
-4
No files found.
src/bytevia.c
View file @
06c2d634
...
@@ -349,7 +349,7 @@ int use(void)
...
@@ -349,7 +349,7 @@ int use(void)
unsigned
char
buffer
[
options
.
buffer_size
];
unsigned
char
buffer
[
options
.
buffer_size
];
struct
sockaddr_in
client_addr
;
struct
sockaddr_in
client_addr
;
socklen_t
addr_len
=
sizeof
(
client_addr
);
socklen_t
addr_len
=
sizeof
(
client_addr
);
int
count_recv
,
count_sent
;
int
count_recv
;
//
, count_sent;
for
(;;)
for
(;;)
{
{
...
@@ -393,7 +393,7 @@ int use(void)
...
@@ -393,7 +393,7 @@ int use(void)
decode
(
buffer
,
count_recv
)
:
decode
(
buffer
,
count_recv
)
:
encode
(
buffer
,
count_recv
);
encode
(
buffer
,
count_recv
);
count_sent
=
(
options
.
proto
==
SOCK_DGRAM
)
?
/* count_sent */
=
(
options
.
proto
==
SOCK_DGRAM
)
?
sendto
(
rc
.
remote_socket
,
buffer
,
count_recv
,
0
,
(
struct
sockaddr
*
)
&
rc
.
remote_addr
,
sizeof
(
rc
.
remote_addr
))
:
sendto
(
rc
.
remote_socket
,
buffer
,
count_recv
,
0
,
(
struct
sockaddr
*
)
&
rc
.
remote_addr
,
sizeof
(
rc
.
remote_addr
))
:
send
(
rc
.
remote_socket
,
buffer
,
count_recv
,
0
);
send
(
rc
.
remote_socket
,
buffer
,
count_recv
,
0
);
...
@@ -429,12 +429,12 @@ int use(void)
...
@@ -429,12 +429,12 @@ int use(void)
encode
(
buffer
,
count_recv
)
:
encode
(
buffer
,
count_recv
)
:
decode
(
buffer
,
count_recv
);
decode
(
buffer
,
count_recv
);
count_sent
=
(
options
.
proto
==
SOCK_DGRAM
)
?
/* count_sent = */
(
options
.
proto
==
SOCK_DGRAM
)
?
sendto
(
rc
.
client_socket
,
buffer
,
count_recv
,
0
,
(
struct
sockaddr
*
)
&
client_addr
,
addr_len
)
:
sendto
(
rc
.
client_socket
,
buffer
,
count_recv
,
0
,
(
struct
sockaddr
*
)
&
client_addr
,
addr_len
)
:
send
(
rc
.
client_socket
,
buffer
,
count_recv
,
0
);
send
(
rc
.
client_socket
,
buffer
,
count_recv
,
0
);
if
(
options
.
log
>
1
)
if
(
options
.
log
>
1
)
printf
(
"sent %d
\t
%s:%d
\t
pid:
\n
"
,
inet_ntoa
(
client_addr
.
sin_addr
),
ntohs
(
client_addr
.
sin_port
),
getpid
());
printf
(
"sent %d
\t
%s:%d
\t
pid:
\n
"
,
count_recv
,
inet_ntoa
(
client_addr
.
sin_addr
),
ntohs
(
client_addr
.
sin_port
),
getpid
());
}
}
}
}
...
...
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