xebd / accel-ppp

High performance PPTP/L2TP/PPPoE/IPoE server for Linux
GNU General Public License v2.0
296 stars 108 forks source link

Ensure const correctness when reading the configuration #143

Open laarmen opened 4 years ago

laarmen commented 4 years ago

As they say, "shared mutable state is the root of all evil". This patch series clearly marks the triton code as the owner of the configuration objects, making their content internal. Most of the changes are simply changing the client code to use the proper type, with the exception of pppd_compat.

There, the changes are a bit more involved, as the const char * pointers end up being fed to an API that takes in char * arguments for historical reasons. Detailed explanations can be found in the commit logs.