Navigation


Changeset 915:9bd18fa4e601 in freeDiameter


Ignore:
Timestamp:
Feb 2, 2013, 10:43:09 PM (11 years ago)
Author:
Sebastien Decugis <sdecugis@freediameter.net>
Branch:
default
Phase:
public
Message:

Fix macro to avoid infinite loop in some situations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libfdproto/messages.c

    r903 r915  
    106106#define _A(_x) ((struct avp *)(_x))
    107107/* Check the type and eyecatcher */
    108 #define CHECK_AVP(_x) ((_C(_x)->type == MSG_AVP) && (_A(_x)->avp_eyec == MSG_AVP_EYEC))
     108#define CHECK_AVP(_x) ((_x) && (_C(_x)->type == MSG_AVP) && (_A(_x)->avp_eyec == MSG_AVP_EYEC))
    109109
    110110/* The following structure represents an instance of a message (command and children AVPs). */
Note: See TracChangeset for help on using the changeset viewer.