[1617] in Moira

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

"show all lists" doesn't

daemon@ATHENA.MIT.EDU (Garry Zacheiss)
Sat Aug 5 22:21:00 2000

Message-Id: <200008060220.WAA01962@riff-raff.mit.edu>
To: moiradev@MIT.EDU
Date: Sat, 05 Aug 2000 22:20:57 -0400
From: Garry Zacheiss <zacheiss@MIT.EDU>

	Selecting "show all lists to which a given member belongs" from
the curses client will fail to return lists that are neither maillist
lists nor groups.  This fixes that, by asking one more question.  The
history buffs among us will note that this fixes bugs[15156], reported
by carla in 1997.

Garry

Index: lists.c
===================================================================
RCS file: /afs/athena.mit.edu/astaff/project/moiradev/repository/moira/clients/moira/lists.c,v
retrieving revision 1.40
diff -c -r1.40 lists.c
*** lists.c	2000/04/19 23:15:35	1.40
--- lists.c	2000/08/06 02:18:34
***************
*** 843,849 ****
  int ListByMember(int argc, char **argv)
  {
    char buf[BUFSIZ], temp_buf[BUFSIZ], *type, *name, **info;
!   Bool maillist, group;
    struct mqelem *top, *elem;
  
    type = strdup("USER");
--- 843,849 ----
  int ListByMember(int argc, char **argv)
  {
    char buf[BUFSIZ], temp_buf[BUFSIZ], *type, *name, **info;
!   Bool maillist, group, neither;
    struct mqelem *top, *elem;
  
    type = strdup("USER");
***************
*** 867,872 ****
--- 867,876 ----
  			     TRUE)) == -1)
      return DM_NORMAL;
  
+   if ((neither = YesNoQuestion("Show Lists that are neither Maillists nor Groups (y/n) ?",
+ 			       TRUE)) == -1)
+     return DM_NORMAL;
+ 
    elem = top = GetListInfo(GLOM, type, name);
  
    while (elem)
***************
*** 874,879 ****
--- 878,886 ----
        info = elem->q_data;
        if ((maillist == TRUE && !strcmp(info[GLOM_MAILLIST], "1")) ||
  	  (group == TRUE && !strcmp(info[GLOM_GROUP], "1")))
+ 	Put_message(info[GLOM_NAME]);
+       if (neither == TRUE && !strcmp(info[GLOM_MAILLIST], "0") &&
+ 	   !strcmp(info[GLOM_GROUP], "0"))
  	Put_message(info[GLOM_NAME]);
        elem = elem->q_forw;
      }

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