|
Lines 268-277
Link Here
|
| 268 |
find_lease (&lease, packet, packet -> shared_network, |
268 |
find_lease (&lease, packet, packet -> shared_network, |
| 269 |
0, &allocatedp, (struct lease *)0, MDL); |
269 |
0, &allocatedp, (struct lease *)0, MDL); |
| 270 |
if (lease && lease -> client_hostname && |
270 |
if (lease && lease -> client_hostname) { |
| 271 |
db_printable (lease -> client_hostname)) |
271 |
if ((strlen (lease -> client_hostname) <= 64) && |
| 272 |
s = lease -> client_hostname; |
272 |
db_printable (lease -> client_hostname)) |
| 273 |
else |
273 |
s = lease -> client_hostname; |
|
|
274 |
else |
| 275 |
s = "Hostname Unsuitable for Printing"; |
| 276 |
} else |
| 274 |
s = (char *)0; |
277 |
s = (char *)0; |
| 275 |
/* Say what we're doing... */ |
278 |
/* Say what we're doing... */ |
|
Lines 446-455
Link Here
|
| 446 |
/* XXX consider using allocatedp arg to find_lease to see |
449 |
/* XXX consider using allocatedp arg to find_lease to see |
| 447 |
XXX that this isn't a compliant DHCPREQUEST. */ |
450 |
XXX that this isn't a compliant DHCPREQUEST. */ |
| 448 |
if (lease && lease -> client_hostname && |
451 |
if (lease && lease -> client_hostname) { |
| 449 |
db_printable (lease -> client_hostname)) |
452 |
if ((strlen (lease -> client_hostname) <= 64) && |
| 450 |
s = lease -> client_hostname; |
453 |
db_printable (lease -> client_hostname)) |
| 451 |
else |
454 |
s = lease -> client_hostname; |
|
|
455 |
else |
| 456 |
s = "Hostname Unsuitable for Printing"; |
| 457 |
} else |
| 452 |
s = (char *)0; |
458 |
s = (char *)0; |
| 453 |
oc = lookup_option (&dhcp_universe, packet -> options, |
459 |
oc = lookup_option (&dhcp_universe, packet -> options, |
|
Lines 742-751
Link Here
|
| 742 |
packet -> raw -> chaddr, packet -> raw -> hlen))) |
748 |
packet -> raw -> chaddr, packet -> raw -> hlen))) |
| 743 |
lease_dereference (&lease, MDL); |
749 |
lease_dereference (&lease, MDL); |
| 744 |
if (lease && lease -> client_hostname && |
750 |
if (lease && lease -> client_hostname) { |
| 745 |
db_printable (lease -> client_hostname)) |
751 |
if ((strlen (lease -> client_hostname) <= 64) && |
| 746 |
s = lease -> client_hostname; |
752 |
db_printable (lease -> client_hostname)) |
| 747 |
else |
753 |
s = lease -> client_hostname; |
|
|
754 |
else |
| 755 |
s = "Hostname Unsuitable for Printing"; |
| 756 |
} else |
| 748 |
s = (char *)0; |
757 |
s = (char *)0; |
| 749 |
strncpy(cstr, inet_ntoa (packet -> raw -> ciaddr), 15); |
758 |
strncpy(cstr, inet_ntoa (packet -> raw -> ciaddr), 15); |
|
Lines 830-839
Link Here
|
| 830 |
data_string_forget (&data, MDL); |
839 |
data_string_forget (&data, MDL); |
| 831 |
find_lease_by_ip_addr (&lease, cip, MDL); |
840 |
find_lease_by_ip_addr (&lease, cip, MDL); |
| 832 |
if (lease && lease -> client_hostname && |
841 |
if (lease && lease -> client_hostname) { |
| 833 |
db_printable (lease -> client_hostname)) |
842 |
if ((strlen (lease -> client_hostname) <= 64) && |
| 834 |
s = lease -> client_hostname; |
843 |
db_printable (lease -> client_hostname)) |
| 835 |
else |
844 |
s = lease -> client_hostname; |
|
|
845 |
else |
| 846 |
s = "Hostname Unsuitable for Printing"; |
| 847 |
} else |
| 836 |
s = (char *)0; |
848 |
s = (char *)0; |
| 837 |
sprintf (msgbuf, "DHCPDECLINE of %s from %s %s%s%svia %s", |
849 |
sprintf (msgbuf, "DHCPDECLINE of %s from %s %s%s%svia %s", |
|
Lines 2748-2757
Link Here
|
| 2748 |
raw.hops = state -> hops; |
2760 |
raw.hops = state -> hops; |
| 2749 |
raw.op = BOOTREPLY; |
2761 |
raw.op = BOOTREPLY; |
| 2750 |
if (lease -> client_hostname && |
2762 |
if (lease -> client_hostname) { |
| 2751 |
db_printable (lease -> client_hostname)) |
2763 |
if ((strlen (lease -> client_hostname) <= 64) && |
| 2752 |
s = lease -> client_hostname; |
2764 |
db_printable (lease -> client_hostname)) |
| 2753 |
else |
2765 |
s = lease -> client_hostname; |
|
|
2766 |
else |
| 2767 |
s = "Hostname Unsuitable for Printing"; |
| 2768 |
} else |
| 2754 |
s = (char *)0; |
2769 |
s = (char *)0; |
| 2755 |
/* Say what we're doing... */ |
2770 |
/* Say what we're doing... */ |
| 2756 |
-- END INTERIM PATCH --- |
|
|