Destroy all local (static) message formats
| 1972 | |
| 1973 | // Destroy all local (static) message formats |
| 1974 | void DestroyMsgFormats() |
| 1975 | { |
| 1976 | for (int i = 0; i < NMTN; i++) |
| 1977 | { |
| 1978 | if (GMsgFormats[i]) |
| 1979 | { |
| 1980 | GMsgFormats[i]->Clear(); |
| 1981 | } |
| 1982 | } |
| 1983 | // Reset the init guard so the next InitMsgFormats() repopulates the items. Without |
| 1984 | // this, a teardown (e.g. an in-process re-mount) that follows a prior network init |
| 1985 | // (e.g. a server-browser enumeration) leaves the formats cleared but curMsgFormat at |
| 1986 | // NMTN, so InitMsgFormats() early-returns and every message decodes to zero values. |
| 1987 | curMsgFormat = 0; |
| 1988 | } |