mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
ctdbd_conn: add ctdbd_reinit_connection()
Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
This commit is contained in:
parent
1184931001
commit
84da49f89b
@ -33,6 +33,9 @@ struct messaging_rec;
|
||||
int ctdbd_init_connection(TALLOC_CTX *mem_ctx,
|
||||
const char *sockname, int timeout,
|
||||
struct ctdbd_connection **pconn);
|
||||
int ctdbd_reinit_connection(TALLOC_CTX *mem_ctx,
|
||||
const char *sockname, int timeout,
|
||||
struct ctdbd_connection *conn);
|
||||
|
||||
uint32_t ctdbd_vnn(const struct ctdbd_connection *conn);
|
||||
|
||||
|
@ -477,6 +477,31 @@ int ctdbd_init_connection(TALLOC_CTX *mem_ctx,
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ctdbd_reinit_connection(TALLOC_CTX *mem_ctx,
|
||||
const char *sockname, int timeout,
|
||||
struct ctdbd_connection *conn)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = ctdbd_connection_destructor(conn);
|
||||
if (ret != 0) {
|
||||
DBG_ERR("ctdbd_connection_destructor failed\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = ctdbd_init_connection_internal(mem_ctx,
|
||||
sockname,
|
||||
timeout,
|
||||
conn);
|
||||
if (ret != 0) {
|
||||
DBG_ERR("ctdbd_init_connection_internal failed (%s)\n",
|
||||
strerror(ret));
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ctdbd_conn_get_fd(struct ctdbd_connection *conn)
|
||||
{
|
||||
return conn->fd;
|
||||
|
Loading…
Reference in New Issue
Block a user