From b5c60d208420fa572ce202e68c5bf40328a3fa57 Mon Sep 17 00:00:00 2001 From: mar Date: Thu, 31 May 1990 17:13:39 +0000 Subject: [PATCH] added followup_gpce to fix range problems in tha query ./ --- server/qsupport.qc | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/server/qsupport.qc b/server/qsupport.qc index 0cc32e43..05b973ef 100644 --- a/server/qsupport.qc +++ b/server/qsupport.qc @@ -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: */ -- 2.45.2