[netperf-dev] netperf4 commit notice r89 - in
branches/glib_migration: . src
raj at netperf.org
raj at netperf.org
Mon Mar 20 17:25:39 PST 2006
Author: raj
Date: 2006-03-20 17:25:38 -0800 (Mon, 20 Mar 2006)
New Revision: 89
Modified:
branches/glib_migration/configure.ac
branches/glib_migration/src/netlib.c
Log:
A few more baby steps towards using the glib event loop for the actual
control connection rather than just the accepting loop. Still lots of
"holes" in the code to be filled before actual testing. I _think_ this
stuff still runs with the old instantiate_netperf/handle_requests path
but haven't verified. Basically, I'm still working to "invert" the
code flow and "work my way up" from completing the receipt of a complete
control message. At least on the netserver side. I'm hoping the glib
eventloop stuff will meet the existing netperf stuff somewhere in the
middle :)
Modified: branches/glib_migration/configure.ac
===================================================================
--- branches/glib_migration/configure.ac 2006-03-20 21:48:31 UTC (rev 88)
+++ branches/glib_migration/configure.ac 2006-03-21 01:25:38 UTC (rev 89)
@@ -1,4 +1,4 @@
-# $Id$
+#
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
Modified: branches/glib_migration/src/netlib.c
===================================================================
--- branches/glib_migration/src/netlib.c 2006-03-20 21:48:31 UTC (rev 88)
+++ branches/glib_migration/src/netlib.c 2006-03-21 01:25:38 UTC (rev 89)
@@ -1666,7 +1666,9 @@
xml_parse_control_message(gchar *message, gsize length, gpointer data) {
xmlDocPtr xml_message;
+ int rc = NPE_SUCCESS;
gboolean ret;
+ server_t *netperf;
NETPERF_DEBUG_ENTRY(debug,where);
@@ -1680,8 +1682,15 @@
message,
xml_message);
}
- /* send it on its way*/
- ret = TRUE;
+ /* lookup its destination and send it on its way */
+ netperf = netperf_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);
+ if (rc == NPE_SUCCESS)
+ ret = TRUE;
+ else
+ ret = false;
}
else {
if (debug) {
@@ -1801,6 +1810,10 @@
if (0 == message_state->bytes_remaining) {
/* we have an entire message, time to process it */
+ ret = xml_parse_control_message(message_state->buffer,
+ message_state->bytes_received,
+ data);
+ return(ret);
}
}
More information about the netperf-dev
mailing list