[1836] in Moira
curses client fix
daemon@ATHENA.MIT.EDU (Garry Zacheiss)
Fri Jul 27 07:52:40 2001
Message-Id: <200107271150.HAA00713@coleco-sidewinder.mit.edu>
To: moiradev@mit.edu
Date: Fri, 27 Jul 2001 07:50:24 -0400
From: Garry Zacheiss <zacheiss@MIT.EDU>
Don't let people try to add cluster sata consisting of empty
strings.
Garry
Index: cluster.c
===================================================================
RCS file: /afs/athena.mit.edu/astaff/project/moiradev/repository/moira/clients/moira/cluster.c,v
retrieving revision 1.49
diff -u -r1.49 cluster.c
--- cluster.c 2001/05/31 21:34:31 1.49
+++ cluster.c 2001/07/27 11:48:00
@@ -1848,8 +1848,16 @@
int AddClusterData(int argc, char **argv)
{
- int stat;
+ int stat, i;
+ for (i = 1; i < 4; i++)
+ {
+ if (IS_EMPTY(argv[i]))
+ {
+ Put_message("Cluster data cannot be an empty string.");
+ return DM_NORMAL;
+ }
+ }
if ((stat = do_mr_query("add_cluster_data", 3, argv + 1, NULL, NULL)))
com_err(program_name, stat, " in AddClusterData.");
return DM_NORMAL;