rename the rpc member from kill to attack; that way the

structure does not have the same name.  might find some
bugs.


svn:r449
This commit is contained in:
Niels Provos 2007-09-22 23:57:11 +00:00
parent db43c1e111
commit a4cc3d148a
2 changed files with 6 additions and 6 deletions

View File

@ -962,7 +962,7 @@ void
rpc_test(void)
{
struct msg *msg, *msg2;
struct kill *kill;
struct kill *attack;
struct run *run;
struct evbuffer *tmp = evbuffer_new();
struct timeval tv_start, tv_end;
@ -974,13 +974,13 @@ rpc_test(void)
EVTAG_ASSIGN(msg, from_name, "niels");
EVTAG_ASSIGN(msg, to_name, "phoenix");
if (EVTAG_GET(msg, kill, &kill) == -1) {
if (EVTAG_GET(msg, attack, &attack) == -1) {
fprintf(stderr, "Failed to set kill message.\n");
exit(1);
}
EVTAG_ASSIGN(kill, weapon, "feather");
EVTAG_ASSIGN(kill, action, "tickle");
EVTAG_ASSIGN(attack, weapon, "feather");
EVTAG_ASSIGN(attack, action, "tickle");
gettimeofday(&tv_start, NULL);
for (i = 0; i < 1000; ++i) {
@ -1013,7 +1013,7 @@ rpc_test(void)
if (!EVTAG_HAS(msg2, from_name) ||
!EVTAG_HAS(msg2, to_name) ||
!EVTAG_HAS(msg2, kill)) {
!EVTAG_HAS(msg2, attack)) {
fprintf(stderr, "Missing data structures.\n");
exit(1);
}

View File

@ -3,7 +3,7 @@
struct msg {
string from_name = 1;
string to_name = 2;
optional struct[kill] kill = 3;
optional struct[kill] attack = 3;
array struct[run] run = 4;
}