mirror of
git://git.psyc.eu/libpsyc
synced 2024-08-15 03:19:02 +00:00
+
This commit is contained in:
parent
4b9ea95d3b
commit
a4b1dca3be
2 changed files with 1 additions and 7 deletions
|
@ -35,9 +35,6 @@ void *get_in_addr (struct sockaddr *sa) {
|
|||
}
|
||||
|
||||
void test_file(const char* filename, size_t recv_buf_size) {
|
||||
if (recv_buf_size <= 0)
|
||||
recv_buf_size = RECV_BUF_SIZE;
|
||||
|
||||
char buf[CONT_BUF_SIZE + RECV_BUF_SIZE]; // cont buf + recv buf: [ ccrrrr]
|
||||
char *recvbuf = buf + CONT_BUF_SIZE; // recv buf: ^^^^
|
||||
size_t nbytes;
|
||||
|
@ -55,9 +52,6 @@ void test_file(const char* filename, size_t recv_buf_size) {
|
|||
}
|
||||
|
||||
void test_server(const char* port, size_t recv_buf_size) {
|
||||
if (recv_buf_size <= 0)
|
||||
recv_buf_size = RECV_BUF_SIZE;
|
||||
|
||||
char buf[CONT_BUF_SIZE + RECV_BUF_SIZE]; // cont buf + recv buf: [ ccrrrr]
|
||||
char *recvbuf = buf + CONT_BUF_SIZE; // recv buf: ^^^^
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ int main (int argc, char **argv) {
|
|||
no_render = opts && memchr(opts, (int)'n', strlen(opts));
|
||||
progress = opts && memchr(opts, (int)'p', strlen(opts));
|
||||
file = opts && memchr(opts, (int)'f', strlen(opts));
|
||||
size_t recv_buf_size = argc > 3 ? atoi(argv[3]) : 0;
|
||||
size_t recv_buf_size = argc > 3 ? atoi(argv[3]) : RECV_BUF_SIZE;
|
||||
|
||||
if (file)
|
||||
test_file(argv[1], recv_buf_size);
|
||||
|
|
Loading…
Reference in a new issue