[2935] in BarnOwl Developers

home help back first fref pref prev next nref lref last post

[PATCH 3/5] make the unsuball functions's error handling fit in with the rest of the program

daemon@ATHENA.MIT.EDU (Karl Ramm)
Fri Feb 25 21:24:42 2011

From: Karl Ramm <kcr@1ts.org>
To: barnowl-dev@mit.edu
Cc: Karl Ramm <kcr@1ts.org>
Date: Fri, 25 Feb 2011 21:24:19 -0500
In-Reply-To: <uussjvbr0tc.fsf@1ts.org>

"what is this, I don't even"
runing com_err in the middle of a curses program is just plain wrong.
---
 zephyr.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/zephyr.c b/zephyr.c
index 7eb01af..f546bf5 100644
--- a/zephyr.c
+++ b/zephyr.c
@@ -428,13 +428,13 @@ int owl_zephyr_loadloginsubs(const char *filename)
 void unsuball(void)
 {
 #if HAVE_LIBZEPHYR
-  int ret;
+  Code_t ret;
 
   ZResetAuthentication();
-  ret=ZCancelSubscriptions(0);
-  if (ret != ZERR_NONE) {
-    com_err("owl",ret,"while unsubscribing");
-  }
+  ret = ZCancelSubscriptions(0);
+  if (ret != ZERR_NONE)
+    owl_function_error("Zephyr: Cancelling subscriptions: %s",
+                       error_message(ret));
 #endif
 }
 
-- 
1.7.2.3


home help back first fref pref prev next nref lref last post