added some debug
notice in this example that ``ucontact[0x7f7b315f1d08]`` is never freed
REGISTER
```
Feb 16 17:04:43 sp1 proxy[9687]: NOTICE: <script>: New request on proxy - M=REGISTER
R=sip:192.168.1.71 F=sip:43993005@192.168.1.71 T=sip:43993005@192.168.1.71
IP=192.168.1.42:53152
(127.0.0.1:5060) ID=8e40daa391b6e4d82b296c77eb0c6986(a)0.0.0.0
UA='Jitsi2.9.5521Linux'
Feb 16 17:04:43 sp1 proxy[9687]: DEBUG: usrloc [udomain.c:174]: get_static_urecord():
urecord static[0x7f7b41740200]
Feb 16 17:04:43 sp1 proxy[9687]: DEBUG: usrloc [ucontact.c:142]: new_ucontact(): new
ucontact[0x7f7b315f1d08]
Feb 16 17:04:43 sp1 proxy[9687]: DEBUG: usrloc [udomain.c:1155]: get_urecord(): DB_ONLY
urecord[0x7f7b41740200]
Feb 16 17:04:43 sp1 proxy[9687]: DEBUG: registrar [path.c:108]: build_path_vector():
received is <sip:192.168.1.42:53152>
Feb 16 17:04:43 sp1 proxy[9687]: DEBUG: registrar [path.c:116]: build_path_vector(): path
is
<<sip:lb@127.0.0.1;lr;received=sip:192.168.1.42:53152;socket=sip:192.168.1.71:5060>>
Feb 16 17:04:43 sp1 proxy[9687]: DEBUG: registrar [save.c:410]: pack_ci(): generated ruid
is: uloc-58a5cd82-25d7-1
Feb 16 17:04:43 sp1 proxy[9687]: DEBUG: registrar [save.c:591]: test_max_contacts(): 1
valid contacts
Feb 16 17:04:43 sp1 proxy[9687]: DEBUG: registrar [save.c:613]: test_max_contacts(): 2
contacts after commit
Feb 16 17:04:43 sp1 proxy[9687]: DEBUG: registrar [save.c:410]: pack_ci(): generated ruid
is: uloc-58a5cd82-25d7-2
Feb 16 17:04:43 sp1 proxy[9687]: DEBUG: usrloc [ucontact.c:142]: new_ucontact(): new
ucontact[0x7f7b315f2100]
Feb 16 17:04:43 sp1 proxy[9687]: DEBUG: usrloc [ul_callback.h:84]: run_ul_callbacks():
contact=0x7f7b315f2100, callback type 1/1, id 0 entered
Feb 16 17:04:43 sp1 proxy[9687]: DEBUG: pua_reginfo [usrloc_cb.c:245]:
reginfo_usrloc_cb(): AOR: 43993005(a)192.168.1.71 (location)
Feb 16 17:04:43 sp1 proxy[9687]: DEBUG: pua_reginfo [usrloc_cb.c:246]:
reginfo_usrloc_cb(): type= UL_CONTACT_INSERT
Feb 16 17:04:43 sp1 proxy[9687]: DEBUG: usrloc [udomain.c:174]: get_static_urecord():
urecord static[0x7f7b41740200]
Feb 16 17:04:43 sp1 proxy[9687]: DEBUG: usrloc [ucontact.c:142]: new_ucontact(): new
ucontact[0x7f7b315f24f8]
Feb 16 17:04:43 sp1 proxy[9687]: DEBUG: usrloc [ucontact.c:142]: new_ucontact(): new
ucontact[0x7f7b315f28f0]
Feb 16 17:04:43 sp1 proxy[9687]: DEBUG: usrloc [udomain.c:1155]: get_urecord(): DB_ONLY
urecord[0x7f7b41740200]
Feb 16 17:04:43 sp1 proxy[9687]: DEBUG: pua_reginfo [usrloc_cb.c:105]:
build_reginfo_full(): Updated Contact
sip:43993005@192.168.1.42:53152;transport=udp;registering_acc=192_168_1_
71[uloc-58a5cd82-25d7-2]
Feb 16 17:04:43 sp1 proxy[9687]: DEBUG: pua_reginfo [usrloc_cb.c:111]:
build_reginfo_full(): Contact
sip:43993005@192.168.1.42:30210;transport=udp;registering_acc=192_168_1_71[uloc-
58a5c7d4-497a-1]
Feb 16 17:04:43 sp1 proxy[9687]: DEBUG: pua_reginfo [usrloc_cb.c:111]:
build_reginfo_full(): Contact
sip:43993005@192.168.1.42:53152;transport=udp;registering_acc=192_168_1_71[uloc-
58a5cd82-25d7-2]
Feb 16 17:04:43 sp1 proxy[9687]: DEBUG: pua_reginfo [usrloc_cb.c:303]:
reginfo_usrloc_cb(): XML-Body:#012<?xml version="1.0"?>#012<reginfo
xmlns="urn:ietf:params:xml:ns:reginfo" ver
sion="0" state="full">#012 <registration
aor="sip:43993005@192.168.1.71" id="0x7f7b41740200"
state="active">#012 <contact id="0x7f7b315f24f8"
state="active" event="registered" e
xpires="206" callid="3643dd620caf238de37dca05e8bbfbcf(a)0.0.0.0"
cseq="6" received="sip:192.168.1.42:30210"
path="<sip:lb@127.0.0.1;lr;received=sip:192.168.1.42:30210;socket=sip:19
2.168.1.71:5060>" user_agent="Jitsi2.9.5521Linux">#012
<uri>sip:43993005@192.168.1.42:30210;transport=udp;registering_acc=192_168_1_71</uri>#012
</contact>#012 <contac
t id="0x7f7b315f28f0" state="active" event="created"
expires="565" callid="8e40daa391b6e4d82b296c77eb0c6986(a)0.0.0.0"
cseq="2" received="sip:192.168.1.42:53152"
path="<sip:lb@127.
0.0.1;lr;received=sip:192.168.1.42:53152;socket=sip:192.168.1.71:5060>"
user_agent="Jitsi2.9.5521Linux">#012
<uri>sip:43993005@192.168.1.42:53152;transport=udp;registering_a
cc=192_168_1_71</uri>#012 </contact>#012
</registration>#012</reginfo>#012
Feb 16 17:04:43 sp1 proxy[9687]: DEBUG: pua_reginfo [usrloc_cb.c:305]:
reginfo_usrloc_cb(): Contact
sip:43993005@192.168.1.42:53152;transport=udp;registering_acc=192_168_1_71, 0x7f7
b315f2100
Feb 16 17:04:43 sp1 proxy[9687]: DEBUG: usrloc [urecord.c:553]: release_urecord(): free
urecord[0x7f7b41740200]
Feb 16 17:04:43 sp1 proxy[9687]: DEBUG: usrloc [ucontact.c:179]: free_ucontact(): free
ucontact[0x7f7b315f24f8]
Feb 16 17:04:43 sp1 proxy[9687]: DEBUG: usrloc [ucontact.c:179]: free_ucontact(): free
ucontact[0x7f7b315f28f0]
Feb 16 17:04:43 sp1 proxy[9687]: DEBUG: usrloc [urecord.c:553]: release_urecord(): free
urecord[0x7f7b41740200]
Feb 16 17:04:43 sp1 proxy[9687]: NOTICE: <script>: Contacts successfully saved,
expires in 600s - R=sip:192.168.1.71 ID=8e40daa391b6e4d82b296c77eb0c6986(a)0.0.0.0
UA='Jitsi2.9.5521Lin
ux'
```
UNREGISTER
```
Feb 16 17:13:15 sp1 proxy[9687]: NOTICE: <script>: New request on proxy - M=REGISTER
R=sip:192.168.1.71 F=sip:43993005@192.168.1.71 T=sip:43993005@192.168.1.71
IP=192.168.1.42:53152 (127.0.0.1:5060) ID=8e40daa391b6e4d82b296c77eb0c6986(a)0.0.0.0
UA='Jitsi2.9.5521Linux'
Feb 16 17:13:15 sp1 proxy[9687]: DEBUG: usrloc [udomain.c:174]: get_static_urecord():
urecord static[0x7f7b41740200]
Feb 16 17:13:15 sp1 proxy[9687]: DEBUG: usrloc [ucontact.c:142]: new_ucontact(): new
ucontact[0x7f7b315faa90]
Feb 16 17:13:15 sp1 proxy[9687]: DEBUG: usrloc [udomain.c:1155]: get_urecord(): DB_ONLY
urecord[0x7f7b41740200]
Feb 16 17:13:15 sp1 proxy[9687]: DEBUG: registrar [path.c:108]: build_path_vector():
received is <sip:192.168.1.42:53152>
Feb 16 17:13:15 sp1 proxy[9687]: DEBUG: registrar [path.c:116]: build_path_vector(): path
is
<<sip:lb@127.0.0.1;lr;received=sip:192.168.1.42:53152;socket=sip:192.168.1.71:5060>>
Feb 16 17:13:15 sp1 proxy[9687]: DEBUG: registrar [save.c:410]: pack_ci(): generated ruid
is: uloc-58a5cd82-25d7-3
Feb 16 17:13:15 sp1 proxy[9687]: DEBUG: registrar [save.c:591]: test_max_contacts(): 1
valid contacts
Feb 16 17:13:15 sp1 proxy[9687]: DEBUG: registrar [save.c:613]: test_max_contacts(): 0
contacts after commit
Feb 16 17:13:15 sp1 proxy[9687]: DEBUG: registrar [save.c:410]: pack_ci(): generated ruid
is: uloc-58a5cd82-25d7-4
Feb 16 17:13:15 sp1 proxy[9687]: DEBUG: usrloc [ul_callback.h:84]: run_ul_callbacks():
contact=0x7f7b315faa90, callback type 4/4, id 3 entered
Feb 16 17:13:15 sp1 proxy[9687]: DEBUG: pua_reginfo [usrloc_cb.c:245]:
reginfo_usrloc_cb(): AOR: 43993005(a)192.168.1.71 (location)
Feb 16 17:13:15 sp1 proxy[9687]: DEBUG: pua_reginfo [usrloc_cb.c:249]:
reginfo_usrloc_cb(): type= UL_CONTACT_DELETE
Feb 16 17:13:15 sp1 proxy[9687]: DEBUG: usrloc [udomain.c:174]: get_static_urecord():
urecord static[0x7f7b41740200]
Feb 16 17:13:15 sp1 proxy[9687]: DEBUG: usrloc [ucontact.c:142]: new_ucontact(): new
ucontact[0x7f7b315fae28]
Feb 16 17:13:15 sp1 proxy[9687]: DEBUG: usrloc [udomain.c:1155]: get_urecord(): DB_ONLY
urecord[0x7f7b41740200]
Feb 16 17:13:15 sp1 proxy[9687]: DEBUG: pua_reginfo [usrloc_cb.c:105]:
build_reginfo_full(): Updated Contact
sip:43993005@192.168.1.42:53152;transport=udp;registering_acc=192_168_1_71[uloc-58a5cd82-25d7-2]
Feb 16 17:13:15 sp1 proxy[9687]: DEBUG: pua_reginfo [usrloc_cb.c:111]:
build_reginfo_full(): Contact
sip:43993005@192.168.1.42:53152;transport=udp;registering_acc=192_168_1_71[uloc-58a5cd82-25d7-2]
Feb 16 17:13:15 sp1 proxy[9687]: DEBUG: pua_reginfo [usrloc_cb.c:303]:
reginfo_usrloc_cb(): XML-Body:#012<?xml version="1.0"?>#012<reginfo
xmlns="urn:ietf:params:xml:ns:reginfo" version="0"
state="full">#012 <registration aor="sip:43993005@192.168.1.71"
id="0x7f7b41740200" state="terminated">#012 <contact
id="0x7f7b315fae28" state="terminated" event="unregistered"
expires="53" callid="8e40daa391b6e4d82b296c77eb0c6986(a)0.0.0.0"
cseq="2" received="sip:192.168.1.42:53152"
path="<sip:lb@127.0.0.1;lr;received=sip:192.168.1.42:53152;socket=sip:192.168.1.71:5060>"
user_agent="Jitsi2.9.5521Linux">#012
<uri>sip:43993005@192.168.1.42:53152;transport=udp;registering_acc=192_168_1_71</uri>#012
</contact>#012 </registration>#012</reginfo>#012
Feb 16 17:13:15 sp1 proxy[9687]: DEBUG: pua_reginfo [usrloc_cb.c:305]:
reginfo_usrloc_cb(): Contact
sip:43993005@192.168.1.42:53152;transport=udp;registering_acc=192_168_1_71,
0x7f7b315faa90
Feb 16 17:13:15 sp1 proxy[9687]: DEBUG: usrloc [urecord.c:553]: release_urecord(): free
urecord[0x7f7b41740200]
Feb 16 17:13:15 sp1 proxy[9687]: DEBUG: usrloc [ucontact.c:179]: free_ucontact(): free
ucontact[0x7f7b315fae28]
Feb 16 17:13:15 sp1 proxy[9687]: DEBUG: usrloc [ucontact.c:1788]:
uldb_delete_attrs_ruid(): trying to delete location attributes
Feb 16 17:13:15 sp1 proxy[9687]: DEBUG: usrloc [ucontact.c:179]: free_ucontact(): free
ucontact[0x7f7b315faa90]
Feb 16 17:13:15 sp1 proxy[9687]: DEBUG: usrloc [urecord.c:553]: release_urecord(): free
urecord[0x7f7b41740200]
Feb 16 17:13:15 sp1 proxy[9687]: NOTICE: <script>: Contacts successfully deleted -
R=sip:192.168.1.71 ID=8e40daa391b6e4d82b296c77eb0c6986(a)0.0.0.0
UA='Jitsi2.9.5521Linux'
```
--
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/997#issuecomment-280377848