mirror of
https://github.com/bstansell/conserver.git
synced 2025-03-28 22:48:36 +00:00
conserver.cf: devicesubst add 'b' for baud rate
Add a 'b' subst format to get baud rate numbers as well to build up device names and the others.
This commit is contained in:
parent
8b3dfdb14f
commit
42e0b46e78
@ -540,6 +540,10 @@ value
|
|||||||
.PP
|
.PP
|
||||||
Numeric Replacement
|
Numeric Replacement
|
||||||
.TP
|
.TP
|
||||||
|
.B b
|
||||||
|
.B baud
|
||||||
|
value
|
||||||
|
.TP
|
||||||
.B p
|
.B p
|
||||||
config
|
config
|
||||||
.B port
|
.B port
|
||||||
|
@ -997,6 +997,9 @@ SubstValue(char c, char **s, int *i)
|
|||||||
} else if (c == 'P') {
|
} else if (c == 'P') {
|
||||||
(*i) = pCE->netport;
|
(*i) = pCE->netport;
|
||||||
retval = 1;
|
retval = 1;
|
||||||
|
} else if (c == 'b') {
|
||||||
|
(*i) = pCE->baud->irate;
|
||||||
|
retval = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1009,6 +1012,7 @@ SubstToken(char c)
|
|||||||
switch (c) {
|
switch (c) {
|
||||||
case 'p':
|
case 'p':
|
||||||
case 'P':
|
case 'P':
|
||||||
|
case 'b':
|
||||||
substTokenCount[(unsigned)c]++;
|
substTokenCount[(unsigned)c]++;
|
||||||
return ISNUMBER;
|
return ISNUMBER;
|
||||||
case 'h':
|
case 'h':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user