vlc_mutex_lock(p_iter->p_messages->p_lock);
msg = p_iter->p_messages->p_msg+i_pos;
buffer->i_severity = msg->i_type;
- buffer->psz_type = msg->psz_object_type;
+ buffer->psz_type = msg->psz_object;
buffer->psz_name = msg->psz_module;
buffer->psz_header = msg->psz_header;
buffer->psz_message = msg->psz_msg;
static void FlushMsg ( msg_queue_t * );
static void PrintMsg ( vlc_object_t *, msg_item_t * );
+static inline char * object_description( vlc_object_t * p_this )
+{
+ if( p_this->i_object_type == VLC_OBJECT_GENERIC
+ && p_this->psz_object_name )
+ return strdup( p_this->psz_object_name );
+ return strdup( p_this->psz_object_type );
+}
+
/**
* Initialize messages queues
* This function initializes all message queues
p_item->i_type = VLC_MSG_WARN;
p_item->i_object_id = p_this->i_object_id;
- p_item->psz_object_type = p_this->psz_object_type;
+ p_item->psz_object = object_description( p_this );
p_item->psz_module = strdup( "message" );
p_item->psz_msg = strdup( "message queue overflowed" );
p_item->psz_header = NULL;
/* Fill message information fields */
p_item->i_type = i_type;
p_item->i_object_id = p_this->i_object_id;
- p_item->psz_object_type = p_this->psz_object_type;
+ p_item->psz_object = object_description( p_this );
p_item->psz_module = strdup( psz_module );
p_item->psz_msg = psz_str;
p_item->psz_header = psz_header;
free( p_item->psz_module );
free( p_item->psz_msg );
free( p_item->psz_header );
+ free( p_item->psz_object );
}
vlc_mutex_unlock ( &p_queue->lock );
free( p_queue->msg[i_index].psz_msg );
free( p_queue->msg[i_index].psz_module );
free( p_queue->msg[i_index].psz_header );
+ free( p_queue->msg[i_index].psz_object );
}
/* Update the new start value */
break;
}
- psz_object = p_item->psz_object_type;
+ psz_object = p_item->psz_object;
#ifdef UNDER_CE
# define CE_WRITE(str) WriteFile( QUEUE.logfile, \