Merge branch 'master' of git.freeswitch.org:freeswitch

This commit is contained in:
David Yat Sin 2010-11-08 16:13:25 -05:00
commit 648eb58fc1
2 changed files with 12 additions and 5 deletions

View File

@ -35,8 +35,8 @@
#include "private/ftdm_core.h"
#include "lpwrap_pri.h"
#ifndef HAVE_GETTIMEOFDAY
#ifndef HAVE_GETTIMEOFDAY
#ifdef WIN32
#include <mmsystem.h>
@ -239,8 +239,8 @@ int lpwrap_init_bri(struct lpwrap_pri *spri, ftdm_span_t *span, ftdm_channel_t *
int lpwrap_one_loop(struct lpwrap_pri *spri)
{
fd_set rfds, efds;
struct timeval now = {0,0}, *next;
pri_event *event;
struct timeval now = {0,0}, *next = NULL;
pri_event *event = NULL;
event_handler handler;
int sel;

View File

@ -790,10 +790,17 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_dequeue_message(switch_core_
SWITCH_DECLARE(switch_status_t) switch_core_session_flush_message(switch_core_session_t *session)
{
switch_status_t status = SWITCH_STATUS_FALSE;
void *pop;
switch_core_session_message_t *message;
while (switch_core_session_dequeue_message(session, &message) == SWITCH_STATUS_SUCCESS) {
switch_core_session_free_message(&message);
switch_assert(session != NULL);
if (session->message_queue) {
while ((status = (switch_status_t) switch_queue_trypop(session->message_queue, &pop)) == SWITCH_STATUS_SUCCESS) {
message = (switch_core_session_message_t *) pop;
switch_core_session_free_message(&message);
}
}
return SWITCH_STATUS_SUCCESS;