]> git.pond.sub.org Git - empserver/commit
Provide proper ca_table for carrier unit# selectors
authorMarkus Armbruster <armbru@pond.sub.org>
Mon, 25 Apr 2011 05:45:20 +0000 (07:45 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sat, 25 Jun 2011 14:44:04 +0000 (16:44 +0200)
commit221268e0e190108208a8d1ae41fb2bf6c341eca3
tree515e658936a3ec0df1bf1c71ac748e09cadb9e5c
parent54fa510425d14220a9987481a3d6f7a6fc0c166b
Provide proper ca_table for carrier unit# selectors

Makes ef_verify() check carrier UIDs are sane.  Partially protects
unit_cargo_init(), which oopses on bad carriers.

This has become possible only since commit 64a53c90 (v4.3.17) set
their values to -1 in newly created units.  Before, they were zero in
units that had never been used, and a proper ca_table would have made
ef_verify() fail when unit#0 didn't exist.

The only unit# selectors left without a proper ca_table are ship's
follow, lost's id and trade's unitid.  Document why.
src/lib/common/nsc.c