I asked Miklos (initial author of that code) and he clarified quickly: the reason for -1 is to get rid of the byte of the field unsigned char vars[1] from the struct _cfg_block.

He spotted that sizeof(cfg_block_t) is 8 on your system, while it should be 9:

 /*! \brief single memoy block that contains all the cfg values */
typedef struct _cfg_block {
	atomic_t	refcnt;		/*!< reference counter,
					the block is automatically deleted
					when it reaches 0 */
	int		_pad;		/*!< force 8 byte alignment */
	unsigned char	vars[1];	/*!< blob that contains the values */
} cfg_block_t;

What version of kamailio are you using? Compiled by yourself or from packages built by the project? Also, what is the operating system and kernel (uname -a) versions?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.