From 2e40988544446649a4bcdd6f88e7bb33a476a7d9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ale=C5=A1=20K=C5=99enek?= Date: Fri, 7 Dec 2007 17:58:41 +0000 Subject: [PATCH] implement NotifExpired -- delete it from database --- org.glite.lb.server/src/notif_match.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/org.glite.lb.server/src/notif_match.c b/org.glite.lb.server/src/notif_match.c index 7b23e73..c9ca3af 100644 --- a/org.glite.lb.server/src/notif_match.c +++ b/org.glite.lb.server/src/notif_match.c @@ -103,8 +103,24 @@ err: int edg_wll_NotifExpired(edg_wll_Context ctx,const char *notif) { - /* TODO */ - return 0; + char *dn = NULL,*dj = NULL; + + trio_asprintf(&dn,"delete from notif_registrations where notifid='%|Ss'",notif); + trio_asprintf(&dj,"delete from notif_jobs where notifid='%|Ss'",notif); + + if (edg_wll_ExecStmt(ctx,dn,NULL) < 0 || + edg_wll_ExecStmt(ctx,dj,NULL) < 0) + { + char *et,*ed; + edg_wll_Error(ctx,&et,&ed); + + syslog(LOG_WARNING,"delete notification %s: %s (%d)",notif,et,ed); + free(et); free(ed); + } + + free(dn); + free(dj); + return edg_wll_ResetError(ctx); } -- 1.8.2.3