Commit e055e9a4 authored by Pekka Pessi's avatar Pekka Pessi

msg_parser.awk: fixed size calculation for header structure in parser table.

torture_sip.c: fixed test for sip_t size.

darcs-hash:20061219073945-65a35-eb6a3cfddf27fe20364bfe79cc6e3ba6bb0913bc.gz
parent e8a8e69a
......@@ -390,6 +390,8 @@ END {
getline footer < TEMPLATE;
RS=RS0;
module_struct = module "_t";
sub(/.*[\/]/, "", TEMPLATE);
gsub(/#AUTO#/, auto, header);
gsub(/#DATE#/, "@date Generated: " date, header);
......@@ -423,9 +425,10 @@ END {
if (extra > 0) {
printf("struct %s {\n", extra_struct) > PT;
printf(" %s_t base;\n", module) > PT;
printf(" %s base;\n", module_struct) > PT;
printf(" msg_header_t *extra[%u];\n", extra) > PT;
printf("};\n\n") > PT;
module_struct = "struct " extra_struct;
}
printf("msg_mclass_t const %s_mclass[1] = \n{{\n", module) > PT;
......@@ -441,7 +444,7 @@ END {
printf("#else\n") > PT;
printf(" 0,\n") > PT;
printf("#endif\n") > PT;
printf(" sizeof(%s_t),\n", module) > PT;
printf(" sizeof (%s),\n", module_struct) > PT;
printf(" %s_extract_body,\n", module) > PT;
len = split("request status separator payload unknown error", unnamed, " ");
......
......@@ -1081,7 +1081,7 @@ static int parser_tag_test(void)
sip = sip_object(msg);
TEST_1(home && msg && sip);
TEST_SIZE(sip->sip_size, sizeof *sip);
TEST_1(sip->sip_size >= sizeof *sip);
TEST_1(sip_is_status((sip_header_t *)sip->sip_status));
TEST_1(sip_is_via((sip_header_t *)sip->sip_via));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment