projects
/
pazpar2-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Protect struct host
[pazpar2-moved-to-github.git]
/
src
/
database.c
diff --git
a/src/database.c
b/src/database.c
index
58cbd7e
..
b121e95
100644
(file)
--- a/
src/database.c
+++ b/
src/database.c
@@
-95,6
+95,7
@@
static struct host *create_host(const char *hostport, iochan_man_t iochan_man)
host->hostport = xstrdup(hostport);
host->connections = 0;
host->ipport = 0;
+ host->mutex = 0;
if (host_getaddrinfo(host, iochan_man))
{
@@
-102,6
+103,8
@@
static struct host *create_host(const char *hostport, iochan_man_t iochan_man)
xfree(host);
return 0;
}
+ yaz_mutex_create(&host->mutex);
+
host->next = hosts;
hosts = host;
return host;