From: Aleš Křenek Date: Fri, 7 Dec 2007 17:58:41 +0000 (+0000) Subject: implement NotifExpired -- delete it from database X-Git-Tag: glite-lb-client_R_3_1_2_1~9 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=2e40988544446649a4bcdd6f88e7bb33a476a7d9;p=jra1mw.git implement NotifExpired -- delete it from database --- 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); }