]> andersk Git - moira.git/commitdiff
added followup_gpce to fix range problems in tha query
authormar <mar>
Thu, 31 May 1990 17:13:39 +0000 (17:13 +0000)
committermar <mar>
Thu, 31 May 1990 17:13:39 +0000 (17:13 +0000)
./

server/qsupport.qc

index 0cc32e43ede9fbf74577000322c15a5bc94189e8..05b973ef79013a541282e7b02e438f1e07578c1b 100644 (file)
@@ -1498,6 +1498,40 @@ followup_aqot(q, argv, cl)
 ##}
 
 
+followup_gpce(q, sq, v, action, actarg, cl)
+    struct query *q;
+    register struct save_queue *sq;
+    struct validate *v;
+    register int (*action)();
+    register int actarg;
+    client *cl;
+{
+    register int i, j;
+    char **argv, *malloc();
+    int id, status;
+
+    i = q->vcnt - 2;
+    while (sq_get_data(sq, &argv)) {
+       id = atoi(argv[PCAP_QSERVER]);
+       status = id_to_name(id, "MACHINE", &argv[PCAP_QSERVER]);
+       if (status) return (status);
+       id = atoi(argv[i]);
+       if (id > 0)
+         status = id_to_name(id, "USER", &argv[i]);
+       else
+         status = id_to_name(-id, "STRING", &argv[i]);
+       if (status && status != MR_NO_MATCH)
+         return(status);
+       (*action)(q->vcnt, argv, actarg);
+       for (j = 0; j < q->vcnt; j++)
+         free(argv[j]);
+       free(argv);
+    }
+    sq_destroy(sq);
+    return(MR_SUCCESS);
+}
+
+
 /* followup_gzcl:
  */
 
This page took 2.716511 seconds and 5 git commands to generate.