[netperf-dev] netperf4 commit notice r99 - branches/glib_migration/src

raj at netperf.org raj at netperf.org
Fri Mar 24 14:29:22 PST 2006


Author: raj
Date: 2006-03-24 14:29:21 -0800 (Fri, 24 Mar 2006)
New Revision: 99

Modified:
   branches/glib_migration/src/netlib.c
Log:
It helps to malloc the right size lest one start scribbling knuth only
knows where.  Compiles, and runs the default tests under Linux with glib.


Modified: branches/glib_migration/src/netlib.c
===================================================================
--- branches/glib_migration/src/netlib.c	2006-03-24 22:15:26 UTC (rev 98)
+++ branches/glib_migration/src/netlib.c	2006-03-24 22:29:21 UTC (rev 99)
@@ -1988,6 +1988,15 @@
           if (control_message_len > 0) {
             /* what a wonderful day */
 
+	    length = control_message_len;
+
+	    if (debug) {
+	      g_fprintf(where,
+			"%s allocating %d bytes\n",
+			__func__,
+			length+NETPERF_MESSAGE_HEADER_SIZE);
+	    }
+
 	    chars_to_send = g_malloc(length+NETPERF_MESSAGE_HEADER_SIZE);
 
 	    /* if glib IO channels offered a gathering write, this



More information about the netperf-dev mailing list