[sr-dev] [kamailio/kamailio] cfg_rpc updates changing variable values to large random numbers (#1583)
Daniel-Constantin Mierla
notifications at github.com
Thu Jul 5 14:37:43 CEST 2018
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 or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1583#issuecomment-402708004
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20180705/c95c4029/attachment.html>
More information about the sr-dev
mailing list