These two getMember's behavior is different.
For example. for "register.sip"
ScriptInterp::getMember's result doesn't include the leading dot, ie. the result is "sip"
ScriptCommand::getMember's result include the leading dot, ie. the result is ".sip"
Unfortunately, this difference is overlooked sometimes.
For example, in bayonne2-1.5.28 src/checks.cpp, chkSlog function assumes ScriptCommand::getMember's result doesn't include the leading dot, which is apparently wrong.
Although we could fix the problem by modifying chkSlog(), I think the better solution is make the behavior of the two getMember consistent with each other.
So I propose this ccscript3-ScriptCommand-getMember.patch
:
--- src/command.cpp.orig 2006-09-25 16:28:24.000000000 +0800
+++ src/command.cpp 2006-09-25 16:28:56.000000000 +0800
@@ -383,7 +383,12 @@
const char *ScriptCommand::getMember(Line *line)
{
- return strchr(line->cmd, '.');
+ const char *cp = strchr(line->cmd, '.');
+
+ if(cp)
+ ++cp;
+
+ return cp;
}
const char *ScriptCommand::getOption(Line *line, unsigned *idx)
Please ignore this patch.
Because I found that there are many functions that assume getMember's result contains the leading dot.
So I made two patches, one for ccscript3-1.0.9, the other for bayonn2-1.5.28.
These two patches could change the behavior of ScriptCommand::getMember and solve all the problems caused by the semantic change of ScriptCommand::getMember.
Please check the attachment.