Forgotten port for testing (testbed firewall updated),
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Fri, 14 Oct 2005 19:05:43 +0000 (19:05 +0000)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Fri, 14 Oct 2005 19:05:43 +0000 (19:05 +0000)
converted some printf to debug printfs.

org.glite.jp.index/examples/jpis-test.c
org.glite.jp.index/src/conf.h
org.glite.jp.index/src/db_ops.c
org.glite.jp.index/src/soap_ops.c
org.glite.jp.index/src/soap_ps_calls.c

index 3c92f12..da04d47 100644 (file)
@@ -28,8 +28,7 @@ static int check_fault(struct soap *soap,int err);
        
 int main(int argc,char *argv[])
 {
-       //char  *server = "http://localhost:8902";
-       char    *server = "http://localhost:10005";
+       char    *server = "http://localhost:8902";
        struct soap     *soap = soap_new();
 
        soap_init(soap);        
index f1ed0fa..22003d9 100644 (file)
@@ -8,6 +8,9 @@
 
 #define GLITE_JPIS_DEFAULT_PORT_STR "8902"
 
+//#define lprintf
+#define lprintf printf
+
 typedef struct _glite_jp_is_feed {
        char                    *PS_URL;        //URLs of Primary Storage servers
        glite_jp_query_rec_t    **query;        // query to Primary Server (aka filter)
index 65b61a6..7b570bb 100644 (file)
@@ -36,9 +36,6 @@
 )"
 #define INDEX_LENGTH 255
 
-//#define lprintf
-#define lprintf printf
-
 #define WORD_SWAP(X) ((((X) >> 8) & 0xFF) | (((X) & 0xFF) << 8))
 #define LONG_SWAP(X) (WORD_SWAP(((X) >> 16) & 0xFFFF) | ((WORD_SWAP(X) & 0xFFFF) << 16))
 #if __BYTE_ORDER == __LITTLE_ENDIAN
index 4dc506b..08d1c91 100644 (file)
@@ -81,7 +81,7 @@ static int updateJob(glite_jpis_context_t ctx, const char *feedid, struct jptype
        struct jptype__attrValue *attr;
        int ret, iattrs;
 
-       printf("%s: jobid='%s', attrs=%d\n", __FUNCTION__, jobAttrs->jobid, jobAttrs->__sizeattributes);
+       lprintf("%s: jobid='%s', attrs=%d\n", __FUNCTION__, jobAttrs->jobid, jobAttrs->__sizeattributes);
 
        if (jobAttrs->remove) assert(*(jobAttrs->remove) == 0);
 
@@ -140,7 +140,7 @@ SOAP_FMAC5 int SOAP_FMAC6 __jpsrv__UpdateJobs(
 fail:
 // TODO: bubble up
        err = glite_jp_error_chain(ctx->jpctx);
-       printf("%s:%s\n", __FUNCTION__, err);
+       fprintf(stderr, "%s:%s\n", __FUNCTION__, err);
        free(err);
        return SOAP_FAULT;
 }
index 1a61362..b879efa 100644 (file)
@@ -132,7 +132,7 @@ int MyFeedIndex(glite_jpis_context_t ctx, glite_jp_is_conf *conf, long int uniqu
        glite_jp_error_t err;
        char *src, hname[512];
 
-printf("MyFeedIndex for %s called\n", dest);
+lprintf("MyFeedIndex for %s called\n", dest);
 
        soap_init(soap);
         soap_set_namespaces(soap,jpps__namespaces);
@@ -158,7 +158,7 @@ printf("MyFeedIndex for %s called\n", dest);
                        err.code = EINVAL;
                        err.desc = "error during conds conversion";
                        asprintf(&src, "%s/%s():%d", __FILE__, __FUNCTION__, __LINE__);
-                       printf("%s\n", src);
+                       fprintf(stderr, "%s\n", src);
                        goto err;
                }
        }
@@ -166,19 +166,19 @@ printf("MyFeedIndex for %s called\n", dest);
        in.history = conf->feeds[dest_index]->history;
        in.continuous = conf->feeds[dest_index]->continuous;
        in.destination = ctx->hname;
-       printf("%s:%s\n", __FUNCTION__, ctx->hname);
+       fprintf(stderr, "%s:%s\n", __FUNCTION__, ctx->hname);
 
        if (check_fault(soap,soap_call___jpsrv__FeedIndex(soap,dest,"", &in, &out)) != 0) {
-               printf("\n");
+               fprintf(stderr, "\n");
                glite_jpis_unlockFeed(ctx, uniqueid);
                err.code = EIO;
                err.desc = "soap_call___jpsrv__FeedIndex() returned error";
                asprintf(&src, "%s/%s():%d", __FILE__, __FUNCTION__, __LINE__);
-               printf("%s\n", err.desc);
+               fprintf(stderr, "%s\n", err.desc);
                goto err;
        }
        else {
-               printf("FeedId: %s\nExpires: %s\n",out.feedId,ctime(&out.feedExpires));
+               lprintf("FeedId: %s\nExpires: %s\n",out.feedId,ctime(&out.feedExpires));
                glite_jpis_initFeed(ctx, uniqueid, out.feedId, out.feedExpires);
                glite_jpis_unlockFeed(ctx, uniqueid);
        }