Mercurial > paster
comparison page-search.c @ 84:94dcca86e5cc
pasterd: database reentrancy + timer
author | David Demelier <markand@malikania.fr> |
---|---|
date | Fri, 17 Mar 2023 20:01:00 +0100 |
parents | 0a29424e4486 |
children |
comparison
equal
deleted
inserted
replaced
83:a55c0d7ff8fa | 84:94dcca86e5cc |
---|---|
108 if (title && strlen(title) == 0) | 108 if (title && strlen(title) == 0) |
109 title = NULL; | 109 title = NULL; |
110 if (author && strlen(author) == 0) | 110 if (author && strlen(author) == 0) |
111 author = NULL; | 111 author = NULL; |
112 | 112 |
113 if (database_search(pastes, &pastesz, title, author, language) < 0) | 113 if (database_search(&database, pastes, &pastesz, title, author, language) < 0) |
114 page_status(req, KHTTP_500); | 114 page_status(req, KHTTP_500); |
115 else { | 115 else { |
116 page_index_render(req, pastes, pastesz); | 116 page_index_render(req, pastes, pastesz); |
117 | 117 |
118 for (size_t i = 0; i < pastesz; ++i) | 118 for (size_t i = 0; i < pastesz; ++i) |