[647] in BarnOwl Developers

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

[D-O-H] r744 - trunk/owl

daemon@ATHENA.MIT.EDU (nelhage@MIT.EDU)
Thu Oct 29 18:08:17 2009

Resent-From: nelhage@mit.edu
Resent-To: barnowl-dev-mtg@charon.mit.edu
To: dirty-owl-hackers@mit.edu
From: nelhage@MIT.EDU
Reply-to: dirty-owl-hackers@MIT.EDU
Date: Mon, 30 Jul 2007 18:47:39 -0400 (EDT)

Author: nelhage
Date: 2007-07-30 18:47:39 -0400 (Mon, 30 Jul 2007)
New Revision: 744

Modified:
   trunk/owl/zwrite.c
Log:
Fix sending to -c message -i personal


Modified: trunk/owl/zwrite.c
===================================================================
--- trunk/owl/zwrite.c	2007-07-12 02:37:16 UTC (rev 743)
+++ trunk/owl/zwrite.c	2007-07-30 22:47:39 UTC (rev 744)
@@ -124,6 +124,13 @@
     return(-1);
   }
 
+  if (z->class == NULL &&
+      z->inst == NULL &&
+      owl_list_get_size(&(z->recips))==0) {
+    owl_function_error("You must specify a recipient for zwrite");
+    return(-1);
+  }
+
   /* now deal with defaults */
   if (z->class==NULL) z->class=owl_strdup("message");
   if (z->inst==NULL) z->inst=owl_strdup("personal");
@@ -131,13 +138,6 @@
   if (z->opcode==NULL) z->opcode=owl_strdup("");
   /* z->message is allowed to stay NULL */
   
-  if (!strcasecmp(z->class, "message") &&
-      !strcasecmp(z->inst, "personal") &&
-      owl_list_get_size(&(z->recips))==0) {
-    owl_function_error("You must specify a recipient for zwrite");
-    return(-1);
-  }
-
   /* get a zsig, if not given */
   if (z->zsig==NULL) {
     zsigproc = owl_global_get_zsigproc(&g);


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