Hi,
thanks a lot Andrei!
Nils, you can easily verify that the offsets work with setting the value of unix_tx_timeout over RPC and verifying it directly with gdb:
sercmd cfg.set_now_int tm unix_tx_timeout 600
(gdb) p ((struct cfg_group_tm *)tm_cfg)->tm_unix_tx_timeout $3 = 600
(I have attached to the ctl process because it refreshes its configuration after the sercmd command. Otherwise you need to send a SIP message to let the listeners update their config pointers.)
Thanks, Miklos
On 05/22/2009 01:15 PM, Andrei Pelinescu-Onciul wrote:
On May 21, 2009 at 18:20, Miklos Tirpak miklos@iptel.org wrote:
Hi,
this is strange because the cfg framework says that the offset between cfg_group_tm.tm_auto_inv_100_r and cfg_group_tm.tm_unix_tx_timeout is 4, but I think sizeof(char *) should be 8 on 64bits, so the offset should be at least 8. (cfg.c:81)
Yes, it should be 8.
Andrei, do you have any hint?
I've looked at it on a 64 bits system and I found a problem: the sanity check compares the computed size directly with sizeof(struct). However the structure will be padded if its size is not a multiple of the size of the type of its member requiring the highest alignment. In our case the extra char* member on 64 bits caused a 4 bytes padding and the sanity check failed. I've already commited the fix to the repository.
Nils gbd output looks very strange, but hopefully we won't need to investigate further.
Andrei
[...]