Changeset 1423:67c263056d78 in freeDiameter for libfdproto
- Timestamp:
- Feb 19, 2020, 8:20:20 AM (4 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libfdproto/messages.c
r1405 r1423 597 597 } 598 598 599 /* Search a given AVP model in a message */600 int fd_msg_search_avp ( struct msg * msg, struct dict_object * what, struct avp ** avp )599 /* Search a given AVP model in a message or AVP */ 600 int fd_msg_search_avp ( msg_or_avp * reference, struct dict_object * what, struct avp ** avp ) 601 601 { 602 602 struct avp * nextavp; … … 604 604 enum dict_object_type dicttype; 605 605 606 TRACE_ENTRY("%p %p %p", msg, what, avp);607 608 CHECK_PARAMS( CHECK_MSG(msg) && what );606 TRACE_ENTRY("%p %p %p", reference, what, avp); 607 608 CHECK_PARAMS( VALIDATE_OBJ(reference) && what ); 609 609 610 610 CHECK_PARAMS( (fd_dict_gettype(what, &dicttype) == 0) && (dicttype == DICT_AVP) ); 611 611 CHECK_FCT( fd_dict_getval(what, &dictdata) ); 612 612 613 /* Loop on all top AVPs */614 CHECK_FCT( fd_msg_browse( msg, MSG_BRW_FIRST_CHILD, (void *)&nextavp, NULL) );613 /* Loop on all top AVPs in message or AVP */ 614 CHECK_FCT( fd_msg_browse(reference, MSG_BRW_FIRST_CHILD, (void *)&nextavp, NULL) ); 615 615 while (nextavp) { 616 616 … … 619 619 break; 620 620 621 /* Otherwise move to next AVP in the message */621 /* Otherwise move to next AVP in the message or AVP */ 622 622 CHECK_FCT( fd_msg_browse(nextavp, MSG_BRW_NEXT, (void *)&nextavp, NULL) ); 623 623 }
Note: See TracChangeset
for help on using the changeset viewer.