fix problem with extra spaces after protocol name in link
This commit is contained in:
@ -187,9 +187,12 @@ bool StreamCore::
|
|||||||
parse(const char* filename, const char* _protocolname)
|
parse(const char* filename, const char* _protocolname)
|
||||||
{
|
{
|
||||||
protocolname = _protocolname;
|
protocolname = _protocolname;
|
||||||
// extract substitutions from protocolname "name(sub1,sub2)"
|
// extract substitutions from protocolname "name ( sub1, sub2 ) "
|
||||||
ssize_t i = protocolname.find('(');
|
ssize_t i = protocolname.find('(');
|
||||||
if (i >= 0)
|
if (i < 0) i = 0;
|
||||||
|
while (protocolname[i-1] == ' ')
|
||||||
|
protocolname.remove(--i, 1);
|
||||||
|
if (protocolname[i] == '(')
|
||||||
{
|
{
|
||||||
while (i < (ssize_t)protocolname.length())
|
while (i < (ssize_t)protocolname.length())
|
||||||
{
|
{
|
||||||
|
@ -22,20 +22,20 @@
|
|||||||
record (stringout, "$(P):cmd")
|
record (stringout, "$(P):cmd")
|
||||||
{
|
{
|
||||||
field (DTYP, "stream")
|
field (DTYP, "stream")
|
||||||
field (OUT, "@test.proto command terminal")
|
field (OUT, "@test.proto command terminal")
|
||||||
field (PRIO, "HIGH")
|
field (PRIO, "HIGH")
|
||||||
field (VAL, "")
|
field (VAL, "")
|
||||||
}
|
}
|
||||||
record (stringout, "$(P):info")
|
record (stringout, "$(P):info")
|
||||||
{
|
{
|
||||||
field (DTYP, "stream")
|
field (DTYP, "stream")
|
||||||
field (OUT, "@test.proto info terminal")
|
field (OUT, "@test.proto info terminal ")
|
||||||
field (PRIO, "HIGH")
|
field (PRIO, "HIGH")
|
||||||
}
|
}
|
||||||
record (stringout, "$(P):request")
|
record (stringout, "$(P):request")
|
||||||
{
|
{
|
||||||
field (DTYP, "stream")
|
field (DTYP, "stream")
|
||||||
field (OUT, "@test.proto request($(P):reply.VAL) terminal")
|
field (OUT, "@test.proto request ($(P):reply.VAL) terminal")
|
||||||
field (PRIO, "HIGH")
|
field (PRIO, "HIGH")
|
||||||
}
|
}
|
||||||
record (stringin, "$(P):reply")
|
record (stringin, "$(P):reply")
|
||||||
@ -44,7 +44,7 @@ record (stringin, "$(P):reply")
|
|||||||
record (stringout, "$(P):checksum")
|
record (stringout, "$(P):checksum")
|
||||||
{
|
{
|
||||||
field (DTYP, "stream")
|
field (DTYP, "stream")
|
||||||
field (OUT, "@test.proto checksum($(CHKSUM=sum)) terminal")
|
field (OUT, "@test.proto checksum ($(CHKSUM=sum)) terminal")
|
||||||
}
|
}
|
||||||
record (stringin, "$(P):spy")
|
record (stringin, "$(P):spy")
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user