]> andersk Git - moira.git/blobdiff - gen/hesiod.qc
1 real bug fix in arg passing, lots of DEBUGing messaages added
[moira.git] / gen / hesiod.qc
index fbaccd472751c6283cae6926c833785e7e206799..c56630aede5da6cf725b4b3384a6fbfa006a7747 100644 (file)
@@ -653,8 +653,8 @@ do_printcap()
     char outf[64], outft[64];
     struct stat sb;
     time_t ftime;
-##  char name[17], rp[17], sd[33], rm[33], *filetime;
-##  int flag;
+##  char name[17], rp[17], sd[33], rm[33], rq[33], *filetime;
+##  int flag, ka, pc;
 
     sprintf(outf, "%s/printcap.db", hesiod_dir);
 
@@ -679,14 +679,21 @@ do_printcap()
     fprintf(stderr, "Building printcap.db\n");
 
 ##  range of p is printcap
-##  retrieve (name = p.#name, rp = p.#rp, sd = p.dir, rm = machine.#name)
-##    where machine.mach_id = p.mach_id {
+##  range of m is machine
+##  retrieve (name = p.#name, rp = p.#rp, sd = p.dir, rm = machine.#name,
+##           ka = p.auth, pc = p.price, rq = m.#name)
+##    where machine.mach_id = p.mach_id and m.mach_id = p.quotaserver {
        strtrim(name);
        strtrim(rp);
        strtrim(sd);
        strtrim(rm);
-       fprintf(out, "%s.pcap\tHS %s \"%s:rp=%s:rm=%s:sd=%s\"\n",
-               name, HTYPE, name, rp, rm, sd);
+       strtrim(rq);
+       fprintf(out, "%s.pcap\tHS %s \"%s:rp=%s:rm=%s:sd=%s:ka#%d:pc#%d",
+               name, HTYPE, name, rp, rm, sd, ka, pc);
+       if (strcmp(rq, "[NONE]"))
+         fprintf(out, ":rq=%s\"\n", rq);
+       else
+         fputs("\"\n", out);
 ##  }
 
     if (fclose(out)) {
This page took 0.191374 seconds and 4 git commands to generate.