summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2008-06-08 12:11:50 -0400
committerEliot Horowitz <eliot@10gen.com>2008-06-08 12:11:50 -0400
commit343ce211106066bbf695982c1fbb04df6fffc6d5 (patch)
tree63b9cd44cee9222d8e857acfd9156aafed42b815
parent92d2e867b764c9f43df2a9b510044d64b7c682a4 (diff)
downloadmongo-r0.0.4_rc1.tar.gz
less debugging spamr0.0.4_rc1
-rw-r--r--db/javajs.cpp23
-rw-r--r--db/query.cpp2
2 files changed, 19 insertions, 6 deletions
diff --git a/db/javajs.cpp b/db/javajs.cpp
index 86a0a9a2ac1..69c7d45bc62 100644
--- a/db/javajs.cpp
+++ b/db/javajs.cpp
@@ -14,6 +14,19 @@
using namespace boost::filesystem;
+
+//#define JNI_DEBUG 1
+
+#ifdef JNI_DEBUG
+#undef JNI_DEBUG
+#define JNI_DEBUG(x) cerr << x << endl
+#else
+#undef JNI_DEBUG
+#define JNI_DEBUG(x)
+#endif
+
+
+
#ifdef J_USE_OBJ
#include "jsobj.h"
#pragma message("warning: including jsobj.h")
@@ -416,7 +429,7 @@ const char * findEd(){
// ---
JNIEXPORT void JNICALL java_native_say(JNIEnv * env , jclass, jobject outBuffer ){
- cerr << "native say called!" << endl;
+ JNI_DEBUG( "native say called!" );
Message out( env->GetDirectBufferAddress( outBuffer ) , false );
Message in;
@@ -425,16 +438,16 @@ JNIEXPORT void JNICALL java_native_say(JNIEnv * env , jclass, jobject outBuffer
}
JNIEXPORT jint JNICALL java_native_call(JNIEnv * env , jclass, jobject outBuffer , jobject inBuffer ){
- cerr << "native call called!" << endl;
+ JNI_DEBUG( "native call called!" );
Message out( env->GetDirectBufferAddress( outBuffer ) , false );
Message in;
jniCallback( out , in );
- cerr << "in.data : " << in.data << endl;
+ JNI_DEBUG( "in.data : " << in.data );
if ( in.data && in.data->len > 0 ){
- cerr << "copying data of len :" << in.data->len << endl;
+ JNI_DEBUG( "copying data of len :" << in.data->len );
memcpy( env->GetDirectBufferAddress( inBuffer ) , in.data , in.data->len );
return in.data->len;
}
@@ -445,7 +458,7 @@ JNIEXPORT jint JNICALL java_native_call(JNIEnv * env , jclass, jobject outBuffer
// ----
int javajstest() {
-
+
const int debug = 0;
JavaJSImpl& JavaJS = *::JavaJS;
diff --git a/db/query.cpp b/db/query.cpp
index bd19ea653dd..2a624977630 100644
--- a/db/query.cpp
+++ b/db/query.cpp
@@ -407,7 +407,7 @@ string validateNS(const char *ns, NamespaceDetails *d) {
bool userCreateNS(const char *ns, JSObj& j);
-const int edebug=1;
+const int edebug=0;
bool dbEval(JSObj& cmd, JSObjBuilder& result) {
Element e = cmd.firstElement();