server: http: use new handler regex reference
#include <sys/stat.h>
#include <fcntl.h>
+#include <regex.h>
#include <monkey/monkey.h>
#include <monkey/mk_user.h>
@@ -730,7 +731,7 @@ int mk_http_init(struct mk_http_session *cs, struct mk_http_request *sr,
handlers = &sr->host_conf->handlers;
mk_list_foreach(head, handlers) {
h_handler = mk_list_entry(head, struct mk_vhost_handler, _head);
- if (regexec(&h_handler->match,
+ if (regexec(h_handler->match,
sr->uri_processed.data, 0, NULL, 0) != 0) {
continue;
}
@@ -746,7 +747,7 @@ int mk_http_init(struct mk_http_session *cs, struct mk_http_request *sr,
return -1;
}
mk_http_thread_start(mth);
- return 0;
+ return MK_EXIT_OK;
}
else {
if (!h_handler->handler) {
@@ -865,7 +866,7 @@ int mk_http_init(struct mk_http_session *cs, struct mk_http_request *sr,
handlers = &sr->host_conf->handlers;
mk_list_foreach(head, handlers) {
h_handler = mk_list_entry(head, struct mk_vhost_handler, _head);
- if (regexec(&h_handler->match,
+ if (regexec(h_handler->match,
uri, 0, NULL, 0) != 0) {
continue;
}
