static pj_status_t file_list_on_destroy(pjmedia_port *this_port)
{
    struct playlist_port *fport = (struct playlist_port*) this_port;
    int index;

    pj_assert(this_port->info.signature == SIGNATURE);

    if (fport->subscribed) {
    	pjmedia_event_unsubscribe(NULL, &file_on_event, fport, fport);
    	fport->subscribed = PJ_FALSE;
    }

    for (index=0; index<fport->max_file; index++)
	pj_file_close(fport->fd_list[index]);

    return PJ_SUCCESS;
}
static pj_status_t file_list_on_destroy(pjmedia_port *this_port)
{
    struct playlist_port *fport = (struct playlist_port*) this_port;
    int index;

    pj_assert(this_port->info.signature == SIGNATURE);

    if (fport->subscribed) {
    	pjmedia_event_unsubscribe(NULL, &file_on_event, fport, fport);
    	fport->subscribed = PJ_FALSE;
    }

    for (index=0; index<fport->max_file; index++)
	pj_file_close(fport->fd_list[index]);

    return PJ_SUCCESS;
}