]> git.pond.sub.org Git - empserver/commitdiff
nat: Deprecate selector hostname, fix value to ""
authorMarkus Armbruster <armbru@pond.sub.org>
Mon, 27 Jan 2014 19:03:29 +0000 (20:03 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 1 Feb 2015 15:52:58 +0000 (16:52 +0100)
Its value has always been "", unless the deity recompiled with
RESOLVE_IPADDRESS defined, or imported another value with empdump.

I'm going to drop the RESOLVE_IPADDRESS code, including struct natstr
member nat_hostname.  To prepare for that, fix the selector's value to
"", so it doesn't need nat_hostname, and deprecate it.

This changes its "len" in xdump meta nat from 512 to 0.  Unlikely to
upset clients.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
src/lib/common/nsc.c
tests/smoke/journal.log

index 17b274eea30fdbb35b171ae04e72f2bb908707de..af3b08117c3f8ed08b41fa6430aab6af6f3d768a 100644 (file)
@@ -27,7 +27,7 @@
  *  nsc.c: Empire selection global structures
  *
  *  Known contributors to this file:
- *     Markus Armbruster, 2004-2013
+ *     Markus Armbruster, 2004-2014
  */
 
 /*
@@ -543,7 +543,7 @@ struct castr cou_ca[] = {
     {"passwd", fldoff(nat_pnam), NSC_STRINGY, 20, NULL,
      EF_BAD, NSC_DEITY | NSC_EXTRA},
     {"ip", fldoff(nat_hostaddr), NSC_STRINGY, 46, NULL, EF_BAD, 0},
-    {"hostname", fldoff(nat_hostname), NSC_STRINGY, 512, NULL, EF_BAD, 0},
+    {"hostname", 0, NSC_STRINGY, 0, NULL, EF_BAD, 0}, /* deprecated */
     {"userid", fldoff(nat_userid), NSC_STRINGY, 32, NULL, EF_BAD, 0},
     {"xcap", fldoff(nat_xcap), NSC_XCOORD, 0, NULL, EF_BAD, 0},
     {"ycap", fldoff(nat_ycap), NSC_YCOORD, 0, NULL, EF_BAD, 0},
index 259e232df831c03d9b91a32f8f3c942219dbf77c..30e5d96bb418ee0f24e8f6298e0a9c0d2065a789 100644 (file)
     Play#0 output Play#0 1 "cname" 14 0 20 -1
     Play#0 output Play#0 1 "passwd" 14 1 20 -1
     Play#0 output Play#0 1 "ip" 14 1 46 -1
-    Play#0 output Play#0 1 "hostname" 14 1 512 -1
+    Play#0 output Play#0 1 "hostname" 14 1 0 -1
     Play#0 output Play#0 1 "userid" 14 1 32 -1
     Play#0 output Play#0 1 "xcap" 9 1 0 -1
     Play#0 output Play#0 1 "ycap" 10 1 0 -1
     Play#0 output Play#0 1 "cnum" 5 0 0 8
     Play#0 output Play#0 1 "flags" 8 8 0 35
     Play#0 output Play#0 1 "ip" 14 0 46 -1
-    Play#0 output Play#0 1 "hostname" 14 0 512 -1
+    Play#0 output Play#0 1 "hostname" 14 0 0 -1
     Play#0 output Play#0 1 "userid" 14 0 32 -1
     Play#0 output Play#0 1 "xcap" 9 0 0 -1
     Play#0 output Play#0 1 "ycap" 10 0 0 -1
     Play#2 output Play#2 1 "cnum" 5 0 0 8
     Play#2 output Play#2 1 "flags" 8 8 0 35
     Play#2 output Play#2 1 "ip" 14 0 46 -1
-    Play#2 output Play#2 1 "hostname" 14 0 512 -1
+    Play#2 output Play#2 1 "hostname" 14 0 0 -1
     Play#2 output Play#2 1 "userid" 14 0 32 -1
     Play#2 output Play#2 1 "xcap" 9 0 0 -1
     Play#2 output Play#2 1 "ycap" 10 0 0 -1