]> andersk Git - moira.git/commitdiff
make this compile again (I thought it was going to be harder than this,
authordanw <danw>
Fri, 20 Mar 1998 18:25:41 +0000 (18:25 +0000)
committerdanw <danw>
Fri, 20 Mar 1998 18:25:41 +0000 (18:25 +0000)
but it turns out the get_list_info function was completely unnecessary
since followup_glin does all the right stuff already.)

server/qsupport.pc
server/queries2.c

index 7d4647fc0afa33e8fc1701bf864459b8afebb3d1..f1d91448772217841d20f986523a0ff0f776f75e 100644 (file)
@@ -102,123 +102,6 @@ int set_pobox(struct query *q, char **argv, client *cl)
   return MR_SUCCESS;
 }
 
-
-/* get_list_info:  passed a wildcard list name, returns lots of stuff about
- * each list.  This is tricky:  first build a queue of all requested
- * data.  Rest of processing consists of fixing gid, ace_name, and modby.
- */
-
-int get_list_info(struct query *q, char **aargv, client *cl,
-                 int (*action)(int, char *[], void *), void *actarg)
-{
-  char *argv[13];
-  EXEC SQL BEGIN DECLARE SECTION;
-  char *name, acl_type[LIST_ACL_TYPE_SIZE], listname[LIST_NAME_SIZE];
-  char active[5], public[5], hidden[5];
-  char maillist[5], grouplist[5], gid_str[LIST_GID_SIZE];
-  char desc[LIST_DESCRIPTION_SIZE], modtime[LIST_MODTIME_SIZE];
-  char modwith[LIST_MODWITH_SIZE];
-  int id, rowcount, acl_id, hid, modby_id;
-  EXEC SQL END DECLARE SECTION;
-  int returned, status;
-  struct save_queue *sq;
-
-  returned = rowcount = 0;
-  name = aargv[0];
-  convert_wildcards(name);
-
-  sq = sq_create();
-  EXEC SQL DECLARE csr102 CURSOR FOR SELECT list_id FROM list
-    WHERE name LIKE :name ESCAPE '*';
-  if (dbms_errno)
-    return mr_errcode;
-  EXEC SQL OPEN csr102;
-  if (dbms_errno)
-    return mr_errcode;
-  while (1)
-    {
-      EXEC SQL FETCH csr102 INTO :id;
-      if (sqlca.sqlcode)
-       break;
-      sq_save_data(sq, (void *)id);
-      rowcount++;
-    }
-  EXEC SQL CLOSE csr102;
-
-  if (dbms_errno)
-    return mr_errcode;
-  if (rowcount == 0)
-    return MR_NO_MATCH;
-
-  argv[0] = listname; argv[1] = active; argv[2] = public; argv[3] = hidden;
-  argv[4] = maillist; argv[5] = grouplist; argv[6] = gid_str;
-  argv[7] = acl_type; argv[9] = desc; argv[10] = modtime; argv[12] = modwith;
-
-  while (sq_get_data(sq, &id))
-    {
-      if (id == 0)
-       continue;
-      argv[6] = gid_str;
-      EXEC SQL SELECT name, active, publicflg,
-       hidden, hidden, maillist, grouplist, gid,
-       acl_type, acl_id, description,
-       TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith
-       INTO :listname, :active, :public, :hidden, :hid, :maillist,
-       :grouplist, :gid_str, :acl_type, :acl_id, :desc,
-       :modtime, :modby_id, :modwith
-       FROM list WHERE list_id = :id;
-
-      if (dbms_errno)
-       return mr_errcode;
-      strtrim(acl_type);
-
-      if (atoi(gid_str) == -1)
-       argv[6] = UNIQUE_GID;
-
-      argv[8] = malloc(0);
-      if (!strcmp(acl_type, "LIST"))
-       status = id_to_name(acl_id, LIST_TABLE, &argv[8]);
-      else if (!strcmp(acl_type, "USER"))
-       status = id_to_name(acl_id, USERS_TABLE, &argv[8]);
-      else if (!strcmp(acl_type, "KERBEROS"))
-       status = id_to_name(acl_id, STRINGS_TABLE, &argv[8]);
-      else if (!strcmp(acl_type, "NONE"))
-       {
-         status = 0;
-         free(argv[8]);
-         argv[8] = xstrdup("NONE");
-       }
-      else
-       {
-         status = 0;
-         free(argv[8]);
-         argv[8] = xstrdup("???");
-       }
-      if (status && status != MR_NO_MATCH)
-       return status;
-
-      argv[11] = malloc(0);
-      if (modby_id > 0)
-       status = id_to_name(modby_id, USERS_TABLE, &argv[11]);
-      else
-       status = id_to_name(-modby_id, STRINGS_TABLE, &argv[11]);
-      if (status && status != MR_NO_MATCH)
-       return status;
-
-      mr_trim_args(q->vcnt, argv);
-      returned++;
-      (*action)(q->vcnt, argv, actarg);
-      free(argv[8]);
-      free(argv[11]);
-    }
-
-  sq_destroy(sq);
-  if (dbms_errno)
-    return mr_errcode;
-  return MR_SUCCESS;
-}
-
-
 /* Add_member_to_list: do list flattening as we go!  MAXLISTDEPTH is
  * how many different ancestors a member is allowed to have.
  */
index e8e2ae4e06412b10ada6a5835946b144202f0568..30d7869a4ed562862d369c3f5038d1d272bbff3f 100644 (file)
@@ -3223,7 +3223,7 @@ struct query Queries2[] = {
     RETRIEVE,
     "l",
     LIST_TABLE,
-    "name, active, publicflg, hidden, maillist, group, gid, ace_type, ace_name, description, modtime, modby, modwith FROM list",
+    "name, active, publicflg, hidden, maillist, grouplist, gid, acl_type, acl_id, description, modtime, modby, modwith FROM list",
     glin_fields,
     13,
     "name LIKE '%s'",
This page took 0.078533 seconds and 5 git commands to generate.