[jboss-cvs] JBoss Messaging SVN: r5528 - trunk/native/src.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Dec 12 17:06:02 EST 2008


Author: clebert.suconic at jboss.com
Date: 2008-12-12 17:06:02 -0500 (Fri, 12 Dec 2008)
New Revision: 5528

Modified:
   trunk/native/src/AsyncFile.cpp
   trunk/native/src/JavaUtilities.cpp
Log:
Just some clean up on the native code

Modified: trunk/native/src/AsyncFile.cpp
===================================================================
--- trunk/native/src/AsyncFile.cpp	2008-12-12 21:54:32 UTC (rev 5527)
+++ trunk/native/src/AsyncFile.cpp	2008-12-12 22:06:02 UTC (rev 5528)
@@ -153,7 +153,9 @@
 			if (iocbp->data == (void *) -1)
 			{
 				pollerRunning = 0;
-//				controller->log(threadContext, 2, "Received poller request to stop");
+#ifdef DEBUG
+				controller->log(threadContext, 2, "Received poller request to stop");
+#endif
 			}
 			else
 			{
@@ -174,9 +176,9 @@
 			delete iocbp;
 		}
 	}
-	
-//	controller->log(threadContext, 2, "Poller finished execution");
-	
+#ifdef DEBUG
+	controller->log(threadContext, 2, "Poller finished execution");
+#endif	
 }
 
 
@@ -264,8 +266,6 @@
 	int tries = 0;
 	int result = 0;
 	
-	// I will hold the lock until I'm done here
-	//LockClass lock(&fileMutex);
 	while ((result = ::io_submit(aioContext, 1, &iocb)) == (-EAGAIN))
 	{
 #ifdef DEBUG
@@ -328,8 +328,7 @@
 		::usleep(WAIT_FOR_SPOT);
 	}
 	
-//	controller->log(threadContext, 2,"Sent data to stop");
-	// It will wait the Poller to gives up its lock
+	// Waiting the Poller to finish (by giving up the lock)
 	LockClass lock(&pollerMutex);
 }
 

Modified: trunk/native/src/JavaUtilities.cpp
===================================================================
--- trunk/native/src/JavaUtilities.cpp	2008-12-12 21:54:32 UTC (rev 5527)
+++ trunk/native/src/JavaUtilities.cpp	2008-12-12 22:06:02 UTC (rev 5528)
@@ -43,7 +43,6 @@
 {
 	const char * valueStr = env->GetStringUTFChars(jstr, NULL);
 	std::string data(valueStr);
-	//data+=valueStr;
 	env->ReleaseStringUTFChars(jstr, valueStr);
 	return data;
 }




More information about the jboss-cvs-commits mailing list