Remove pgsql example from here, reset module.conf back to roots

This commit is contained in:
Joris Vink 2014-03-31 11:28:06 +02:00
parent a431f76263
commit f7190c8b12
2 changed files with 3 additions and 30 deletions

View File

@ -1,7 +1,7 @@
# Example Kore configuration
# Server configuration.
bind 10.211.55.6 443
bind 127.0.0.1 443
# The path worker processes will chroot into after starting.
chroot /home/joris/src/kore
@ -43,7 +43,7 @@ workers 4
# (Set to 0 to disable sending this header).
#http_header_max 4096
#http_postbody_max 10240000
http_keepalive_time 0
#http_keepalive_time 0
#http_hsts_enable 31536000
# Load modules (you can load multiple at the same time).
@ -142,13 +142,11 @@ authentication auth_example {
# before allowing access to the page.
# Example domain that responds to localhost.
domain kore.dev {
domain localhost {
certfile cert/server.crt
certkey cert/server.key
accesslog /var/log/kore_access.log
static /pgsql serve_pgsql_test
# Page handlers with no authentication required.
static /css/style.css serve_style_css
static / serve_index

View File

@ -16,7 +16,6 @@
#include "kore.h"
#include "http.h"
#include "contrib/postgres/kore_pgsql.h"
#include "static.h"
@ -33,7 +32,6 @@ int serve_validator(struct http_request *);
int serve_params_test(struct http_request *);
int serve_private(struct http_request *);
int serve_private_test(struct http_request *);
int serve_pgsql_test(struct http_request *);
void my_callback(void);
int v_example_func(struct http_request *, char *);
@ -331,29 +329,6 @@ serve_private_test(struct http_request *req)
return (KORE_RESULT_OK);
}
int
serve_pgsql_test(struct http_request *req)
{
//int r;
KORE_PGSQL(req, "SELECT * FROM test", 0, {
if (req->pgsql[0]->state == KORE_PGSQL_STATE_ERROR) {
kore_log(LOG_NOTICE, "pgsql: %s",
(req->pgsql[0]->error) ?
req->pgsql[0]->error : "unknown");
http_response(req, 500, "fail", 4);
return (KORE_RESULT_OK);
} else {
//r = kore_pgsql_ntuples(req, 0);
}
});
/* Query successfully completed */
http_response(req, 200, "ok", 2);
return (KORE_RESULT_OK);
}
void
my_callback(void)
{