2017-05-29 15:33:44 +00:00
|
|
|
|
|
|
|
/*
|
2018-03-12 14:03:15 +00:00
|
|
|
* Odyssey.
|
2017-05-29 15:33:44 +00:00
|
|
|
*
|
2018-04-04 13:19:58 +00:00
|
|
|
* Scalable PostgreSQL connection pooler.
|
2020-04-02 11:00:56 +00:00
|
|
|
*/
|
2017-05-29 15:33:44 +00:00
|
|
|
|
2020-11-27 18:03:42 +00:00
|
|
|
#include <kiwi.h>
|
|
|
|
#include <machinarium.h>
|
|
|
|
#include <odyssey.h>
|
2017-05-29 15:33:44 +00:00
|
|
|
|
2018-08-28 14:43:46 +00:00
|
|
|
int
|
|
|
|
od_cancel(od_global_t *global,
|
2018-12-06 14:23:15 +00:00
|
|
|
od_rule_storage_t *storage,
|
2018-08-28 14:43:46 +00:00
|
|
|
kiwi_key_t *key,
|
|
|
|
od_id_t *server_id)
|
2017-05-29 15:33:44 +00:00
|
|
|
{
|
2018-03-13 13:17:27 +00:00
|
|
|
od_instance_t *instance = global->instance;
|
2020-04-02 11:00:56 +00:00
|
|
|
od_log(&instance->logger,
|
|
|
|
"cancel",
|
|
|
|
NULL,
|
|
|
|
NULL,
|
2017-09-21 13:44:19 +00:00
|
|
|
"cancel for %s%.*s",
|
2017-07-26 14:35:39 +00:00
|
|
|
server_id->id_prefix,
|
2020-04-02 11:00:56 +00:00
|
|
|
sizeof(server_id->id),
|
|
|
|
server_id->id);
|
2017-06-16 12:28:37 +00:00
|
|
|
od_server_t server;
|
|
|
|
od_server_init(&server);
|
2018-03-13 13:17:27 +00:00
|
|
|
server.global = global;
|
2018-12-06 14:23:15 +00:00
|
|
|
od_backend_connect_cancel(&server, storage, key);
|
2018-02-15 13:06:46 +00:00
|
|
|
od_backend_close_connection(&server);
|
2017-06-02 13:49:20 +00:00
|
|
|
od_backend_close(&server);
|
2017-05-29 15:33:44 +00:00
|
|
|
return 0;
|
|
|
|
}
|