Quick update (internal structures of gsoap-plugin needed),
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Wed, 30 May 2007 08:04:48 +0000 (08:04 +0000)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Wed, 30 May 2007 08:04:48 +0000 (08:04 +0000)
SQL escaping of ' ==> used it instead of "
Small old patch for test scripts.

org.glite.jp.index/examples/jpis-test.c
org.glite.jp.index/examples/query-tests/run-test.sh
org.glite.jp.index/src/bones_server.c
org.glite.jp.index/src/soap_ops.c
org.glite.jp.index/src/soap_ps_calls.c

index f450182..02ac20e 100644 (file)
@@ -4,6 +4,7 @@
 #include <assert.h>
 
 #include <glite/security/glite_gsplugin.h>
+#include <glite/security/glite_gss.h>
 #include "glite/jp/strmd5.h"
 
 #include "jp_H.h"
index 32388a0..0ee2d68 100755 (executable)
@@ -121,6 +121,7 @@ run_is() {
 
        echo -n "I"
        # run index server
+       #valgrind --tool=memcheck --trace-children=yes --num-callers=15 --suppressions=$HOME/egee.supp
        X509_USER_KEY=${X509_USER_KEY} X509_USER_CERT=${X509_USER_CERT} \
        $GLITE_LOCATION/bin/glite-jp-indexd -m $GLITE_JPIS_TEST_DB -p $GLITE_JPIS_TEST_PORT \
                        -i ${GLITE_JPIS_TEST_PIDFILE} -o ${GLITE_JPIS_TEST_LOGFILE} \
@@ -148,7 +149,7 @@ run_is() {
        ret=1
        i=0
        while [ x"$ret" != x"0" -a $i -lt 20 ]; do
-               netstat -tap 2>/dev/null | grep "\<$GLITE_JPIS_TEST_PORT\>" > /dev/null
+               netstat -tapn 2>/dev/null | grep "\<$GLITE_JPIS_TEST_PORT\>" > /dev/null
                ret=$?
                i=$(($i+1))
                sleep 0.1
index 279254c..da846d8 100644 (file)
@@ -14,6 +14,7 @@
 #include <stdsoap2.h>
 #include <glite/security/glite_gss.h>
 #include <glite/security/glite_gsplugin.h>
+#include <glite/security/glite_gsplugin-int.h>
 
 #include "conf.h"
 #include "db_ops.h"
index f05abee..eb6880b 100644 (file)
@@ -268,7 +268,7 @@ static int get_sql_cond(char **sql, const char *attr_md5, enum jptype__queryOp o
        if (get_op(op, &qop) != 0) return 0;
        if (attr_md5) trio_asprintf(&column, "attr_%|Ss.value", attr_md5);
        else asprintf(&column, "jobs.dg_jobid");
-       trio_asprintf(sql, "%s %s \"%|Ss\"", column, qop, value);
+       trio_asprintf(sql, "%s %s '%|Ss'", column, qop, value);
        free(column);
        free(qop);
        if (op == jptype__queryOp__WITHIN) {
@@ -277,7 +277,7 @@ static int get_sql_cond(char **sql, const char *attr_md5, enum jptype__queryOp o
                        *sql = NULL;
                        return EINVAL;
                }
-               trio_asprintf(&s, "%s AND \"%|Ss\"", *sql, value2);
+               trio_asprintf(&s, "%s AND '%|Ss'", *sql, value2);
                free(*sql); *sql = s;
        }
        return 0;
index 0f9eed2..cc4595e 100644 (file)
@@ -7,6 +7,7 @@
 #include "glite/jp/types.h"
 #include "glite/jp/context.h"
 #include "glite/security/glite_gsplugin.h"
+#include "glite/security/glite_gsplugin-int.h"
 #include "glite/security/glite_gscompat.h"
 
 #include "jp_H.h"