From fc8b5289b4aa4c8e0439bce12ca79cf1e3e1a318 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Milo=C5=A1=20Mula=C4=8D?= Date: Thu, 3 May 2007 13:47:20 +0000 Subject: [PATCH] set timeout for WS calls --- org.glite.jp.client/src/jpimporter.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/org.glite.jp.client/src/jpimporter.c b/org.glite.jp.client/src/jpimporter.c index cf88a06..31e9a3d 100644 --- a/org.glite.jp.client/src/jpimporter.c +++ b/org.glite.jp.client/src/jpimporter.c @@ -64,6 +64,8 @@ typedef struct { #define MAX_REG_CONNS 500 +#define JPPS_NO_RESPONSE_TIMEOUT 120 + static int debug = 0; static int die = 0; @@ -83,6 +85,7 @@ static char *server_cert = NULL, *cadir = NULL; static gss_cred_id_t mycred = GSS_C_NO_CREDENTIAL; static char *mysubj; +struct timeval to = {JPPS_NO_RESPONSE_TIMEOUT, 0}; static struct option opts[] = { @@ -268,6 +271,7 @@ int main(int argc, char *argv[]) glite_gsplugin_init_context(&plugin_ctx); if (server_key) plugin_ctx->key_filename = strdup(server_key); if (server_cert) plugin_ctx->cert_filename = strdup(server_cert); + glite_gsplugin_set_timeout(plugin_ctx, &to); soap_register_plugin_arg(soap, glite_gsplugin,plugin_ctx); -- 1.8.2.3