doc:
stage: compile
- $(MAKE) install PREFIX=${stagedir}
+ $(MAKE) install PREFIX=${stagedir} DOSTAGE=yes
dist: distsrc distbin
${INSTALL} -m 755 ${top_srcdir}/config/startup ${PREFIX}/etc/init.d/glite-lb-bkserverd
+ if [ x${DOSTAGE} != xyes ]; then \
+ ${INSTALL} -m 755 ${stagedir}/bin/glite-lb-notif-interlogd ${PREFIX}/bin; \
+ fi
+
clean:
%.c: %.c.T
#include "query.h"
#include "il_notification.h"
-
-
static int notif_match_conditions(edg_wll_Context,const edg_wll_JobStat *,const char *);
static int notif_check_acl(edg_wll_Context,const edg_wll_JobStat *,const char *);
"select distinct n.notifid,n.destination,n.valid,u.cert_subj,n.conditions "
"from notif_jobs j,users u,notif_registrations n "
"where j.notifid=n.notifid and n.userid=u.userid "
- " and j.jobid = '%|Ss'",ju = edg_wlc_JobIdGetUnique(stat->jobId));
+ " and (j.jobid = '%|Ss' or j.jobid = '%|Ss')",
+ ju = edg_wlc_JobIdGetUnique(stat->jobId),NOTIF_ALL_JOBS);
free(ju);
#include "glite/lb/xml_parse.h"
#include "glite/lb/notification.h"
#include "lbs_db.h"
+#include "query.h"
static char *get_user(edg_wll_Context ctx, int create);
if ( edg_wll_ExecStmt(ctx, q, NULL) < 0 )
goto cleanup;
- for ( i = 0; jobs[i]; i++ )
+ if (jobs) for ( i = 0; jobs[i]; i++ )
{
free(q);
trio_asprintf(&q,
goto cleanup;
}
}
+ else {
+ trio_asprintf(&q,"insert into notif_jobs(notifid,jobid) values ('%|Ss','%|Ss')",
+ nid_s,NOTIF_ALL_JOBS);
+ if ( edg_wll_ExecStmt(ctx, q, NULL) < 0 ) goto cleanup;
+
+ }
cleanup:
int i, j, jobs_ct, nconds_ct;
- if ( !conditions || !conditions[0] )
- return edg_wll_SetError(ctx, EINVAL, "Empty condition list");
-
- for ( nconds_ct = jobs_ct = i = 0; conditions[i]; i++ )
+ if ( !conditions || !conditions[0] ) {
+ if (ctx->noAuth) nconds_ct = jobs_ct = 0;
+ else return edg_wll_SetError(ctx, EINVAL, "Empty condition list");
+ } else for ( nconds_ct = jobs_ct = i = 0; conditions[i]; i++ )
{
if ( conditions[i][0].attr && conditions[i][0].attr != EDG_WLL_QUERY_ATTR_JOBID )
nconds_ct++;
int convert_event_head(edg_wll_Context,char **,edg_wll_Event *);
int check_strict_jobid(edg_wll_Context, const edg_wlc_JobId);
int match_status(edg_wll_Context, const edg_wll_JobStat *stat,const edg_wll_QueryRec **conditions);
+
+#define NOTIF_ALL_JOBS "all_jobs"