Browse code

registrar - add user xavp on successful registered call

Luis Azedo authored on 17/02/2015 17:42:17
Showing 1 changed files
... ...
@@ -674,6 +674,13 @@ int registered(struct sip_msg* _m, udomain_t* _d, str* _uri)
674 674
 				continue;
675 675
 			ul.release_urecord(r);
676 676
 			ul.unlock_udomain(_d, &aor);
677
+			if(ptr->xavp!=NULL) {
678
+				xavp = xavp_clone_level_nodata(ptr->xavp);
679
+				if(xavp_add(xavp, NULL)<0) {
680
+					LM_ERR("error adding xavp for %.*s after successful match\n", aor.len, ZSW(aor.s));
681
+					return -1;
682
+				}
683
+			}
677 684
 			LM_DBG("'%.*s' found in usrloc\n", aor.len, ZSW(aor.s));
678 685
 			return 1;
679 686
 		}