buffer xml responces
authorMiloš Mulač <mulac@civ.zcu.cz>
Tue, 14 Mar 2006 16:03:44 +0000 (16:03 +0000)
committerMiloš Mulač <mulac@civ.zcu.cz>
Tue, 14 Mar 2006 16:03:44 +0000 (16:03 +0000)
- greatly increases transfer of bigger XML files

org.glite.jp.primary/src/bones_server.c
org.glite.jp.primary/src/is_client.c

index 95436b0..b4c408c 100644 (file)
@@ -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));
index 30c12a9..ff77ca4 100644 (file)
@@ -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;
        }