Remove STARTED and STOPPED
This commit is contained in:
2
mud
2
mud
Submodule mud updated: 22d61780fd...c612a0772e
14
src/main.c
14
src/main.c
@@ -386,8 +386,6 @@ int main (int argc, char **argv)
|
|||||||
fd_set rfds;
|
fd_set rfds;
|
||||||
FD_ZERO(&rfds);
|
FD_ZERO(&rfds);
|
||||||
|
|
||||||
int started = 0;
|
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
unsigned char *buf;
|
unsigned char *buf;
|
||||||
} send, recv;
|
} send, recv;
|
||||||
@@ -443,18 +441,6 @@ int main (int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mud_is_up(mud)) {
|
|
||||||
if (!started) {
|
|
||||||
state_send(gt.state_fd, "STARTED", tun_name);
|
|
||||||
started = 1;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (started) {
|
|
||||||
state_send(gt.state_fd, "STOPPED", tun_name);
|
|
||||||
started = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (FD_ISSET(tun_fd, &rfds)) {
|
if (FD_ISSET(tun_fd, &rfds)) {
|
||||||
while (send_size<mtu) {
|
while (send_size<mtu) {
|
||||||
const ssize_t r = tun_read(tun_fd, send.buf+send_size, mtu);
|
const ssize_t r = tun_read(tun_fd, send.buf+send_size, mtu);
|
||||||
|
|||||||
Reference in New Issue
Block a user