summaryrefslogtreecommitdiff
path: root/zwgc/zephyr.c
diff options
context:
space:
mode:
authorGravatar John Kohl <jtkohl@mit.edu>1989-12-04 03:47:51 +0000
committerGravatar John Kohl <jtkohl@mit.edu>1989-12-04 03:47:51 +0000
commit8f6f69e19ff99043cb83defc83def303deb3677b (patch)
tree906acc4cc328a9968a367272196d6a200c872c1e /zwgc/zephyr.c
parent0ac6ab57827c77b5aa1719c44d2bd04b363f1cbe (diff)
only print out errors on cancel/unset when debugging
Diffstat (limited to 'zwgc/zephyr.c')
-rw-r--r--zwgc/zephyr.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/zwgc/zephyr.c b/zwgc/zephyr.c
index a3ac66d..f8d7389 100644
--- a/zwgc/zephyr.c
+++ b/zwgc/zephyr.c
@@ -35,6 +35,10 @@ static char rcsid_zephyr_c[] = "$Id$";
#include "variables.h"
#include "pointer.h"
+#ifdef DEBUG
+extern int zwgc_debug;
+#endif /* DEBUG */
+
/*
* Internal Routine:
*
@@ -219,8 +223,17 @@ void finalize_zephyr() /* <<<>>> */
* Cancel our subscriptions, unset our location, and close our zephyr
* connection:
*/
- TRAP( ZCancelSubscriptions(0), "while canceling subscriptions" );
- TRAP( ZUnsetLocation(), "while unsetting location" );
+#ifdef DEBUG
+ if (zwgc_debug) {
+ TRAP( ZCancelSubscriptions(0), "while canceling subscriptions" );
+ TRAP( ZUnsetLocation(), "while unsetting location" );
+ } else {
+#endif /* DEBUG */
+ (void) ZCancelSubscriptions(0);
+ (void) ZUnsetLocation();
+#ifdef DEBUG
+ }
+#endif /* DEBUG */
ZClosePort();
}
return;