ctdb-daemon: Rename struct ctdb_control_tcp_addr to ctdb_connection
[obnox/samba/samba-obnox.git] / source3 / lib / ctdbd_conn.c
index e67a31d5bc6becce12a345abf3af56b89614b970..04f6f2f0aacfec993936d7746dc255c3ebd12105 100644 (file)
@@ -1186,7 +1186,7 @@ int ctdbd_register_ips(struct ctdbd_connection *conn,
                                 void *private_data),
                       void *private_data)
 {
-       struct ctdb_control_tcp_addr p;
+       struct ctdb_connection p;
        TDB_DATA data = { .dptr = (uint8_t *)&p, .dsize = sizeof(p) };
        int ret;
        struct sockaddr_storage client;
@@ -1201,11 +1201,11 @@ int ctdbd_register_ips(struct ctdbd_connection *conn,
 
        switch (client.ss_family) {
        case AF_INET:
-               memcpy(&p.dest.ip, &server, sizeof(p.dest.ip));
+               memcpy(&p.dst.ip, &server, sizeof(p.dst.ip));
                memcpy(&p.src.ip, &client, sizeof(p.src.ip));
                break;
        case AF_INET6:
-               memcpy(&p.dest.ip6, &server, sizeof(p.dest.ip6));
+               memcpy(&p.dst.ip6, &server, sizeof(p.dst.ip6));
                memcpy(&p.src.ip6, &client, sizeof(p.src.ip6));
                break;
        default:
@@ -1276,15 +1276,13 @@ int ctdb_watch_us(struct ctdbd_connection *conn)
 
 int ctdb_unwatch(struct ctdbd_connection *conn)
 {
-       struct ctdb_client_notify_deregister dereg_data;
+       uint64_t srvid = CTDB_SRVID_SAMBA_NOTIFY;
        int ret;
        int cstatus;
 
-       dereg_data.srvid = CTDB_SRVID_SAMBA_NOTIFY;
-
        ret = ctdbd_control_local(
                conn, CTDB_CONTROL_DEREGISTER_NOTIFY, conn->rand_srvid, 0,
-               make_tdb_data((uint8_t *)&dereg_data, sizeof(dereg_data)),
+               make_tdb_data((uint8_t *)&srvid, sizeof(srvid)),
                NULL, NULL, &cstatus);
        if (ret != 0) {
                DEBUG(1, ("ctdbd_control_local failed: %s\n",