From 23a2cc1e24b408c4b840bdb54ef3a50176bf7ceb Mon Sep 17 00:00:00 2001 From: angt Date: Thu, 14 Apr 2016 19:41:59 +0000 Subject: [PATCH] Add mud_can_push() --- mud.c | 5 +++++ mud.h | 1 + 2 files changed, 6 insertions(+) diff --git a/mud.c b/mud.c index 21deae0..650c52f 100644 --- a/mud.c +++ b/mud.c @@ -716,6 +716,11 @@ int mud_can_pull (struct mud *mud) return (mud->rx.start != MUD_PACKET_NEXT(mud->rx.end)); } +int mud_can_push (struct mud *mud) +{ + return (mud->tx.start != mud->tx.end); +} + int mud_is_up (struct mud *mud) { struct path *path; diff --git a/mud.h b/mud.h index 5e0aae0..456a756 100644 --- a/mud.h +++ b/mud.h @@ -17,6 +17,7 @@ int mud_bind (struct mud *, const char *); int mud_peer (struct mud *, const char *, const char *); int mud_can_pull (struct mud *); +int mud_can_push (struct mud *); int mud_is_up (struct mud *); int mud_pull (struct mud *);