mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-14 16:15:04 +00:00
Merge branch 'master' of git.freeswitch.org:freeswitch
This commit is contained in:
commit
648eb58fc1
@ -35,8 +35,8 @@
|
|||||||
|
|
||||||
#include "private/ftdm_core.h"
|
#include "private/ftdm_core.h"
|
||||||
#include "lpwrap_pri.h"
|
#include "lpwrap_pri.h"
|
||||||
#ifndef HAVE_GETTIMEOFDAY
|
|
||||||
|
|
||||||
|
#ifndef HAVE_GETTIMEOFDAY
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#include <mmsystem.h>
|
#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)
|
int lpwrap_one_loop(struct lpwrap_pri *spri)
|
||||||
{
|
{
|
||||||
fd_set rfds, efds;
|
fd_set rfds, efds;
|
||||||
struct timeval now = {0,0}, *next;
|
struct timeval now = {0,0}, *next = NULL;
|
||||||
pri_event *event;
|
pri_event *event = NULL;
|
||||||
event_handler handler;
|
event_handler handler;
|
||||||
int sel;
|
int sel;
|
||||||
|
|
||||||
|
@ -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_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;
|
switch_core_session_message_t *message;
|
||||||
|
|
||||||
while (switch_core_session_dequeue_message(session, &message) == SWITCH_STATUS_SUCCESS) {
|
switch_assert(session != NULL);
|
||||||
switch_core_session_free_message(&message);
|
|
||||||
|
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;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user