-lglobus_common_${nothrflavour} \
-lglobus_gssapi_gsi_${nothrflavour} \
+GLOBUS_THRLIBS:=-L${globus_prefix}/lib \
+ -lglobus_common_${thrflavour} \
+ -lglobus_gssapi_gsi_${thrflavour} \
+
GLITE_LIBS:=-L${glite_location}/lib
ifneq (${expat_prefix},/usr)
${COVERAGE_FLAGS}
EXT_LIBS:= ${EXPAT_LIBS} ${ARES_LIBS} ${GLOBUS_LIBS}
+EXT_THRLIBS:= ${EXPAT_LIBS} ${ARES_LIBS} ${GLOBUS_THRLIBS}
# breaks linking when not installed in /opt, /home/dimeglio etc.
# ${GLITE_LIBS} \
TRIO_OBJS:=escape.o trio.o strio.o
TRIO_LIB:=libglite_lb_trio.a
-MAILDIR_OBJS:=lb_maildir.o
-MAILDIR_LIB:=libglite_lb_maildir.a
+MAILDIR_OBJS:=lb_maildir.lo
+MAILDIR_LIB:=libglite_lb_maildir.la
THROBJS:=${OBJS:.o=.thr.o}
THRLOBJS:=${OBJS:.o=.thr.lo}
ranlib $@
${MAILDIR_LIB}: ${MAILDIR_OBJS}
- ar crv $@ ${MAILDIR_OBJS}
- ranlib $@
+ ${LINK} ${version_info} -o $@ ${MAILDIR_OBJS}
${THRSTATICLIB}: ${THROBJS}
ar crv $@ ${THROBJS}
${LINK} ${version_info} -o $@ ${THRLOBJS} \
-lglite_security_gss_${thrflavour} \
-lglite_wmsutils_cjobid \
- ${EXT_LIBS} \
+ ${EXT_THRLIBS} \
-lm
stage: compile
install:
mkdir -p ${PREFIX}/lib
mkdir -p ${PREFIX}/share/doc/${package}-${version}
- ${INSTALL} -m 644 ${LTLIB} ${THRLTLIB} ${PREFIX}/lib
+ ${INSTALL} -m 644 ${LTLIB} ${THRLTLIB} ${MAILDIR_LIB} ${PREFIX}/lib
${INSTALL} -m 644 ${top_srcdir}/LICENSE ${PREFIX}/share/doc/${package}-${version}
if [ x${DOSTAGE} = xyes ]; then \
mkdir -p ${PREFIX}/include/${globalprefix}/${lbprefix} ; \
(cd ${top_srcdir}/interface && install -m 644 ${HDRS} ${PREFIX}/include/${globalprefix}/${lbprefix}) ; \
- install -m 644 ${STATICLIB} ${THRSTATICLIB} ${TRIO_LIB} ${MAILDIR_LIB} ${PREFIX}/lib; \
+ install -m 644 ${STATICLIB} ${THRSTATICLIB} ${TRIO_LIB} ${PREFIX}/lib; \
fi
clean:
unsigned int c[EDG_WLL_SOURCE__LAST];
} edg_wll_SeqCode;
+#define EDG_WLL_SEQ_NULL "UI=000000:NS=0000000000:WM=000000:BH=0000000000:JSS=000000:LM=000000:LRMS=000000:APP=000000"
/* non-gsi one-element analogy of connPool for L&B Proxy server */
-#Sat Oct 15 06:38:31 CEST 2005
-module.build=153
+#Wed Mar 15 04:43:32 CET 2006
+module.build=0233
#Fri Sep 02 14:17:07 CEST 2005
-module.version=4.0.0
-module.build=2
-module.age=1
+module.version=3.0.5
+module.age=0
static void free_voms_groups(edg_wll_VomsGroups *);
+/* uncomment to get the trace
+#define CTXTRACE "/tmp/lb-context-trace"
+*/
+
int edg_wll_InitContext(edg_wll_Context *ctx)
{
int i;
out->connPool = (edg_wll_ConnPool *) calloc(out->poolSize, sizeof(edg_wll_ConnPool));
out->connPoolNotif = (edg_wll_ConnPool *) calloc(1, sizeof(edg_wll_ConnPool));
- out->connProxy = (edg_wll_ConnPool *) calloc(1, sizeof(edg_wll_ConnProxy));
+ out->connProxy = (edg_wll_ConnProxy *) calloc(1, sizeof(edg_wll_ConnProxy));
out->connProxy->conn.sock = -1;
out->connToUse = -1;
*ctx = out;
+
+#ifdef CTXTRACE
+{
+ int trc = open(CTXTRACE,O_WRONLY|O_CREAT,0644);
+ char buf[200];
+ sprintf(buf,"%p init\n",out);
+ lseek(trc,0,SEEK_END);
+ write(trc,buf,strlen(buf));
+ close(trc);
+}
+#endif
+
return 0;
}
OM_uint32 min_stat;
if (!ctx) return;
-
+#ifdef CTXTRACE
+{
+ int trc = open(CTXTRACE,O_WRONLY|O_CREAT,0644);
+ char buf[200];
+ sprintf(buf,"%p free\n",ctx);
+ lseek(trc,0,SEEK_END);
+ write(trc,buf,strlen(buf));
+ close(trc);
+}
+#endif
if (ctx->errDesc) free(ctx->errDesc);
if (ctx->connPool) {
int i;
"DNS resolver error",
"No JobId specified in context",
"No indexed condition in query",
- "Interlogger protocol error",
+ "Lbserver (proxy) store protocol error",
"Interlogger internal error",
"Interlogger has events pending",
"Compared events differ",
char **buffer,
int (*reader)(void *, char *, const int))
{
- char buf[17];
+ char buf[17], *p;
int ret, len;
/* read 17 byte header */
if(len < 0) {
goto err;
}
+
+ /* perform some sanity checks on the received header */
+ if(buf[16] != '\n') {
+ len = -1;
+ goto err;
+ }
buf[16] = 0;
+ /* skip leading spaces */
+ for(p = buf; *p == ' '; p++);
+ /* skip digits */
+ for(; (*p >= '0') && (*p <= '9'); p++);
+ /* this must be the end of string */
+ if(*p != 0) {
+ len = -1;
+ goto err;
+ }
+
if((len=atoi(buf)) <= 0) {
len = -1;
goto err;
#include <stdio.h>
#include <fcntl.h>
#include <time.h>
+#include <signal.h>
+#include <assert.h>
#include <stdlib.h>
#include <sys/time.h>
#include <sys/types.h>
int ct = -1;
fd_set fds;
struct timeval timeout, before, after;
+ struct sigaction sa,osa;
+ memset(&sa,0,sizeof(sa)); assert(sa.sa_handler == NULL);
+ sa.sa_handler = SIG_IGN;
+ sigaction(SIGPIPE,&sa,&osa);
if ( to ) {
memcpy(&timeout, to, sizeof(timeout));
if (to->tv_sec < 0) to->tv_sec = to->tv_usec = 0;
}
+ sigaction(SIGPIPE,&osa,NULL);
+ if (errno == EPIPE) errno = ENOTCONN;
return (errno)? -1: written;
}
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <pwd.h>
#include <sys/un.h>
#include <stdio.h>
#include <math.h>
case EAGAIN:
case EACCES:
case EINTR:
- sleep(fcntl_timeout);
+ if ((i+1) < fcntl_attempts) sleep(fcntl_timeout);
break;
default:
edg_wll_SetError(ctx, errno, "fcntl()");
}
} else break;
}
+ if (i == fcntl_attempts) {
+ edg_wll_SetError(ctx, ETIMEDOUT, "timed out trying to lock event file");
+ goto cleanup;
+ }
if ( fseek(outfile, 0, SEEK_END) == -1 ) {
edg_wll_SetError(ctx, errno, "fseek()");
int edg_wll_ULMTimevalToDate( long sec, long usec, char *dstr )
{
char *func = "edg_wll_ULMTimevalToDate";
+ struct tm tms;
struct tm *tp;
int len;
if ( sec < 0 || usec < 0 || usec > 999999 )
return 1;
- tp = gmtime( (const time_t *) &sec );
+ tp = gmtime_r( (const time_t *) &sec, &tms );
if ( tp == NULL )
return 1;
-#Sat Oct 15 06:34:10 CEST 2005
-module.build=54
+#Wed Mar 15 04:55:06 CET 2006
+module.build=0134
#Fri Sep 02 14:16:49 CEST 2005
-module.version=3.0.0
# glite-lb-ws-interface_branch_3_0_0_RC15 tak is taken!
-
-module.build=2
-module.age=1
+module.version=2.1.1
+module.age=0