changeset 2307:0bdf82fd01e8

- Set timeout to 120 seconds (previous commit mistakenly changed it to 10). - Print debug info only in debug mode.
author Deepak Bhole <dbhole@redhat.com>
date Tue, 13 Jul 2010 14:48:45 -0400
parents b7ee63785b8d
children 5ecc2d7f4f7c
files ChangeLog plugin/icedteanp/IcedTeaJavaRequestProcessor.h plugin/icedteanp/IcedTeaPluginUtils.h
diffstat 3 files changed, 16 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Jul 23 09:16:18 2010 +0100
+++ b/ChangeLog	Tue Jul 13 14:48:45 2010 -0400
@@ -1,3 +1,10 @@
+2010-07-13  Deepak Bhole <dbhole@redhat.com>
+
+	* plugin/icedteanp/IcedTeaJavaRequestProcessor.h: Set timeout to 120
+	seconds (previous commit mistakenly changed it to 10).
+	* plugin/icedteanp/IcedTeaPluginUtils.h: Print debug info only in debug
+	mode.
+
 2010-06-14  Deepak Bhole <dbhole@redhat.com>
 
 	* plugin/icedteanp/IcedTeaJavaRequestProcessor.cc: Use variadic macro
--- a/plugin/icedteanp/IcedTeaJavaRequestProcessor.h	Fri Jul 23 09:16:18 2010 +0100
+++ b/plugin/icedteanp/IcedTeaJavaRequestProcessor.h	Tue Jul 13 14:48:45 2010 -0400
@@ -46,7 +46,7 @@
 #include "IcedTeaNPPlugin.h"
 #include "IcedTeaPluginUtils.h"
 
-#define REQUESTTIMEOUT 10
+#define REQUESTTIMEOUT 120
 
 /*
  * This struct holds data specific to a Java operation requested by the plugin
--- a/plugin/icedteanp/IcedTeaPluginUtils.h	Fri Jul 23 09:16:18 2010 +0100
+++ b/plugin/icedteanp/IcedTeaPluginUtils.h	Tue Jul 13 14:48:45 2010 -0400
@@ -67,8 +67,14 @@
 #include "IcedTeaNPPlugin.h"
 
 #define PLUGIN_DEBUG(...) \
-	fprintf (stderr, "ITNPP Thread# %d: ", pthread_self()); \
-	fprintf (stderr, __VA_ARGS__)
+  do                                                          \
+  {                                                           \
+    if (plugin_debug)                                         \
+    {                                                         \
+      fprintf (stderr, "ITNPP Thread# %ld: ", pthread_self()); \
+      fprintf (stderr, __VA_ARGS__);                          \
+    }                                                         \
+  } while (0)
 
 #define CHECK_JAVA_RESULT(result_data)                               \
 {                                                                    \