mirror of
https://github.com/samba-team/samba.git
synced 2025-08-26 01:49:31 +03:00
ctdb-common: Improve/add debug
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit 33a80c1d63
)
This commit is contained in:
committed by
Jule Anger
parent
0adfd0cc0f
commit
d37c3d1415
@ -880,7 +880,7 @@ int ctdb_sys_open_capture_socket(const char *iface, void **private_data)
|
||||
return -1;
|
||||
}
|
||||
|
||||
DBG_DEBUG("Created RAW SOCKET FD:%d for tcp tickle\n", s);
|
||||
DBG_DEBUG("Opened raw socket for TCP tickle capture (fd=%d)\n", s);
|
||||
|
||||
ret = set_blocking(s, false);
|
||||
if (ret != 0) {
|
||||
@ -971,6 +971,7 @@ int ctdb_sys_open_capture_socket(const char *iface, void **private_data)
|
||||
{
|
||||
char errbuf[PCAP_ERRBUF_SIZE];
|
||||
pcap_t *pt;
|
||||
int fd;
|
||||
|
||||
pt = pcap_open_live(iface, 100, 0, 0, errbuf);
|
||||
if (pt == NULL) {
|
||||
@ -980,8 +981,11 @@ int ctdb_sys_open_capture_socket(const char *iface, void **private_data)
|
||||
return -1;
|
||||
}
|
||||
*((pcap_t **)private_data) = pt;
|
||||
fd = pcap_get_selectable_fd(pt);
|
||||
|
||||
return pcap_get_selectable_fd(pt);
|
||||
DBG_DEBUG("Opened pcap capture for TCP tickle capture (fd=%d)\n", fd);
|
||||
|
||||
return fd;
|
||||
}
|
||||
|
||||
int ctdb_sys_close_capture_socket(void *private_data)
|
||||
|
Reference in New Issue
Block a user