From 6818bec8e4b9b4edea58c6425162621b42fdffa1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Milo=C5=A1=20Mula=C4=8D?= Date: Tue, 14 Mar 2006 16:03:44 +0000 Subject: [PATCH] buffer xml responces - greatly increases transfer of bigger XML files --- org.glite.jp.primary/src/bones_server.c | 8 ++++++-- org.glite.jp.primary/src/is_client.c | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/org.glite.jp.primary/src/bones_server.c b/org.glite.jp.primary/src/bones_server.c index 95436b0..b4c408c 100644 --- a/org.glite.jp.primary/src/bones_server.c +++ b/org.glite.jp.primary/src/bones_server.c @@ -224,7 +224,7 @@ static int data_init(void **data) printf("[%d] slave started\n",getpid()); glite_jpps_srv_init(ctx); glite_jppsbe_init_slave(ctx); /* XXX: global but slave's */ - // sleep(10); + //sleep(10); if (glite_jppsbe_read_feeds(ctx)) fputs(glite_jp_error_chain(ctx),stderr); printf("[%d] slave init done\n",getpid()); @@ -246,6 +246,9 @@ static int newconn(int conn,struct timeval *to,void *data) int ret = 0; soap_init2(soap,SOAP_IO_KEEPALIVE,SOAP_IO_KEEPALIVE); + soap_set_omode(soap, SOAP_IO_BUFFER); // set buffered response + // buffer set to SOAP_BUFLEN (default = 8k) + soap_set_namespaces(soap,jpps__namespaces); soap->user = (void *) ctx; /* XXX: one instance per slave */ @@ -356,7 +359,8 @@ static int request(int conn,struct timeval *to,void *data) } return ECANCELED; // let srv_bones know something is wrong } - +//printf("Ja cekam %d\n", getpid()); +//sleep(10); if (glite_jp_run_deferred(ctx)) { char *e; fprintf(stderr,"[%d] %s\n",getpid(),e = glite_jp_error_chain(ctx)); diff --git a/org.glite.jp.primary/src/is_client.c b/org.glite.jp.primary/src/is_client.c index 30c12a9..ff77ca4 100644 --- a/org.glite.jp.primary/src/is_client.c +++ b/org.glite.jp.primary/src/is_client.c @@ -39,6 +39,8 @@ static int check_other_soap(glite_jp_context_t ctx) ctx->other_soap = soap_new(); soap_init(ctx->other_soap); soap_set_namespaces(ctx->other_soap,jpis__namespaces); + soap_set_omode(ctx->other_soap, SOAP_IO_BUFFER); // set buffered response + // buffer set to SOAP_BUFLEN (default = 8k) soap_register_plugin_arg(ctx->other_soap,glite_gsplugin,plugin_ctx); ctx->other_soap->user = ctx; } -- 1.8.2.3