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
Added iochan_man iterator: Protects the initial node in threaded code.
[pazpar2-moved-to-github.git]
/
src
/
database.c
diff --git
a/src/database.c
b/src/database.c
index
8ab626e
..
ab425c7
100644
(file)
--- a/
src/database.c
+++ b/
src/database.c
@@
-29,6
+29,7
@@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include <yaz/log.h>
#include <yaz/nmem.h>
#include <yaz/log.h>
#include <yaz/nmem.h>
+#include "ppmutex.h"
#include "session.h"
#include "host.h"
#include "pazpar2_config.h"
#include "session.h"
#include "host.h"
#include "pazpar2_config.h"
@@
-109,8
+110,7
@@
static struct host *create_host(const char *hostport, iochan_man_t iochan_man)
xfree(host);
return 0;
}
xfree(host);
return 0;
}
- yaz_mutex_create(&host->mutex);
- yaz_mutex_set_name(host->mutex, "host");
+ pazpar2_mutex_create(&host->mutex, "host");
return host;
}
return host;
}
@@
-411,8
+411,7
@@
database_hosts_t database_hosts_create(void)
database_hosts_t p = xmalloc(sizeof(*p));
p->hosts = 0;
p->mutex = 0;
database_hosts_t p = xmalloc(sizeof(*p));
p->hosts = 0;
p->mutex = 0;
- yaz_mutex_create(&p->mutex);
- yaz_mutex_set_name(p->mutex, "database");
+ pazpar2_mutex_create(&p->mutex, "database");
return p;
}
return p;
}