summaryrefslogtreecommitdiff
path: root/Xtrans.c
diff options
context:
space:
mode:
authorŁukasz Stelmach <l.stelmach@samsung.com>2013-11-28 12:57:21 +0100
committerHans de Goede <hdegoede@redhat.com>2014-01-13 11:52:02 +0100
commitb895d45e225dd3d1bf9d598774d3ae4f29fcbc25 (patch)
tree02a4a019df8fb090fd582439abd8b17ffa178fd7 /Xtrans.c
parent2c0a7840a28ae696e80e73157856d7a049fdf6c7 (diff)
Define TRANS_RECEIVED flag for transports
The flag is to be used to mark transports related to sockets received from systemd. Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'Xtrans.c')
-rw-r--r--Xtrans.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/Xtrans.c b/Xtrans.c
index 735d7b8..e478422 100644
--- a/Xtrans.c
+++ b/Xtrans.c
@@ -744,6 +744,34 @@ TRANS(CreateListener) (XtransConnInfo ciptr, char *port, unsigned int flags)
}
int
+TRANS(Received) (const char * protocol)
+
+{
+ Xtransport *trans;
+ int i = 0, ret = 0;
+
+ prmsg (5, "Received(%s)\n", protocol);
+
+ if ((trans = TRANS(SelectTransport)(protocol)) == NULL)
+ {
+ prmsg (1,"Received: unable to find transport: %s\n",
+ protocol);
+
+ return -1;
+ }
+ if (trans->flags & TRANS_ALIAS) {
+ if (trans->nolisten)
+ while (trans->nolisten[i]) {
+ ret |= TRANS(Received)(trans->nolisten[i]);
+ i++;
+ }
+ }
+
+ trans->flags |= TRANS_RECEIVED;
+ return ret;
+}
+
+int
TRANS(NoListen) (const char * protocol)
{