Displaying 13 results from an estimated 13 matches for "pool_unref".
2018 Jan 15
0
doveadm mailbox command fails if backend has an IPv6 address
...p_printf("%s:%u", proxy_host, proxy_port);
+ if (is_ipv6_address(proxy_host) && *proxy_host != '[')
+ *host_r = t_strdup_printf("[%s]:%u", proxy_host, proxy_port);
+ else
+ *host_r = t_strdup_printf("%s:%u", proxy_host, proxy_port);
}
}
pool_unref(&pool);
2019 May 19
3
Dict issue with PostgreSQL for last_login plugin (duplicate key)
On 19/05/2019 20:31, mabi via dovecot wrote:
>
> ??????? Original Message ???????
> On Sunday, May 19, 2019 7:36 PM, John Fawcett via dovecot
> <dovecot at dovecot.org> wrote:
>>
>> Attached is a tentative patch. I've verified no regression for mysql.
>> There should be no regression for sqlite as the code path is identical.
>>
>> Are you able to
2019 May 19
0
Dict issue with PostgreSQL for last_login plugin (duplicate key)
...ON CONFLICT DO UPDATE" */
dict->has_on_duplicate_key = strcmp(driver->name, "mysql") == 0;
+ dict->has_on_conflict_do_update = strcmp(driver->name, "pgsql") == 0;
if (sql_db_cache_new(dict_sql_db_cache, &sql_set, &dict->db, error_r) < 0) {
pool_unref(&pool);
@@ -1108,12 +1110,15 @@
str_append_str(prefix, suffix);
str_append_c(prefix, ')');
- if (!dict->has_on_duplicate_key) {
+ if (dict->has_on_duplicate_key ) {
+ str_append(prefix, " ON DUPLICATE KEY UPDATE ");
+ } else if(dict->has_on_conflict_do_update)...
2004 Jul 22
1
[PATCH] add LOGIN authentication mechanism
...mp;reply);
+ reply.id = request->id;
+ reply.result = AUTH_CLIENT_RESULT_CONTINUE;
+
+ reply.reply_idx = 0;
+ reply.data_size = strlen(prompt1);
+ callback(&reply, prompt1, auth_request->conn);
+
+ return TRUE;
+}
+
+static void mech_login_auth_free(struct auth_request *auth_request)
+{
+ pool_unref(auth_request->pool);
+}
+
+static struct auth_request *mech_login_auth_new(void)
+{
+ struct auth_request *auth;
+ pool_t pool;
+
+ pool = pool_alloconly_create("login_auth_request", 256);
+ auth = p_new(pool, struct auth_request, 1);
+
+ auth->refcount = 1;
+ auth->pool = pool;...
2019 May 19
2
Dict issue with PostgreSQL for last_login plugin (duplicate key)
On 19/05/2019 16:25, John Fawcett via dovecot wrote:
> INSERT INTO last_logins (last_login,username,domain) VALUES (1558273000,'user at domain.tld','domain.tld')
I don't have PostgresSql, would you be able to verify if this syntax would work:
INSERT INTO last_logins (last_login,username,domain) VALUES (1558273000,'user at domain.tld','domain.tld')
2019 May 19
2
Dict issue with PostgreSQL for last_login plugin (duplicate key)
...ON CONFLICT DO UPDATE" */
dict->has_on_duplicate_key = strcmp(driver->name, "mysql") == 0;
+ dict->has_on_conflict_do_update = strcmp(driver->name, "pgsql") == 0;
if (sql_db_cache_new(dict_sql_db_cache, &sql_set, &dict->db, error_r) < 0) {
pool_unref(&pool);
@@ -1108,12 +1110,15 @@
str_append_str(prefix, suffix);
str_append_c(prefix, ')');
- if (!dict->has_on_duplicate_key) {
+ if (dict->has_on_duplicate_key ) {
+ str_append(prefix, " ON DUPLICATE KEY UPDATE ");
+ } else if(dict->has_on_conflict_do_update)...
2010 Apr 14
4
PostgreSQL driver supporting [round-robin] load balancing and redundancy [LONG]
..._pgsql_transaction_query *)q)->cur_eol;
+}
+
+static void transaction_query_dtor(struct multi_pgsql_query *q)
+{
+ struct multi_pgsql_transaction_query *qry;
+ PGresult *pgr;
+ pool_t pool;
+
+ qry = (void *)q;
+
+ pgr = qry->pgr;
+ if (pgr) PQclear(pgr);
+
+ pool = qry->x_ctx->pool;
+ pool_unref(&pool);
+}
+
+static char const *transaction_query_get_query(struct multi_pgsql_query *q)
+{
+ struct multi_pgsql_transaction_query *qry;
+
+ qry = (void *)q;
+ return qry->sub->query;
+}
+
+static void init_transaction_query(struct multi_pgsql_transaction_query *qry,
+ struct multi...
2008 May 04
1
Compiling plugins
Hi
I use Debian Etch 4.0r3. I am trying to compile antispam plugin, but i
have no idea about how to do it cause i have never done so. I have
compiled source packages for Debian with some instructions in some
pages, but i can not compile this plugin separately. Can anyone help
me or give some tips to do this (yes, i have google'd it yet, but no
good results).
This is the result trying to
2019 May 19
4
Dict issue with PostgreSQL for last_login plugin (duplicate key)
...ON CONFLICT DO UPDATE" */
dict->has_on_duplicate_key = strcmp(driver->name, "mysql") == 0;
+ dict->has_on_conflict_do_update = strcmp(driver->name, "pgsql") == 0;
if (sql_db_cache_new(dict_sql_db_cache, &sql_set, &dict->db, error_r) < 0) {
pool_unref(&pool);
@@ -1108,12 +1110,15 @@
str_append_str(prefix, suffix);
str_append_c(prefix, ')');
- if (!dict->has_on_duplicate_key) {
+ if (dict->has_on_duplicate_key ) {
+ str_append(prefix, " ON DUPLICATE KEY UPDATE ");
+ } else if(dict->has_on_conflict_do_update)...
2004 Jul 01
3
[PATCH, RFC] add APOP authentication mechanism
..., 0, FALSE);
+ return TRUE;
+ }
+
+ auth->digest = p_strndup(auth->pool, tmp, 32);
+
+ passdb->lookup_credentials(auth_request, PASSDB_CREDENTIALS_PLAINTEXT,
+ apop_credentials_callback);
+
+ return TRUE;
+}
+
+static void
+mech_apop_auth_free(struct auth_request *auth_request)
+{
+ pool_unref(auth_request->pool);
+}
+
+static struct auth_request *mech_apop_auth_new(void)
+{
+ struct apop_auth_request *auth;
+ pool_t pool;
+
+ pool = pool_alloconly_create("apop_auth_request", 256);
+ auth = p_new(pool, struct apop_auth_request, 1);
+ auth->pool = pool;
+
+ auth->auth_r...
2006 Feb 03
0
rquotad (NFS) quota plugin
...ots[qr_idx] != NULL; qr_idx++) {
+ rquotad_quota_root_init(&(quota->roots[qr_idx]),
+ qroots[qr_idx], quota);
+ }
+ return "a->quota;
+ }
+
+ static void rquotad_quota_deinit(struct quota *_quota)
+ {
+ struct rquotad_quota *quota = (struct rquotad_quota *)_quota;
+
+ pool_unref(quota->pool);
+ }
+
+ static void rquotad_quota_root_init(struct rquotad_quota_root *root,
+ const char *name,
+ struct rquotad_quota *quota)
+ {
+ debugmsg("creating quotaroot %s", name);
+ root->name = p_strdup(quota->pool, name);
+ root->root.quota = (st...
2004 Aug 09
1
[PATCH] RPA authentication mechanism
...allback(&reply, "", auth_request->conn);
+
+ return TRUE;
+}
+
+static void
+mech_rpa_auth_free(struct auth_request *auth_request)
+{
+ struct rpa_auth_request *auth =
+ (struct rpa_auth_request *)auth_request;
+
+ if (auth->pwd_md5)
+ safe_memset(auth->pwd_md5, 0, 16);
+
+ pool_unref(auth_request->pool);
+}
+
+static struct auth_request *mech_rpa_auth_new(void)
+{
+ struct rpa_auth_request *auth;
+ pool_t pool;
+
+ pool = pool_alloconly_create("rpa_auth_request", 256);
+ auth = p_new(pool, struct rpa_auth_request, 1);
+ auth->pool = pool;
+ auth->phase = 0;
+...
2010 Apr 09
4
Patch: support URLAUTH, BURL, CATENATE
...AT) || errno != ENOENT)
+ i_error("open(%s) failed: %m", path);
+ return FALSE;
+ }
+
+ /* read the keys */
+ pool = pool_alloconly_create("urlauth_keys", 1024);
+ keys = urlauth_keys_read(pool, fd);
+ if (keys == NULL) {
+ i_error("error reading %s: %m", path);
+ pool_unref(&pool);
+ close(fd);
+ return FALSE;
+ }
+
+ /* modify the keys */
+ switch (action) {
+ case URLAUTH_KEYS_GET:
+ hex = hash_table_lookup(keys, (void *) mailbox);
+
+ /* if hex key is bogus, set a new one */
+ if (hex) {
+ const char *cp;
+ for (cp = hex; *cp; cp++)
+ if (!i_isxdigi...