summaryrefslogtreecommitdiff
path: root/src/main.c
AgeCommit message (Collapse)Author
2024-01-18add SPDX-License-Identifier to source filesRyo Nakamura
2023-11-25add -P, equivalent to -p for just compatibilityRyo Nakamura
and add a test case for -p and -P
2023-11-25add -I interval optionRyo Nakamura
-I INTERVAL option inserts sleep for interval (seconds) between SSH connection attempts (issue #7).
2023-11-01fix parsing user@host:path.Ryo Nakamura
This commit fixes issue #6. Now mscp command correctly parses [x::x] IPv6 address notation in hostname.
2023-11-01main: adopt rolling average of recent eight bps values to calculate ETARyo Nakamura
2023-11-01main: call only mscp_stop() when receives sigintRyo Nakamura
2023-11-01write total transferred bytes and number of filesRyo Nakamura
at the end of output when serverity is notice.
2023-11-01print 1st decimal point in the progress barRyo Nakamura
2023-11-01add -g option to specify TCP cc algorithmRyo Nakamura
This commit introduce SSH_OPTIONS_CCALGO option to the libssh patch and add -g CONGESTION option to mscp.
2023-08-04fix usage: "none" is not supported for -FRyo Nakamura
2023-08-04introduce git-based versioningRyo Nakamura
MSCP_BUILD_VERSION (`git describe --tags --dirty --match "v*"`) is passed through include/mscp_version.h.in and cmake. When git is failed, use VERSION file instead (for building from source tar balls that excludes .git).
2023-08-04add -F ssh_config optionRyo Nakamura
2023-05-07mscp: maintain mscp_thread structs in listRyo Nakamura
Instead of m->threads array, struct mscp_thread instanes are maintained in m->thread_list. This enables stable counter access via mscp_get_stats().
2023-04-05main: add a white space to the elapsed time outputRyo Nakamura
It adjusts the position of XX:XX in elapsed timeou output.
2023-04-05main: print elapsed time instead ETA at the endRyo Nakamura
2023-03-15rename mscp_prepare to mscp_scanRyo Nakamura
2023-03-15mscp: add -u max_startups option.Ryo Nakamura
pymscp also accepts keyword 'max_startups' (int).
2023-03-15cleanup message print functionsRyo Nakamura
2023-03-13mscp_prepare() scans source paths in a thread.Ryo Nakamura
This commit runs mscp_prepare() in a pthread. mscp copy threads run aysnchronously with mscp_prepare(). So, when mscp_prepare() has not finished yet (due to too many source files), we can start to copy files.
2023-03-11move direction from mscp_opts to mscp_init argumentRyo Nakamura
2023-03-10fix uninitialized dst_path_is_dir boolRyo Nakamura
2023-03-04fix dryrun handling on main.cRyo Nakamura
2023-03-04remove sigalrm. integrate print messages and progress barRyo Nakamura
2023-03-04tiny fix for clang warningRyo Nakamura
2023-03-04use setitimer instead of alarm, and print message.Ryo Nakamura
print_stat now prints messages per interval. ToDo: - realtime message printing - use timer_create instead of setitimer (mscOS has different one)
2023-03-04compilable on ubuntuRyo Nakamura
2023-03-04remove pprint, use message (mpr_*) instead.Ryo Nakamura
ToDo: main should use pipe to receive messages from libmscp.
2023-03-03implementing messaging.Ryo Nakamura
ToDo: remove pprint. mscp should use mpr_* functions, and main.c should use just fprintf(stdout, "\r\033[K" fmt, ...) for printing progress bar.
2023-03-03add message.h and message.c, mscp_set|get_error()Ryo Nakamura
Instead of pr_err(), libmscp uses mscp_set_error() and applications use mscp_get_errror() to get error message.
2023-03-03tiny cleanupRyo Nakamura
2023-03-03add mscp_get_statsRyo Nakamura
move progress bar-related functions from mscp.c to main.c.
2023-03-03add mscp_ssh_opts and change -C optargRyo Nakamura
2023-02-26tiny fix on commentRyo Nakamura
2023-02-26now mscp links libmscpRyo Nakamura
2023-02-16add -r option (but no effect)Ryo Nakamura
2023-02-16add \n at the final outputRyo Nakamura
2022-12-11set default nr_threads to floor(log(cores) * 2) + 1)Ryo Nakamura
This change prevents mscp from establishing too many ssh connections on many-core machines in default.
2022-12-11use pthread_cleanup to acquire and release lockRyo Nakamura
In chunk_prepare(), if multiple threads wait for acquiring f->lock, and then pthread_cancel() is called, the waiting threads are never canceled because pthread_mutex_lock() is not a cancellation point. So, use pthread_cleanup_push/pop to release the lock.
2022-12-08set default NR_AHEAD to 32Ryo Nakamura
2022-12-06fix final progress outputRyo Nakamura
2022-12-05reuse ctrl sftp session for the first copy threadRyo Nakamura
2022-12-04set TCP_NODELAY by default and introduce -N option to disable itRyo Nakamura
2022-12-03remove unused code and introduce -b buf_sz optionRyo Nakamura
This commit removes ifdef ASYNC_WRITE. So, mscp always depends on the patched libssh.
2022-12-02little cleanupRyo Nakamura
2022-12-02add -M hmac optionRyo Nakamura
2022-11-28use sigalrm for printing progress barRyo Nakamura
2022-11-27add ETA to progress printRyo Nakamura
2022-11-27skip sftp_free() inappropriatelyRyo Nakamura
2022-11-26fix duplicate error message on ssh auth failed.Ryo Nakamura
and fix the final \n with -q
2022-11-18fix when copy multiple sources and various tiny fixesRyo Nakamura
* when copying multiple sources, target must be directory * add multi-src copy test and parametrize src/dst prefixes * cleanup REAMDE (s/sessions/connections/g) * make error output in copy functions simple