Mercurial > dovecot > original-hg > dovecot-1.2
comparison src/lib-dict/dict-client.c @ 9174:eed86bcc33aa HEAD
dict proxy: Use base_dir as the default dict-server location.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sat, 27 Jun 2009 22:08:33 -0400 |
parents | a68ed51b681d |
children | a1b92a251bb9 |
comparison
equal
deleted
inserted
replaced
9173:2db158dd88be | 9174:eed86bcc33aa |
---|---|
295 } | 295 } |
296 } | 296 } |
297 | 297 |
298 static struct dict * | 298 static struct dict * |
299 client_dict_init(struct dict *driver, const char *uri, | 299 client_dict_init(struct dict *driver, const char *uri, |
300 enum dict_data_type value_type, const char *username) | 300 enum dict_data_type value_type, const char *username, |
301 const char *base_dir) | |
301 { | 302 { |
302 struct client_dict *dict; | 303 struct client_dict *dict; |
303 const char *dest_uri; | 304 const char *dest_uri; |
304 pool_t pool; | 305 pool_t pool; |
305 | 306 |
321 | 322 |
322 if (*uri != ':') { | 323 if (*uri != ':') { |
323 /* path given */ | 324 /* path given */ |
324 dict->path = p_strdup_until(pool, uri, dest_uri); | 325 dict->path = p_strdup_until(pool, uri, dest_uri); |
325 } else { | 326 } else { |
326 dict->path = DEFAULT_DICT_SERVER_SOCKET_PATH; | 327 dict->path = p_strconcat(pool, base_dir, |
328 "/"DEFAULT_DICT_SERVER_SOCKET_FNAME, NULL); | |
327 } | 329 } |
328 dict->uri = p_strdup(pool, dest_uri + 1); | 330 dict->uri = p_strdup(pool, dest_uri + 1); |
329 return &dict->dict; | 331 return &dict->dict; |
330 } | 332 } |
331 | 333 |