diff options
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -552,6 +552,7 @@ int main(int argc, char *argv[]) return EXIT_FAILURE; } addr = argv[1]; + filename = argv[2]; openlog("tiptorrent-client", LOG_PID, LOG_DAEMON); @@ -562,8 +563,7 @@ int main(int argc, char *argv[]) gettimeofday(&tv_start, NULL); do { - filename = argv[2]; - memset(&_cli, 0, sizeof(_cli)); + tip_client_reset_state(&_cli, -1, 0); _cli.state = TIP_CLIENT_HEAD_HEADER; ret = tip_client_request_file(&_cli, addr, filename); } while (ret > 0); |