The vs_set_data function sets the value of a pointer to data for a given virtual server and slot. The *slot must be -1 or a slot number returned from vs_alloc_slot. If *slot is -1, vs_set_data calls vs_alloc_slot implicitly and returns the new slot number in *slot.
The stored pointer is maintained on a per-VirtualServer* basis, not a per-ID basis. Distinct VirtualServer*s from different configurations might exist simultaneously with the same virtual server IDs. However, because these configurations are distinct VirtualServer*s, each configuration has its own VirtualServer*-specific data. As a result, vs_set_data should generally not be called outside of VSInitFunc processing. See vs_register_cb() Function for an explanation of VSInitFunc processing.
void* vs_set_data(const VirtualServer* vs, int* slot, void* data);
Data on success, or NULL on failure.
const VirtualServer* vs represents the virtual server to set the pointer for.
int* slot is the slot number at which to store the pointer.
void* data is the pointer to store.
vs_get_data() Function, vs_alloc_slot() Function, vs_register_cb() Function