Removed glite_jppsbe_readline (fixes build of jp.index).
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Tue, 15 Apr 2008 11:35:14 +0000 (11:35 +0000)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Tue, 15 Apr 2008 11:35:14 +0000 (11:35 +0000)
Comments in YAIM.
Warning in DB module.

org.glite.jp.common/interface/backend.h
org.glite.jp.common/src/utils.c
org.glite.jp.index/config/defaults/glite-jpis.pre
org.glite.jp.index/config/functions/config_glite_jpis
org.glite.lbjp-common.db/src/db.c

index 69754ae..3c8c1da 100644 (file)
@@ -102,13 +102,6 @@ int glite_jppsbe_query(
        )
 );
 
-int glite_jppsbe_readline(
-        glite_jp_context_t ctx,
-        void *handle,
-        void **b,
-        char **line
-);
-
 char* glite_jpps_get_namespace(
        const char* attr
 );
index 6814705..a931d3f 100644 (file)
@@ -50,82 +50,6 @@ int check_realloc_line(char **line, size_t *maxlen, size_t len) {
         return 1;
 }
 
-/*
- * read next line from stream
- *
- * \return error code
- */
-int glite_jppsbe_readline(
-        glite_jp_context_t ctx,
-        void *handle,
-        void **b,
-        char **line
-)
-{
-        size_t maxlen, len, i;
-        ssize_t nbytes;
-        int retval, z, end;
-       rl_buffer_t     *buffer;
-
-       if (!*b) *b = calloc(1,sizeof *buffer);
-       buffer = *b;
-
-        maxlen = BUFSIZ;
-        i = 0;
-        len = 0;
-        *line = malloc(maxlen);
-        end = 0;
-
-        do {
-                /* read next portion */
-                if (buffer->pos >= buffer->size) {
-                        buffer->pos = 0;
-                        buffer->size = 0;
-                        if ((retval = glite_jppsbe_pread(ctx, handle, buffer->buf, BUFSIZ, buffer->offset, &nbytes)) == 0) {
-                                if (nbytes < 0) {
-                                        retval = EINVAL;
-                                        goto fail;
-                                } else {
-                                        if (nbytes) {
-                                                buffer->size = (size_t)nbytes;
-                                                buffer->offset += nbytes;
-                                        } else end = 1;
-                                }
-                        } else goto fail;
-                }
-
-                /* we have buffer->size - buffer->pos bytes */
-                i = buffer->pos;
-                do {
-                        if (i >= buffer->size) z = '\0';
-                        else {
-                                z = buffer->buf[i];
-                                if (z == '\n') z = '\0';
-                        }
-                        len++;
-
-                        if (!check_realloc_line(line, &maxlen, len)) {
-                                retval = ENOMEM;
-                                goto fail;
-                        }
-                        (*line)[len - 1] = z;
-                        i++;
-                } while (z && i < buffer->size);
-                buffer->pos = i;
-        } while (len && (*line)[len - 1] != '\0');
-
-        if ((!len || !(*line)[0]) && end) {
-                free(*line);
-                *line = NULL;
-        }
-
-        return 0;
-
-fail:
-        free(*line);
-        *line = NULL;
-        return retval;
-}
 
 char* glite_jpps_get_namespace(const char* attr){
         char* namespace = strdup(attr);
index 5a57019..0bb7e71 100644 (file)
@@ -1,2 +1,2 @@
-### Default values to some glite-LB variables
+### Default values to some glite-JPIS variables
 GLITE_USER=glite
index 1ea0021..d88af86 100644 (file)
@@ -1,3 +1,35 @@
+##############################################################################
+# Copyright (c) Members of the EGEE Collaboration. 2004.
+# See http://www.eu-egee.org/partners/ for details on the copyright
+# holders.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS
+# OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+##############################################################################
+#
+# NAME :        config_jpis
+#
+# DESCRIPTION : This function configures Job Provenance Index Server.
+#
+# AUTHORS :     LB/JP team, heavily based on glite-yaim-lb
+#
+# NOTES :
+#
+# YAIM MODULE:  glite-yaim-jpis
+#
+##############################################################################
+
+
 function config_glite_jpis_check(){
   requires MYSQL_PASSWORD
 }
@@ -18,9 +50,9 @@ function config_glite_jpis_setenv(){
 
 function config_glite_jpis() {
 
-  #############################################
-  #   Logging and Bookkeeping configuration   #
-  #############################################
+  #################################################
+  #   Job Provenance Index Server configuration   #
+  #################################################
        
   HOSTNAME=`hostname -f`
 
@@ -68,7 +100,7 @@ function config_glite_jpis() {
   fi
 
   GLITE_LOCATION_VAR=${GLITE_LOCATION_VAR:-/var/glite}
-  mkdir -p $GLITE_LOCATION_VAR   # Needed to store PID of LB server 
+  mkdir -p $GLITE_LOCATION_VAR   # Needed to store PID of JP IS server 
 
   chown $GLITE_USER:$GLITE_USER $GLITE_LOCATION_VAR
   chmod 0755 $GLITE_LOCATION_VAR
index 66816a1..0727f68 100644 (file)
@@ -1,6 +1,9 @@
 #ident "$Header$"
 
 #include <sys/types.h>
+#ifdef LBS_DB_PROFILE
+#include <sys/time.h>
+#endif
 #include <unistd.h>
 #include <time.h>
 #include <assert.h>