roomname: use UID in default roomname

Use the UID of the xmppipe process instead of the PID in the default
name. This allows many processes running under the same user on a host
to share the same output channel and makes it easier to pre-create the
MUC if the xmppipe XMPP user does not have MUC creation privs.
pull/1/head
Michael Santos 7 years ago
parent be90386d6e
commit 899e988a6f

@ -90,7 +90,7 @@ Options
-o *output*
: XMPP MUC name
Default: stdout-*hostname*-*pid*
Default: stdout-*hostname*-*uid*
-S *subject*
: XMPP MUC subject

@ -208,7 +208,7 @@ xmppipe_roomname(char *label)
}
name[sizeof(name)-1] = '\0';
(void)snprintf(buf, len, "%s-%s-%d", label, name, getpid());
(void)snprintf(buf, len, "%s-%s-%d", label, name, getuid());
return buf;
}

Loading…
Cancel
Save