[sr-dev] git:4.2: pua_reginfo: avoid sending notify when processing location record action triggered by itself

lejarreta.e at sarenet.es lejarreta.e at sarenet.es
Mon Nov 17 16:32:24 CET 2014


Good evening.

Sorry for the delay. It has been hard to me to find what was happening.

Found 2 errors on this patch.

1.- On notify.c on "process_contact" function we've forgotten one 
"return".
2.- On notify.c on "process_body" there is an "uri" string unassigned 
and we think "if clause" based on "reginfo_use_domain" var is not 
necessary.


diff master_branch_corrected.c master_branch.c
137,140c137
<               if (VALID_CONTACT(ul_contact, time(0))){
<                       ret = RESULT_CONTACTS_FOUND;
<                         goto done;
<               }
---
>               if (VALID_CONTACT(ul_contact, time(0))) return 
> RESULT_CONTACTS_FOUND;
222a220
>       char uri[MAX_URI_SIZE];
276,277c274,278
<               aor_key.s = parsed_aor.user.s;
<
---
>               if (reginfo_use_domain) {
>                       aor_key.s = uri;
>               } else {
>                       aor_key.s = parsed_aor.user.s;
>               }


We could also simplify this code leaving prior "process_contact" 
function as it was before and round it with "pua_reginfo_update_self_op" 
function as:

...
                                         /* Add to Usrloc: */
                                         pua_reginfo_update_self_op(1);
                                         result = process_contact(domain, 
&ul_record, aor_key, callid, cseq, expires, event, contact_uri);
                                         pua_reginfo_update_self_op(0);
...


I'll send you our changes to "path", "received", "ua" and son on 
"Contact" header params when we finish to test them.

Thanks and best regards.

Eduardo Lejarreta.



More information about the sr-dev mailing list