freetdm: Removed unnecessary parameter copy
Added ftdm_raw_data_t
This commit is contained in:
parent
f8e1fa666d
commit
b2b50a1030
|
@ -4049,7 +4049,7 @@ done:
|
|||
return status;
|
||||
}
|
||||
|
||||
FT_DECLARE(ftdm_iterator_t) *get_iterator(ftdm_iterator_type_t type, ftdm_iterator_t *iter)
|
||||
FT_DECLARE(ftdm_iterator_t) *ftdm_get_iterator(ftdm_iterator_type_t type, ftdm_iterator_t *iter)
|
||||
{
|
||||
int allocated = 0;
|
||||
if (iter) {
|
||||
|
@ -4075,7 +4075,7 @@ FT_DECLARE(ftdm_iterator_t) *get_iterator(ftdm_iterator_type_t type, ftdm_iterat
|
|||
|
||||
FT_DECLARE(ftdm_iterator_t *) ftdm_span_get_chan_iterator(const ftdm_span_t *span, ftdm_iterator_t *iter)
|
||||
{
|
||||
if (!(iter = get_iterator(FTDM_ITERATOR_CHANS, iter))) {
|
||||
if (!(iter = ftdm_get_iterator(FTDM_ITERATOR_CHANS, iter))) {
|
||||
return NULL;
|
||||
}
|
||||
iter->pvt.chaniter.index = 1;
|
||||
|
@ -6100,9 +6100,6 @@ FT_DECLARE(ftdm_status_t) ftdm_channel_save_usrmsg(ftdm_channel_t *ftdmchan, ftd
|
|||
memcpy(ftdmchan->usrmsg, usrmsg, sizeof(ftdm_usrmsg_t));
|
||||
|
||||
if (usrmsg->raw.data) {
|
||||
ftdmchan->usrmsg->raw.data = usrmsg->raw.data;
|
||||
ftdmchan->usrmsg->raw.len = usrmsg->raw.len;
|
||||
|
||||
usrmsg->raw.data = NULL;
|
||||
usrmsg->raw.len = 0;
|
||||
}
|
||||
|
|
|
@ -92,7 +92,7 @@ FT_DECLARE(ftdm_iterator_t *) ftdm_sigmsg_get_var_iterator(const ftdm_sigmsg_t *
|
|||
return NULL;
|
||||
}
|
||||
|
||||
if (!(iter = get_iterator(FTDM_ITERATOR_VARS, iter))) {
|
||||
if (!(iter = ftdm_get_iterator(FTDM_ITERATOR_VARS, iter))) {
|
||||
return NULL;
|
||||
}
|
||||
iter->pvt.hashiter = hashiter;
|
||||
|
|
|
@ -550,6 +550,11 @@ typedef struct {
|
|||
|
||||
typedef void * ftdm_variable_container_t;
|
||||
|
||||
typedef struct {
|
||||
ftdm_size_t len;
|
||||
void *data;
|
||||
} ftdm_raw_data_t;
|
||||
|
||||
/*! \brief Generic signaling message received from the stack */
|
||||
struct ftdm_sigmsg {
|
||||
ftdm_signal_event_t event_id; /*!< The type of message */
|
||||
|
@ -565,20 +570,13 @@ struct ftdm_sigmsg {
|
|||
ftdm_event_collected_t collected; /*!< valid if event_id is FTDM_SIGEVENT_COLLECTED_DIGIT */
|
||||
ftdm_event_indication_completed_t indication_completed; /*!< valid if the event_id is FTDM_SIGEVENT_INDICATION_COMPLETED */
|
||||
} ev_data;
|
||||
struct {
|
||||
ftdm_size_t len; /*!< Data len */
|
||||
void *data; /*!< Signaling module specific data */
|
||||
} raw;
|
||||
ftdm_raw_data_t raw;
|
||||
};
|
||||
|
||||
/*! \brief Generic user message sent to the stack */
|
||||
struct ftdm_usrmsg {
|
||||
uint32_t call_id; /*!< unique call id for this call */
|
||||
ftdm_variable_container_t variables;
|
||||
struct {
|
||||
ftdm_size_t len; /*!< Data len */
|
||||
void *data; /*!< Signaling module specific data */
|
||||
} raw;
|
||||
ftdm_raw_data_t raw;
|
||||
};
|
||||
|
||||
/*! \brief Crash policy
|
||||
|
|
|
@ -590,7 +590,7 @@ FT_DECLARE(ftdm_status_t) ftdm_channel_open_chan(ftdm_channel_t *ftdmchan);
|
|||
FT_DECLARE(void) ftdm_ack_indication(ftdm_channel_t *ftdmchan, ftdm_channel_indication_t indication, ftdm_status_t status);
|
||||
|
||||
|
||||
FT_DECLARE(ftdm_iterator_t) *get_iterator(ftdm_iterator_type_t type, ftdm_iterator_t *iter);
|
||||
FT_DECLARE(ftdm_iterator_t) *ftdm_get_iterator(ftdm_iterator_type_t type, ftdm_iterator_t *iter);
|
||||
|
||||
|
||||
/*!
|
||||
|
|
Loading…
Reference in New Issue