<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I'm trying to debug an issue I've encountered where a variable that I've set using kamcmd cfg.set has an unexpected value when used in kamailio.  The variable should be 0 or 1, but it looks like its getting set accidently somehow.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Helvetica}
span.s1 {font-kerning: none}
</style>
<p class="p1"><span class="s1"><span style="font-size: 12pt;">2018-05-11T22:02:58.344260+00:00 ip-172-31-129-45
</span><span style="font-size: 12pt;">kamailio[5253]: DEBUG: <core> [select.c:263]: resolve_select(): 'with_dynamodb_user_data'</span></span></p>
<p class="p1"><span class="s1"><span style="font-size: 12pt;">2018-05-11T22:02:58.344264+00:00 ip-172-31-129-45
</span><span style="font-size: 12pt;">kamailio[5253]: DEBUG: <core> [cfg/cfg_select.c:174]: select_cfg_var(): DEBUG: select_cfg_var(): select fixup is postponed: features.with_dynamodb_user_data</span></span></p>
<p class="p1"><span class="s1"><span style="font-size: 12pt;">2018-05-11T22:05:03.467110+00:00 ip-172-31-129-45
</span><span style="font-size: 12pt;">kamailio[5551]: INFO: <core> [cfg/cfg_ctx.c:608]: cfg_set_now(): INFO: cfg_set_now(): features.with_dynamodb_user_data has been changed to 1</span></span></p>
<p class="p1"><span class="s1"><span style="font-size: 12pt;">2018-05-11T22:15:51.695118+00:00 ip-172-31-129-45
</span><span style="font-size: 12pt;">kamailio[5574]: [2c03c333-1705-41b1-aa26-6f10492a5a6f] DEBUG: with_dynamodb_user_data is 1157627905</span></span></p>
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I've tried to debug using gdb using breaks and set a watch on the memory address of the var, but it looks like it keeps using different memory locations.  The value in the address pointed at by group.handle seems to change for each invocation of set_cfg_now,
 so when I try and put a watch on the address of *group.handle + var.offset it never gets hit.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<div>(gdb) print *group</div>
<div>$36 = {num = 25, mapping = 0x7f56ee4474f0, vars = 0x0, add_var = 0x0, size = 164, meta_offset = 968, var_offset = 984, handle = 0x7f56edf92fd0, orig_handle = 0x0,</div>
<div>  dynamic = 1 '\001', next = 0x0, name_len = 8, name = "f"}</div>
<div><br>
</div>
<div>
<div>(gdb) print *var</div>
<div>$62 = {def = 0x7f56ee471668, name_len = 23, pos = 24, offset = 164, flag = 0}</div>
<br>
</div>
<div>Any ideas?</div>
<div><br>
</div>
<div>Malcolm</div>
<br>
</div>
</body>
</html>