From 0cf3acee20f9b3f5c5961e754ab33c59b8dd4bb9 Mon Sep 17 00:00:00 2001 From: Ryo Nakamura Date: Sat, 25 Nov 2023 15:17:33 +0900 Subject: add -I interval option -I INTERVAL option inserts sleep for interval (seconds) between SSH connection attempts (issue #7). --- src/pymscp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/pymscp.c') diff --git a/src/pymscp.c b/src/pymscp.c index 6861ad8..62b2f0d 100644 --- a/src/pymscp.c +++ b/src/pymscp.c @@ -97,6 +97,7 @@ static PyObject *wrap_mscp_init(PyObject *self, PyObject *args, PyObject *kw) "coremask", /* const char * */ "max_startups", /* int */ + "interval", /* int */ "severity", /* int, MSCP_SERVERITY_* */ "msg_fd", /* int */ @@ -118,7 +119,7 @@ static PyObject *wrap_mscp_init(PyObject *self, PyObject *args, PyObject *kw) "enable_nagle", /* bool */ NULL, }; - const char *fmt = "si" "|" "ii" "kkk" "s" "iii" "ssss" "ssssss" "ipp"; + const char *fmt = "si" "|" "ii" "kkk" "s" "iiii" "ssss" "ssssss" "ipp"; char *coremask = NULL; char *login_name = NULL, *port = NULL, *config = NULL, *identity = NULL; char *cipher = NULL, *hmac = NULL, *compress = NULL, *ccalgo = NULL; @@ -146,6 +147,7 @@ static PyObject *wrap_mscp_init(PyObject *self, PyObject *args, PyObject *kw) &i->mo.buf_sz, &coremask, &i->mo.max_startups, + &i->mo.interval, &i->mo.severity, &i->mo.msg_fd, &login_name, -- cgit v1.2.3