glite_lbu_Statement notif = NULL;
char *notifc[4] = {NULL, NULL, NULL, NULL};
+ char *can_peername = edg_wll_gss_normalize_subj(ctx->peerName, 0);
+ char *userid = strmd5(can_peername, NULL);
+
trio_asprintf(&q, "select destination, valid, conditions, flags "
"from notif_registrations "
- "where notifid='%s'",
- notifId);
+ "where notifid='%s' "
+ "and userid='%s'",
+ notifId, userid);
glite_common_log_msg(LOG_CATEGORY_LB_SERVER_DB, LOG_PRIORITY_DEBUG, q);
if (edg_wll_ExecSQL(ctx, q, ¬if) < 0) goto err;
free(q); q = NULL;
return 0;
err:
+ free(can_peername);
return -1;
}
*pom = 0;
if (getNotifInfo(ctx, strrchr(pomCopy, ':')+1, &ni)){
ret = HTTP_NOTFOUND;
+ edg_wll_SetError(ctx, ENOENT, "Notification ID not know.");
goto err;
}
free(pomCopy);