aboutsummaryrefslogtreecommitdiff
path: root/X11
diff options
context:
space:
mode:
Diffstat (limited to 'X11')
-rw-r--r--X11/xtrans/Xtrans.c25
-rw-r--r--X11/xtrans/Xtrans.h4
2 files changed, 29 insertions, 0 deletions
diff --git a/X11/xtrans/Xtrans.c b/X11/xtrans/Xtrans.c
index 28808030c..bfba1ad79 100644
--- a/X11/xtrans/Xtrans.c
+++ b/X11/xtrans/Xtrans.c
@@ -804,6 +804,31 @@ TRANS(NoListen) (const char * protocol)
}
int
+TRANS(Listen) (const char * protocol)
+{
+ Xtransport *trans;
+ int i = 0, ret = 0;
+
+ if ((trans = TRANS(SelectTransport)(protocol)) == NULL)
+ {
+ prmsg (1,"TransListen: unable to find transport: %s\n",
+ protocol);
+
+ return -1;
+ }
+ if (trans->flags & TRANS_ALIAS) {
+ if (trans->nolisten)
+ while (trans->nolisten[i]) {
+ ret |= TRANS(Listen)(trans->nolisten[i]);
+ i++;
+ }
+ }
+
+ trans->flags &= ~TRANS_NOLISTEN;
+ return ret;
+}
+
+int
TRANS(IsListening) (const char * protocol)
{
Xtransport *trans;
diff --git a/X11/xtrans/Xtrans.h b/X11/xtrans/Xtrans.h
index 6decc6b3a..026fbd73f 100644
--- a/X11/xtrans/Xtrans.h
+++ b/X11/xtrans/Xtrans.h
@@ -311,6 +311,10 @@ int TRANS(NoListen) (
const char* /* protocol*/
);
+int TRANS(Listen) (
+ const char* /* protocol*/
+);
+
int TRANS(IsListening) (
const char* /* protocol*/
);