summaryrefslogtreecommitdiff
path: root/src/pymscp.c
diff options
context:
space:
mode:
authorRyo Nakamura <upa@haeena.net>2023-11-25 15:17:33 +0900
committerRyo Nakamura <upa@haeena.net>2023-11-25 15:17:33 +0900
commit0cf3acee20f9b3f5c5961e754ab33c59b8dd4bb9 (patch)
tree5c9a7137dfada3a3eb2d0c8d4a06afc6035c7313 /src/pymscp.c
parentc292ce2b29d641f8ab2bca374c0fa2764dbfe5bc (diff)
add -I interval option
-I INTERVAL option inserts sleep for interval (seconds) between SSH connection attempts (issue #7).
Diffstat (limited to 'src/pymscp.c')
-rw-r--r--src/pymscp.c4
1 files changed, 3 insertions, 1 deletions
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,