}
if (adm) {
- asprintf(&mylink,"<BR>%s just your registrations%s",
+ asprintf(&mylink,"%s just your registrations%s | ",
option != HTTP_ADMIN_OPTION_MY ? "<A HREF=\"/NOTIF:\">View" : "<B>Viewing",
option != HTTP_ADMIN_OPTION_MY ? "</A>" : "</B>");
- asprintf(&alllink,"<BR>%s all registrations%s",
+ asprintf(&alllink,"%s all registrations%s | ",
option != HTTP_ADMIN_OPTION_ALL ? "<A HREF=\"/NOTIF:?all\">View" : "<B>Viewing",
option != HTTP_ADMIN_OPTION_ALL ? "</A>" : "</B>");
if (option == HTTP_ADMIN_OPTION_ALL) asprintf(&heading,"All notifications");
- asprintf(&foreignlink,"<BR>%s registrations by other users%s",
+ asprintf(&foreignlink,"%s registrations by other users%s<P>",
option != HTTP_ADMIN_OPTION_FOREIGN ? "<A HREF=\"/NOTIF:?foreign\">View" : "<B>Viewing",
option != HTTP_ADMIN_OPTION_FOREIGN ? "</A>" : "</B>");
if (option == HTTP_ADMIN_OPTION_FOREIGN) asprintf(&heading,"Other users' notifications");
asprintf(&ret, "<html>\r\n\t<body>\r\n");
asprintf(&ret, "<html>\r\n\t<body>\r\n"
"<h2><B>%s</B></h2>\r\n"
- "<ul>%s</ul>"
"<P>%s%s%s"
+ "<ul>%s</ul>"
"\t</body>\r\n</html>",
heading,
- pomA,
mylink ? mylink : "",
alllink ? alllink : "",
- foreignlink ? foreignlink : ""
+ foreignlink ? foreignlink : "",
+ pomA ? pomA : "No registrations found"
);
free(pomA);
free(mylink);
/* GET /[jobId]: Job Status */
else if (strcmp(requestMeat, "/RSS:")
&& strcmp(requestMeat, "/NOTIF")
- && strcmp(requestMeat, "/NOTIF:")
+ && strncmp(requestMeat, "/NOTIF:", 7)
&& strcmp(requestMeat, "/favicon.ico")
&& extra_opt == HTTP_EXTRA_OPTION_NONE
) {
} else if (extra_opt == HTTP_EXTRA_OPTION_CONFIGURATION) {
// also browser-readable HTML version here?
isadm = ctx->noAuth || edg_wll_amIroot(ctx->peerName, ctx->fqans,&ctx->authz_policy);
- // Filo, tuto muzes pouzit k rozhodnuti, co vsechno se bude na konfiguracni strance ukazovat
edg_wll_ConfigurationToText(ctx, isadm, &message);
edg_wll_ServerStatisticsIncrement(ctx, SERVER_STATS_TEXT_VIEWS);
int fd;
if (ctx->authz_policy_file && (fd = open(ctx->authz_policy_file, O_RDONLY)) >= 0){
off_t size = lseek(fd, 0, SEEK_END) - lseek(fd, 0, SEEK_SET);
- char *pft = (char*)malloc(size);
+ char *pft = (char*)calloc(sizeof(char), size);
read(fd, pft, size);
close(fd);
pf = escape_text(pft);
-
+// Why not trio_asprintf(&pf, "%|Js", pft);
+ free(pft);
}
TRS("authz_policy_file", "%s\n", pf);
- if (pf) free(pf);
+ free(pf);
edg_wll_authz_policy ap = edg_wll_get_server_policy();
int i, j, k, l = 0;