Index: pjproject/trunk/pjsip/include/pjsua2/call.hpp
===================================================================
--- pjproject/trunk/pjsip/include/pjsua2/call.hpp	(revision 4917)
+++ pjproject/trunk/pjsip/include/pjsua2/call.hpp	(revision 4918)
@@ -102,8 +102,7 @@
     MathStat        lossPeriodUsec; /**< Loss period statistics 	    */
 
-    struct {
-        unsigned    burst;	/**< Burst/sequential packet lost detected  */
-        unsigned    random;	/**< Random packet lost detected.	    */
-    } lossType;                 /**< Types of loss detected.                */
+                                /**< Types of loss detected.                */
+    unsigned        burst;	/**< Burst/sequential packet lost detected  */
+    unsigned        random;	/**< Random packet lost detected.	    */
     
     MathStat        jitterUsec;	/**< Jitter statistics                      */
@@ -238,4 +237,21 @@
 
 /**
+ * Media event data.
+ */
+typedef union MediaEventData {
+    /**
+     * Media format changed event data.
+     */
+    MediaFmtChangedEvent    fmtChanged;
+    
+    /**
+     * Pointer to storage to user event data, if it's outside
+     * this struct
+     */
+    GenericData		ptr;
+
+} MediaEventData;
+
+/**
  * This structure describes a media event. It corresponds to the
  * pjmedia_event structure.
@@ -252,16 +268,5 @@
      * will be specific to the event type being reported.
      */
-    union {
-	/**
-         * Media format changed event data.
-         */
-	MediaFmtChangedEvent    fmtChanged;
-        
-	/**
-         * Pointer to storage to user event data, if it's outside
-	 * this struct
-	 */
-	GenericData		ptr;
-    } data;
+    MediaEventData              data;
     
     /**
Index: pjproject/trunk/pjsip/include/pjsua2/siptypes.hpp
===================================================================
--- pjproject/trunk/pjsip/include/pjsua2/siptypes.hpp	(revision 4917)
+++ pjproject/trunk/pjsip/include/pjsua2/siptypes.hpp	(revision 4918)
@@ -525,16 +525,21 @@
 
 /**
+ * This structure describes transaction state event source.
+ */
+struct TsxStateEventSrc
+{
+    SipRxData       rdata;          /**< The incoming message.      */
+    SipTxData       tdata;          /**< The outgoing message.      */
+    TimerEntry      timer;          /**< The timer.                 */
+    pj_status_t     status;         /**< Transport error status.    */
+    GenericData     data;           /**< Generic data.              */
+};
+
+/**
  * This structure describes transaction state changed event.
  */
 struct TsxStateEvent
 {
-    struct
-    {
-        SipRxData       rdata;          /**< The incoming message.      */
-        SipTxData       tdata;          /**< The outgoing message.      */
-        TimerEntry      timer;          /**< The timer.                 */
-        pj_status_t     status;         /**< Transport error status.    */
-        GenericData     data;           /**< Generic data.              */
-    } src;                              /**< Event source.              */
+    TsxStateEventSrc    src;            /**< Event source.              */
     SipTransaction      tsx;            /**< The transaction.           */
     pjsip_tsx_state_e   prevState;      /**< Previous state.            */
@@ -585,4 +590,41 @@
 
 /**
+ * The event body.
+ */
+struct SipEventBody
+{
+    /**
+     * Timer event.
+     */
+    TimerEvent      timer;
+    
+    /**
+     * Transaction state has changed event.
+     */
+    TsxStateEvent   tsxState;
+    
+    /**
+     * Message transmission event.
+     */
+    TxMsgEvent      txMsg;
+    
+    /**
+     * Transmission error event.
+     */
+    TxErrorEvent    txError;
+    
+    /**
+     * Message arrival event.
+     */
+    RxMsgEvent      rxMsg;
+    
+    /**
+     * User event.
+     */
+    UserEvent       user;
+    
+};
+
+/**
  * This structure describe event descriptor to fully identify a SIP event. It
  * corresponds to the pjsip_event structure in PJSIP library.
@@ -598,37 +640,5 @@
      * The event body, which fields depends on the event type.
      */
-    struct
-    {
-        /**
-         * Timer event.
-         */
-        TimerEvent      timer;
-        
-        /**
-         * Transaction state has changed event.
-         */
-        TsxStateEvent   tsxState;
-        
-        /**
-         * Message transmission event.
-         */
-        TxMsgEvent      txMsg;
-        
-        /**
-         * Transmission error event.
-         */
-        TxErrorEvent    txError;
-        
-        /**
-         * Message arrival event.
-         */
-        RxMsgEvent      rxMsg;
-        
-        /**
-         * User event.
-         */
-        UserEvent       user;
-        
-    } body;
+    SipEventBody        body;
     
     /**
Index: pjproject/trunk/pjsip/src/pjsua2/call.cpp
===================================================================
--- pjproject/trunk/pjsip/src/pjsua2/call.cpp	(revision 4917)
+++ pjproject/trunk/pjsip/src/pjsua2/call.cpp	(revision 4918)
@@ -57,6 +57,6 @@
     this->dup             = prm.dup;
     this->lossPeriodUsec.fromPj(prm.loss_period);
-    this->lossType.burst  = prm.loss_type.burst;
-    this->lossType.random = prm.loss_type.random;
+    this->burst           = prm.loss_type.burst;
+    this->random          = prm.loss_type.random;
     this->jitterUsec.fromPj(prm.jitter);
 }
