mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
- Fixed bug with "B" attribute and quick filter
- Made two logoobks with same subdir work (again) SVN revision: 2359
This commit is contained in:
parent
e917181b15
commit
c65d0a9d2c
45
src/elogd.c
45
src/elogd.c
@ -3984,13 +3984,25 @@ int el_index_logbooks()
|
|||||||
strcpy(lb_list[n].data_dir, data_dir);
|
strcpy(lb_list[n].data_dir, data_dir);
|
||||||
lb_list[n].el_index = NULL;
|
lb_list[n].el_index = NULL;
|
||||||
|
|
||||||
if (is_verbose())
|
/* check if other logbook uses the same directory */
|
||||||
eprintf("Indexing logbook \"%s\" in \"%s\" ... ", logbook, lb_list[n].data_dir);
|
for (j=0 ; j<n ; j++)
|
||||||
eflush();
|
if (strcmp(lb_list[j].data_dir, lb_list[n].data_dir) == 0) {
|
||||||
status = el_build_index(&lb_list[n], FALSE);
|
if (is_verbose())
|
||||||
if (is_verbose())
|
eprintf("Logbook \"%s\" uses same directory as logbook \"%s\"\n", logbook, lb_list[j].name);
|
||||||
if (status == EL_SUCCESS)
|
lb_list[n].el_index = lb_list[j].el_index;
|
||||||
eprintf("ok\n");
|
lb_list[n].n_el_index = lb_list[j].n_el_index;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (j == n) {
|
||||||
|
if (is_verbose())
|
||||||
|
eprintf("Indexing logbook \"%s\" in \"%s\" ... ", logbook, lb_list[n].data_dir);
|
||||||
|
eflush();
|
||||||
|
status = el_build_index(&lb_list[n], FALSE);
|
||||||
|
if (is_verbose())
|
||||||
|
if (status == EL_SUCCESS)
|
||||||
|
eprintf("ok\n");
|
||||||
|
}
|
||||||
|
|
||||||
if (status == EL_EMPTY) {
|
if (status == EL_EMPTY) {
|
||||||
if (is_verbose())
|
if (is_verbose())
|
||||||
@ -17822,15 +17834,23 @@ char *param_in_str(char *str, char *param)
|
|||||||
|
|
||||||
p = stristr(p, param);
|
p = stristr(p, param);
|
||||||
|
|
||||||
/* if parameter is value of another parameter, skip it */
|
/* if parameter not followed by '=', skip it */
|
||||||
if (p > str + 1 && *(p - 1) == '=')
|
if (*(p+strlen(param)) != '=') {
|
||||||
p += strlen(param);
|
p += strlen(param);
|
||||||
else
|
continue;
|
||||||
return p;
|
}
|
||||||
|
|
||||||
|
/* if parameter is value of another parameter, skip it */
|
||||||
|
if (p > str + 1 && *(p - 1) == '=') {
|
||||||
|
p += strlen(param);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (*p == 0)
|
if (*p == 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
return p;
|
||||||
|
|
||||||
} while (1);
|
} while (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -26391,6 +26411,7 @@ void interprete(char *lbook, char *path)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* authorize via negotiation */
|
/* authorize via negotiation */
|
||||||
|
/*
|
||||||
rsprintf("HTTP/1.1 401 Authorization Required\r\n");
|
rsprintf("HTTP/1.1 401 Authorization Required\r\n");
|
||||||
rsprintf("Server: ELOG HTTP %s-%d\r\n", VERSION, atoi(svn_revision + 13));
|
rsprintf("Server: ELOG HTTP %s-%d\r\n", VERSION, atoi(svn_revision + 13));
|
||||||
rsprintf("WWW-Authenticate: NegotiateBasic realm=\"%s\"\r\n", lbs->name);
|
rsprintf("WWW-Authenticate: NegotiateBasic realm=\"%s\"\r\n", lbs->name);
|
||||||
@ -26409,7 +26430,7 @@ void interprete(char *lbook, char *path)
|
|||||||
rsprintf("the credentials required.<P>\r\n");
|
rsprintf("the credentials required.<P>\r\n");
|
||||||
rsprintf("</BODY></HTML>\r\n");
|
rsprintf("</BODY></HTML>\r\n");
|
||||||
return;
|
return;
|
||||||
|
*/
|
||||||
|
|
||||||
/* check for correct session ID */
|
/* check for correct session ID */
|
||||||
if (!check_login(lbs, getparam("sid")))
|
if (!check_login(lbs, getparam("sid")))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user