[netperf-dev] netperf4 commit notice r92 -
branches/glib_migration/src
raj at netperf.org
raj at netperf.org
Wed Mar 22 15:10:49 PST 2006
Author: raj
Date: 2006-03-22 15:10:48 -0800 (Wed, 22 Mar 2006)
New Revision: 92
Modified:
branches/glib_migration/src/netlib.c
Log:
Make sure we pass the right thing to parse_message, and that we don't
reparse the same message over and over again. We still have some sort
of state problem, which may stem from not bringing-over enough of
instantiate_netperf, but that is just a wild guess. We can say though
that we successfully pull control messages off the control channel.
Yippie.
Modified: branches/glib_migration/src/netlib.c
===================================================================
--- branches/glib_migration/src/netlib.c 2006-03-22 22:24:16 UTC (rev 91)
+++ branches/glib_migration/src/netlib.c 2006-03-22 23:10:48 UTC (rev 92)
@@ -1709,7 +1709,7 @@
netperf = global_state->server_hash[0].server;
/* mutex locking is not required because only one netserver thread
looks at these data structures per sgb */
- rc = process_message(netperf,message);
+ rc = process_message(netperf,xml_message);
if (rc == NPE_SUCCESS)
ret = TRUE;
else
@@ -1743,7 +1743,7 @@
message_state = global_state->message_state;
if (debug) {
g_fprintf(where,
- "%s called with cource %p condition %x and data %p\n",
+ "%s called with source %p condition %x and data %p\n",
__func__,
source,
condition,
@@ -1865,6 +1865,14 @@
ret = xml_parse_control_message(message_state->buffer,
message_state->bytes_received,
data);
+ /* let us not forget to reset our message_state shall we? we
+ don't really want to re-parse the same message over and over
+ again... raj 2006-03-22 */
+ message_state->have_header = FALSE;
+ message_state->bytes_received = 0;
+ message_state->bytes_remaining = NETPERF_MESSAGE_HEADER_SIZE;
+ g_free(message_state->buffer);
+ message_state->buffer = NULL;
return(ret);
}
}
More information about the netperf-dev
mailing list