]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
send on the right socket!
authorAndrew Tridgell <tridge@samba.org>
Sun, 27 May 2007 05:47:43 +0000 (15:47 +1000)
committerAndrew Tridgell <tridge@samba.org>
Sun, 27 May 2007 05:47:43 +0000 (15:47 +1000)
(This used to be ctdb commit 2a5253a9da4d0144f4e96d9b8f6ac636849d146a)

ctdb/takeover/ctdb_takeover.c
ctdb/takeover/system.c

index 220cd56ae7ff27f85e7200ac14c951538ea17d9b..92376e9e3f5d8673a928d1b2d32508308e84c75d 100644 (file)
@@ -68,9 +68,9 @@ static void ctdb_control_send_arp(struct event_context *ev, struct timed_event *
 
        for (tcp=arp->tcp_list;tcp;tcp=tcp->next) {
                DEBUG(0,("sending tcp tickle ack for %u->%s:%u\n",
-                        (unsigned)tcp->daddr.sin_port
+                        (unsigned)ntohs(tcp->daddr.sin_port)
                         inet_ntoa(tcp->saddr.sin_addr),
-                        (unsigned)tcp->saddr.sin_port));                        
+                        (unsigned)ntohs(tcp->saddr.sin_port)));
                ret = ctdb_sys_send_ack(&tcp->daddr, &tcp->saddr);
                if (ret != 0) {
                        DEBUG(0,(__location__ " Failed to send tcp tickle ack for %s\n",
index b16b96343b4d611724ef011f4c0251a11fe62d50..71df1ee3dd11acdf6218c4e0fd8833e47e60a035 100644 (file)
@@ -197,7 +197,7 @@ int ctdb_sys_send_ack(const struct sockaddr_in *dest,
        pkt.tcp.ack      = 1;
        pkt.tcp.check    = 0;
 
-       ret = sendto(3, &pkt, sizeof(pkt), 0, dest, sizeof(*dest));
+       ret = sendto(s, &pkt, sizeof(pkt), 0, dest, sizeof(*dest));
        if (ret != 0) {
                DEBUG(0,(__location__ " failed sendto (%s)\n", strerror(errno)));
        }