diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mysql.c | 23 | ||||
-rw-r--r-- | src/usr.opt | 7 |
2 files changed, 26 insertions, 4 deletions
diff --git a/src/mysql.c b/src/mysql.c index 676618a..81ea62c 100644 --- a/src/mysql.c +++ b/src/mysql.c | |||
@@ -125,4 +125,4 @@ mysql_db_open (void **dp, ANUBIS_URL * url, enum anubis_db_mode mode, | |||
125 | const char *rcfile = anubis_url_get_arg (url, "rcfile"); | 125 | const char *rcfile = anubis_url_get_arg (url, "rcfile"); |
126 | const char *portstr = anubis_url_get_arg (url, "port"); | 126 | const char *s; |
127 | const char *s = anubis_url_get_arg (url, "bufsize"); | 127 | char *optfile; |
128 | int port = 0; | 128 | int port = 0; |
@@ -143,2 +143,3 @@ mysql_db_open (void **dp, ANUBIS_URL * url, enum anubis_db_mode mode, | |||
143 | 143 | ||
144 | s = anubis_url_get_arg (url, "bufsize"); | ||
144 | if (s) | 145 | if (s) |
@@ -154,6 +155,7 @@ mysql_db_open (void **dp, ANUBIS_URL * url, enum anubis_db_mode mode, | |||
154 | 155 | ||
155 | if (portstr) | 156 | s = anubis_url_get_arg (url, "port"); |
157 | if (s) | ||
156 | { | 158 | { |
157 | char *p; | 159 | char *p; |
158 | port = strtoul (portstr, &p, 10); | 160 | port = strtoul (s, &p, 10); |
159 | if (*p) | 161 | if (*p) |
@@ -171,2 +173,15 @@ mysql_db_open (void **dp, ANUBIS_URL * url, enum anubis_db_mode mode, | |||
171 | mysql_init (&mdata->mysql); | 173 | mysql_init (&mdata->mysql); |
174 | |||
175 | s = anubis_url_get_arg (url, "options-file"); | ||
176 | if (!s) { | ||
177 | if (access ("/etc/my.cnf", F_OK) == 0) | ||
178 | s = "/etc/my.cnf"; | ||
179 | } | ||
180 | |||
181 | if (s && *s) { | ||
182 | mysql_options (&mdata->mysql, MYSQL_READ_DEFAULT_FILE, s); | ||
183 | mysql_options(&mdata->mysql, MYSQL_READ_DEFAULT_GROUP, | ||
184 | s ? s : "anubis"); | ||
185 | } | ||
186 | |||
172 | if (!mysql_real_connect (&mdata->mysql, | 187 | if (!mysql_real_connect (&mdata->mysql, |
diff --git a/src/usr.opt b/src/usr.opt index 72ab222..fa9d859 100644 --- a/src/usr.opt +++ b/src/usr.opt | |||
@@ -39,2 +39,9 @@ END | |||
39 | 39 | ||
40 | OPTION(tls-priorities,,PRIO,Set TLS priorities) | ||
41 | BEGIN | ||
42 | #ifdef HAVE_TLS | ||
43 | secure.prio = optarg; | ||
44 | #endif | ||
45 | END | ||
46 | |||
40 | OPTION(file,f,FILE, | 47 | OPTION(file,f,FILE, |