[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[monit-dev] Adding a new keyword for a protocol test
From: |
Pierrick |
Subject: |
[monit-dev] Adding a new keyword for a protocol test |
Date: |
Fri, 7 Dec 2007 02:18:27 -0800 (PST) |
Hello,
I'm trying to create a new test for SIP, and, in order to make a useful
test, I need to change the receiver uri.
So, I have add a new keyword (touri), paired with corresponding tokens on
p.y and l.l :
l.l
touri { return TOURI; }
p.y
%token <string> TOURI
In order to complete my work, I also create a function, wich is based on the
behavior for REQUEST :
touri : /* EMPTY */
| TOURI STRING {
DEBUG("to uri\n");
verifyToUri(&portset, $2);
FREE($2);
}
static void verifyToUri(Port_T port, char * touri) {
ASSERT(touri);
char * to = port->touri;
if (to == NULL) {
NEW(to);
port->touri = to;
}
if (touri != NULL) {
to=xstrdup(touri);
}
}
But, when I try ./monit -v validate, my only result is :
/etc/monit/ser.rc:7: Error: syntax error 'touri'
Can anyone give me some clues on "how to add keyword" please.
--
View this message in context:
http://www.nabble.com/Adding-a-new-keyword-for-a-protocol-test-tf4856536.html#a13897176
Sent from the monit-dev mailing list archive at Nabble.com.
- [monit-dev] Adding a new keyword for a protocol test,
Pierrick <=