Changeset 1559:2dbc816d48f4 in freeDiameter
- Timestamp:
- Oct 27, 2020, 6:50:04 PM (3 years ago)
- Branch:
- default
- Phase:
- public
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
libfdcore/p_ce.c
r1554 r1559 337 337 } 338 338 339 /* Origin-Realm is empty */ 340 if (hdr->avp_value->os.len == 0) { 341 error->pei_errcode = "DIAMETER_INVALID_AVP_VALUE"; 342 error->pei_message = "Your Origin-Realm is empty."; 343 error->pei_avp = avp; 344 return EINVAL; 345 } 346 339 347 /* Save the value */ 340 348 CHECK_MALLOC( peer->p_hdr.info.runtime.pir_realm = os0dup( hdr->avp_value->os.data, hdr->avp_value->os.len ) ); -
libfdproto/messages.c
r1554 r1559 1777 1777 if (avp->avp_model == NULL) { 1778 1778 /* In the case where we don't know the type of AVP, just copy the raw data or source */ 1779 CHECK_PARAMS( avp->avp_source || avp->avp_rawdata );1779 /* there might be no data if the AVP is empty */ 1780 1780 1781 1781 if ( avp->avp_rawdata != NULL ) { … … 1783 1783 memcpy(&buffer[*offset], avp->avp_rawdata, avp->avp_rawlen); 1784 1784 *offset += PAD4(avp->avp_rawlen); 1785 } else {1785 } else if ( avp->avp_source != NULL ) { 1786 1786 /* the message was not parsed completely */ 1787 1787 size_t datalen = avp->avp_public.avp_len - GETAVPHDRSZ(avp->avp_public.avp_flags);
Note: See TracChangeset
for help on using the changeset viewer.