This is the mail archive of the ecos-patches@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Do not relaunch tftpd server upon second invocation of profile_on


On Thu, Oct 30, 2008 at 03:51:25PM +0100, ?yvind Harboe wrote:
> Fixed comment.

Thanks. I reworded the comment a bit as well.

        Andrew
Index: services/profile/gprof/current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/services/profile/gprof/current/ChangeLog,v
retrieving revision 1.10
diff -u -r1.10 ChangeLog
--- services/profile/gprof/current/ChangeLog	18 Aug 2008 13:34:29 -0000	1.10
+++ services/profile/gprof/current/ChangeLog	3 Nov 2008 14:24:39 -0000
@@ -1,3 +1,8 @@
+2007-10-14  Oyvind Harboe  <oyvind.harboe@zylin.com>
+
+	* src/profile.c: do not relaunch tftpd thread upon second invocation
+	of profile_on
+
 2008-08-18  Bart Veer  <bartv@ecoscentric.com>
 
 	* host/Makefile.am: update host-side configury
Index: services/profile/gprof/current/src/profile.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/services/profile/gprof/current/src/profile.c,v
retrieving revision 1.6
diff -u -r1.6 profile.c
--- services/profile/gprof/current/src/profile.c	21 Dec 2007 16:47:15 -0000	1.6
+++ services/profile/gprof/current/src/profile.c	3 Nov 2008 14:24:40 -0000
@@ -577,11 +577,16 @@
 
     profile_enabled = 1;
 
-#ifdef CYGPKG_PROFILE_TFTP    
-    // Create a TFTP server to provide the data
-    // invoking this a second time is harmless
-    (void) tftpd_start(CYGNUM_PROFILE_TFTP_PORT, &profile_tftp_fileops);
-#endif    
+#ifdef CYGPKG_PROFILE_TFTP
+    static int profile_tftp_is_started        = 0;
+    if (!profile_tftp_is_started)
+    {
+    	profile_tftp_is_started = 1;
+        // Create a TFTP server the first time we start profiling to
+        // provide access to the data via the network.
+        (void) tftpd_start(CYGNUM_PROFILE_TFTP_PORT, &profile_tftp_fileops);
+    }
+#endif
 }
 
 // EOF profile.c

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]