|
@@ -342,7 +342,9 @@ int build_contact(sip_msg_t *msg, ucontact_t* c, str *host)
|
|
|
memset(&xval, 0, sizeof(sr_xval_t));
|
|
|
xval.type = SR_XTYPE_STR;
|
|
|
xval.v.s = c->ruid;
|
|
|
- xavp_add_value(&xname, &xval, &xavp);
|
|
|
+ if(xavp_add_value(&xname, &xval, &xavp)==NULL) {
|
|
|
+ LM_ERR("cannot add ruid value to xavp\n");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -352,12 +354,15 @@ int build_contact(sip_msg_t *msg, ucontact_t* c, str *host)
|
|
|
/* add xavp with details of the record (ruid, ...) */
|
|
|
if(reg_xavp_rcd.s!=NULL)
|
|
|
{
|
|
|
- if(list==NULL)
|
|
|
+ if(list==NULL && xavp!=NULL)
|
|
|
{
|
|
|
/* no reg_xavp_rcd xavp in root list - add it */
|
|
|
xval.type = SR_XTYPE_XAVP;
|
|
|
xval.v.xavp = xavp;
|
|
|
- xavp_add_value(®_xavp_rcd, &xval, NULL);
|
|
|
+ if(xavp_add_value(®_xavp_rcd, &xval, NULL)==NULL) {
|
|
|
+ LM_ERR("cannot add ruid xavp to root list\n");
|
|
|
+ xavp_destroy_list(&xavp);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|