{
struct route_param *rparam;
struct port_list *portlist = ea_endpoint->ep_portlist;
- struct message *message;
+ struct lcr_msg *message;
struct capa_info capainfo;
struct caller_info callerinfo;
struct redir_info redirinfo;
struct redir_info redirinfo;
struct dialing_info dialinginfo;
struct port_list *portlist = ea_endpoint->ep_portlist;
- struct message *message;
+ struct lcr_msg *message;
struct extension ext;
struct route_param *rparam;
struct dialing_info dialinginfo;
char *p;
struct port_list *portlist = ea_endpoint->ep_portlist;
- struct message *message;
+ struct lcr_msg *message;
struct route_param *rparam;
/* special processing of delete characters '*' and '#' */
void EndpointAppPBX::action_dialing_remote(void)
{
- struct message *message;
+ struct lcr_msg *message;
struct dialing_info dialinginfo;
// struct route_param *rparam;
{
struct dialing_info dialinginfo;
struct port_list *portlist = ea_endpoint->ep_portlist;
- struct message *message;
+ struct lcr_msg *message;
struct extension ext;
struct route_param *rparam;
class Join *join;
class JoinPBX *joinpbx;
struct port_list *portlist = ea_endpoint->ep_portlist;
- struct message *message;
+ struct lcr_msg *message;
struct route_param *rparam;
int partyline, jingle = 0;
struct join_relation *relation;
void EndpointAppPBX::action_dialing_login(void)
{
struct port_list *portlist = ea_endpoint->ep_portlist;
- struct message *message;
+ struct lcr_msg *message;
char *extension;
struct route_param *rparam;
*/
void EndpointAppPBX::_action_redial_reply(int in)
{
- struct message *message;
+ struct lcr_msg *message;
char *last;
struct route_param *rparam;
void EndpointAppPBX::action_dialing_powerdial(void)
{
struct port_list *portlist = ea_endpoint->ep_portlist;
- struct message *message;
+ struct lcr_msg *message;
struct route_param *rparam;
/* power dialing only possible if we have a last dialed number */
unsigned int cause;
char causestr[16];
struct port_list *portlist = ea_endpoint->ep_portlist;
- struct message *message;
+ struct lcr_msg *message;
class Port *port;
char testcode[32] = "";
struct route_param *rparam;
void EndpointAppPBX::action_dialing_calculator(void)
{
struct port_list *portlist = ea_endpoint->ep_portlist;
- struct message *message;
+ struct lcr_msg *message;
double value1, value2, v, sign1;
int komma1, komma2, k, state, mode, first;
char *p;
{
struct route_param *rparam;
struct port_list *portlist = ea_endpoint->ep_portlist;
- struct message *message;
+ struct lcr_msg *message;
int cause = CAUSE_NORMAL; /* normal call clearing */
int location = LOCATION_PRIVATE_LOCAL;
char cause_string[256] = "", display[84] = "";
struct numbering *numbering = numbering_int;
char dialing[sizeof(e_dialinginfo.id)];
int i;
- struct message *message;
+ struct lcr_msg *message;
struct route_param *rparam;
/* in case we have no menu (this should never happen) */
void EndpointAppPBX::process_dialing(void)
{
struct port_list *portlist = ea_endpoint->ep_portlist;
- struct message *message;
+ struct lcr_msg *message;
struct route_param *rparam;
//#warning Due to HANG-BUG somewhere here, I added some HANG-BUG-DEBUGGING output that cannot be disabled. after bug has been found, this will be removed.
{
// int language = e_ext.vbox_language;
// struct route_param *rparam;
- struct message *message;
+ struct lcr_msg *message;
struct port_list *portlist = ea_endpoint->ep_portlist;
/* if no caller id */
{
// char buffer[32];
char digit[] = "number_00";
-// struct message *message;
+// struct lcr_msg *message;
// struct port_list *portlist = ea_endpoint->ep_portlist;
PDEBUG(DEBUG_EPOINT, "EPOINT(%d) terminal %s end of file during state: %d\n", ea_endpoint->ep_serial, e_ext.number, e_vbox_state);
*/
void EndpointAppPBX::set_tone_efi(char *tone)
{
- struct message *message;
+ struct lcr_msg *message;
if (tone == NULL)
tone = "";
{
int language = e_ext.vbox_language;
struct route_param *rparam;
- struct message *message;
+ struct lcr_msg *message;
struct port_list *portlist = ea_endpoint->ep_portlist;
/* get extension */
if (e_vbox_display_refresh && e_ext.vbox_display!=VBOX_DISPLAY_OFF)
{
char counter[32];
- struct message *message;
+ struct lcr_msg *message;
SPRINT(counter, "%02d:%02d", e_vbox_counter/60, e_vbox_counter%60);
if (e_vbox_counter_max)
*/
void EndpointAppPBX::set_tone_vbox(char *tone)
{
- struct message *message;
+ struct lcr_msg *message;
if (tone == NULL)
tone = "";
void EndpointAppPBX::set_play_vbox(char *file, int offset)
{
char filename[256];
- struct message *message;
+ struct lcr_msg *message;
SPRINT(filename, "%s/%s/%s/vbox/%s", INSTALL_DATA, options.extensions_dir, e_vbox, file);
*/
void EndpointAppPBX::set_play_speed(int speed)
{
- struct message *message;
+ struct lcr_msg *message;
if (!ea_endpoint->ep_portlist)
{
void EndpointAppPBX::release(int release, int joinlocation, int joincause, int portlocation, int portcause)
{
struct port_list *portlist;
- struct message *message;
+ struct lcr_msg *message;
char cause[16];
/* message to test call */
void EndpointAppPBX::notify_active(void)
{
struct port_list *portlist = ea_endpoint->ep_portlist;
- struct message *message;
+ struct lcr_msg *message;
int notify = 0;
switch(e_tx_state)
/* set tone pattern for port */
void EndpointAppPBX::set_tone(struct port_list *portlist, char *tone)
{
- struct message *message;
+ struct lcr_msg *message;
if (!tone)
tone = "";
class Port *port;
// class pdss1 *pdss1;
struct port_list *portlist;
- struct message *message;
+ struct lcr_msg *message;
int anycall = 0;
int cause = CAUSE_RESSOURCEUNAVAIL;
char *p;
if (e_cfnr_release)
{
struct port_list *portlist;
- struct message *message;
+ struct lcr_msg *message;
if (now >= e_cfnr_release)
{
/* port MESSAGE_SETUP */
void EndpointAppPBX::port_setup(struct port_list *portlist, int message_type, union parameter *param)
{
- struct message *message;
+ struct lcr_msg *message;
char buffer[256];
int writeext; /* flags need to write extension after modification */
class Port *port;
/* port MESSAGE_OVERLAP */
void EndpointAppPBX::port_overlap(struct port_list *portlist, int message_type, union parameter *param)
{
- struct message *message;
+ struct lcr_msg *message;
logmessage(message_type, param, portlist->port_id, DIRECTION_IN);
/* port MESSAGE_PROCEEDING */
void EndpointAppPBX::port_proceeding(struct port_list *portlist, int message_type, union parameter *param)
{
- struct message *message;
+ struct lcr_msg *message;
logmessage(message_type, param, portlist->port_id, DIRECTION_IN);
/* port MESSAGE_ALERTING */
void EndpointAppPBX::port_alerting(struct port_list *portlist, int message_type, union parameter *param)
{
- struct message *message;
+ struct lcr_msg *message;
logmessage(message_type, param, portlist->port_id, DIRECTION_IN);
/* port MESSAGE_CONNECT */
void EndpointAppPBX::port_connect(struct port_list *portlist, int message_type, union parameter *param)
{
- struct message *message;
+ struct lcr_msg *message;
char buffer[256];
unsigned long port_id = portlist->port_id;
struct port_list *tportlist;
/* port MESSAGE_DISCONNECT MESSAGE_RELEASE */
void EndpointAppPBX::port_disconnect_release(struct port_list *portlist, int message_type, union parameter *param)
{
- struct message *message;
+ struct lcr_msg *message;
char buffer[256];
unsigned long port_id = portlist->port_id;
int cause,
{
logmessage(message_type, param, portlist->port_id, DIRECTION_IN);
- struct message *message;
+ struct lcr_msg *message;
char *logtext = "";
char buffer[64];
{
logmessage(message_type, param, portlist->port_id, DIRECTION_IN);
- struct message *message;
+ struct lcr_msg *message;
message = message_create(ea_endpoint->ep_serial, ea_endpoint->ep_join_id, EPOINT_TO_JOIN, MESSAGE_FACILITY);
memcpy(&message->param.facilityinfo, ¶m->facilityinfo, sizeof(struct facility_info));
void EndpointAppPBX::ea_message_port(unsigned long port_id, int message_type, union parameter *param)
{
struct port_list *portlist;
- struct message *message;
+ struct lcr_msg *message;
portlist = ea_endpoint->ep_portlist;
while(portlist)
/* join MESSAGE_INFORMATION */
void EndpointAppPBX::join_information(struct port_list *portlist, int message_type, union parameter *param)
{
- struct message *message;
+ struct lcr_msg *message;
e_overlap = 1;
/* join MESSAGE_FACILITY */
void EndpointAppPBX::join_facility(struct port_list *portlist, int message_type, union parameter *param)
{
- struct message *message;
+ struct lcr_msg *message;
if (!e_ext.facility && e_ext.number[0])
{
/* join MESSAGE_MORE */
void EndpointAppPBX::join_overlap(struct port_list *portlist, int message_type, union parameter *param)
{
- struct message *message;
+ struct lcr_msg *message;
new_state(EPOINT_STATE_IN_OVERLAP);
/* join MESSAGE_PROCEEDING */
void EndpointAppPBX::join_proceeding(struct port_list *portlist, int message_type, union parameter *param)
{
- struct message *message;
+ struct lcr_msg *message;
new_state(EPOINT_STATE_IN_PROCEEDING);
/* join MESSAGE_ALERTING */
void EndpointAppPBX::join_alerting(struct port_list *portlist, int message_type, union parameter *param)
{
- struct message *message;
+ struct lcr_msg *message;
new_state(EPOINT_STATE_IN_ALERTING);
/* join MESSAGE_CONNECT */
void EndpointAppPBX::join_connect(struct port_list *portlist, int message_type, union parameter *param)
{
- struct message *message;
+ struct lcr_msg *message;
new_state(EPOINT_STATE_CONNECT);
// UCPY(e_join_tone, "");
void EndpointAppPBX::join_disconnect_release(int message_type, union parameter *param)
{
char cause[16];
- struct message *message;
+ struct lcr_msg *message;
struct port_list *portlist = NULL;
/* join MESSAGE_SETUP */
void EndpointAppPBX::join_setup(struct port_list *portlist, int message_type, union parameter *param)
{
- struct message *message;
+ struct lcr_msg *message;
// struct interface *interface;
/* if we already in setup state, we just update the dialing with new digits */
/* join MESSAGE_mISDNSIGNAL */
void EndpointAppPBX::join_mISDNsignal(struct port_list *portlist, int message_type, union parameter *param)
{
- struct message *message;
+ struct lcr_msg *message;
while(portlist)
{
/* join MESSAGE_NOTIFY */
void EndpointAppPBX::join_notify(struct port_list *portlist, int message_type, union parameter *param)
{
- struct message *message;
+ struct lcr_msg *message;
int new_state;
if (param->notifyinfo.notify)
void EndpointAppPBX::ea_message_join(unsigned long join_id, int message_type, union parameter *param)
{
struct port_list *portlist;
- struct message *message;
+ struct lcr_msg *message;
if (!join_id)
{
void EndpointAppPBX::pick_join(char *extensions)
{
- struct message *message;
+ struct lcr_msg *message;
struct port_list *portlist;
class Port *port;
class EndpointAppPBX *eapp, *found;
*/
void EndpointAppPBX::join_join(void)
{
- struct message *message;
+ struct lcr_msg *message;
struct join_relation *our_relation, *other_relation;
struct join_relation **our_relation_pointer, **other_relation_pointer;
class Join *our_join, *other_join;
void EndpointAppPBX::message_disconnect_port(struct port_list *portlist, int cause, int location, char *display)
{
- struct message *message;
+ struct lcr_msg *message;
if (!portlist)
return;
*/
void EndpointAppPBX::cryptman_msg2peer(unsigned char *buf)
{
- struct message *message;
+ struct lcr_msg *message;
unsigned char *p = buf;
int len = 0;
int l;
*/
void EndpointAppPBX::cryptman_msg2crengine(int msg, unsigned char *buf, int len)
{
- struct message *message;
+ struct lcr_msg *message;
if (len > (int)sizeof(message->param.crypt.data))
{
*/
void EndpointAppPBX::cryptman_msg2user(int msg, char *text)
{
- struct message *message;
+ struct lcr_msg *message;
/* send message */
message = message_create(ea_endpoint->ep_serial, ea_endpoint->ep_join_id, EPOINT_TO_JOIN, MESSAGE_CRYPT);
message->param.crypt.type = msg;
void PmISDN::cryptman_listen_bch(unsigned char *p, int l)
{
int i;
- struct message *message;
+ struct lcr_msg *message;
retry:
if (!l)
*/
void EndpointAppPBX::encrypt_shared(void)
{
- struct message *message;
+ struct lcr_msg *message;
char *errstr = "";
class Port *port;
int type, key_len;
*/
void EndpointAppPBX::encrypt_keyex(void)
{
- struct message *message;
+ struct lcr_msg *message;
char *errstr = "";
class Port *port;
*/
void EndpointAppPBX::encrypt_off(void)
{
- struct message *message;
+ struct lcr_msg *message;
if (e_crypt!=CRYPT_ON && e_crypt!=CRYPT_OFF)
{
*/
void EndpointAppPBX::encrypt_result(int msg, char *text)
{
- struct message *message;
+ struct lcr_msg *message;
switch(msg)
{
unsigned char useruser[128];
int useruser_len = 0, useruser_protocol;
class Endpoint *epoint;
- struct message *message;
+ struct lcr_msg *message;
#ifdef SOCKET_MISDN
/* process given callref */
#endif
int type, plan;
unsigned char keypad[32] = "";
- struct message *message;
+ struct lcr_msg *message;
l1l2l3_trace_header(p_m_mISDNport, this, L3_INFORMATION_IND, DIRECTION_IN);
#ifdef SOCKET_MISDN
int exclusive, channel;
int coding, location, progress;
int ret;
- struct message *message;
+ struct lcr_msg *message;
l1l2l3_trace_header(p_m_mISDNport, this, L3_SETUP_ACKNOWLEDGE_IND, DIRECTION_IN);
#ifdef SOCKET_MISDN
int exclusive, channel;
int coding, location, progress;
int ret;
- struct message *message;
+ struct lcr_msg *message;
int notify = -1, type, plan, present;
char redir[32];
int exclusive, channel;
int coding, location, progress;
int ret;
- struct message *message;
+ struct lcr_msg *message;
int notify = -1, type, plan, present;
char redir[32];
int exclusive, channel;
int type, plan, present, screen;
int ret;
- struct message *message;
+ struct lcr_msg *message;
int bchannel_before;
if (p_m_d_ntmode)
#endif
int location, cause;
int coding, proglocation, progress;
- struct message *message;
+ struct lcr_msg *message;
l1l2l3_trace_header(p_m_mISDNport, this, L3_DISCONNECT_IND, DIRECTION_IN);
#ifdef SOCKET_MISDN
RELEASE_t *release = (RELEASE_t *)((unsigned long)data + headerlen);
#endif
int location, cause;
- struct message *message;
+ struct lcr_msg *message;
l1l2l3_trace_header(p_m_mISDNport, this, L3_RELEASE_IND, DIRECTION_IN);
#ifdef SOCKET_MISDN
RELEASE_COMPLETE_t *release_complete = (RELEASE_COMPLETE_t *)((unsigned long)data + headerlen);
#endif
int location, cause;
- struct message *message;
+ struct lcr_msg *message;
l1l2l3_trace_header(p_m_mISDNport, this, L3_RELEASE_COMPLETE_IND, DIRECTION_IN);
#ifdef SOCKET_MISDN
void Pdss1::t312_timeout_ind(unsigned long prim, unsigned long dinfo, void *data)
{
#endif
- struct message *message;
+ struct lcr_msg *message;
// trace is done at message_isdn()
int headerlen = (p_m_d_ntmode)?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN;
NOTIFY_t *notifying = (NOTIFY_t *)((unsigned long)data + headerlen);
#endif
- struct message *message;
+ struct lcr_msg *message;
int notify, type, plan, present;
unsigned char notifyid[sizeof(message->param.notifyinfo.id)];
/* CC_HOLD INDICATION */
- struct message *message;
+ struct lcr_msg *message;
#ifdef SOCKET_MISDN
void Pdss1::hold_ind(unsigned int cmd, unsigned int pid, struct l3_msg *l3m)
{
RETRIEVE_REJECT_t *retrieve_reject;
RETRIEVE_ACKNOWLEDGE_t *retrieve_acknowledge;
#endif
- struct message *message;
+ struct lcr_msg *message;
int channel, exclusive, cause;
int ret;
SUSPEND_ACKNOWLEDGE_t *suspend_acknowledge;
SUSPEND_REJECT_t *suspend_reject;
#endif
- struct message *message;
+ struct lcr_msg *message;
class Endpoint *epoint;
unsigned char callid[8];
int len;
int len;
int channel, exclusive;
class Endpoint *epoint;
- struct message *message;
+ struct lcr_msg *message;
int ret;
#ifdef SOCKET_MISDN
#endif
unsigned char facil[256];
int facil_len;
- struct message *message;
+ struct lcr_msg *message;
l1l2l3_trace_header(p_m_mISDNport, this, L3_FACILITY_IND, DIRECTION_IN);
#ifdef SOCKET_MISDN
*/
while(p_epointlist)
{
- struct message *message;
+ struct lcr_msg *message;
message = message_create(p_serial, p_epointlist->epoint_id, PORT_TO_EPOINT, MESSAGE_RELEASE);
message->param.disconnectinfo.cause = (p_m_d_collect_cause!=CAUSE_NOUSER)?p_m_d_collect_cause:CAUSE_UNSPECIFIED;
message->param.disconnectinfo.location = (p_m_d_collect_cause!=CAUSE_NOUSER)?p_m_d_collect_location:LOCATION_PRIVATE_LOCAL;
*/
while(p_epointlist)
{
- struct message *message;
+ struct lcr_msg *message;
message = message_create(p_serial, p_epointlist->epoint_id, PORT_TO_EPOINT, MESSAGE_RELEASE);
message->param.disconnectinfo.cause = (p_m_d_collect_cause!=CAUSE_NOUSER)?p_m_d_collect_cause:CAUSE_UNSPECIFIED;
message->param.disconnectinfo.location = (p_m_d_collect_cause!=CAUSE_NOUSER)?p_m_d_collect_location:LOCATION_PRIVATE_LOCAL;
/* release if port is blocked */
if (p_m_mISDNport->ifport->block)
{
- struct message *message;
+ struct lcr_msg *message;
message = message_create(p_serial, ACTIVE_EPOINT(p_epointlist), PORT_TO_EPOINT, MESSAGE_RELEASE);
message->param.disconnectinfo.cause = 27; // temp. unavail.
ret = p_m_mISDNport->ml3->to_layer3(p_m_mISDNport->ml3, MT_ASSIGN, 0, NULL);
if (mt_assign_pid == 0 || ret < 0)
{
- struct message *message;
+ struct lcr_msg *message;
add_trace("callref", NULL, "no free id");
end_trace();
}
if (i == 0x100)
{
- struct message *message;
+ struct lcr_msg *message;
add_trace("callref", NULL, "no free id");
end_trace();
DISCONNECT_t *disconnect;
RELEASE_COMPLETE_t *release_complete;
#endif
- struct message *message;
+ struct lcr_msg *message;
char *p = NULL;
/* we reject during incoming setup when we have no tones. also if we are in outgoing setup state */
*/
int Pdss1::message_epoint(unsigned long epoint_id, int message_id, union parameter *param)
{
- struct message *message;
+ struct lcr_msg *message;
if (PmISDN::message_epoint(epoint_id, message_id, param))
return(1);
{
class Port *port;
class Pdss1 *pdss1;
- struct message *message;
+ struct lcr_msg *message;
if (!mISDNport->ntmode)
return;
int message_epoint(unsigned long epoint_id, int message, union parameter *param);
int p_m_d_ntmode; /* flags the nt-mode */
- struct message *p_m_d_queue; /* queue for SETUP if link is down */
- struct message *p_m_d_notify_pending; /* queue for NOTIFY if not connected */
+ struct lcr_msg *p_m_d_queue; /* queue for SETUP if link is down */
+ struct lcr_msg *p_m_d_notify_pending; /* queue for NOTIFY if not connected */
int p_m_d_collect_cause; /* collecting cause and location */
int p_m_d_collect_location;
static int notify_state_change(int join_id, int epoint_id, int old_state, int new_state)
{
int notify_off = 0, notify_on = 0;
- struct message *message;
+ struct lcr_msg *message;
if (old_state == new_state)
return(old_state);
void JoinPBX::bridge(void)
{
struct join_relation *relation;
- struct message *message;
+ struct lcr_msg *message;
int numconnect = 0, relations = 0;
class Endpoint *epoint;
struct port_list *portlist;
int JoinPBX::release(struct join_relation *relation, int location, int cause)
{
struct join_relation *reltemp, **relationpointer;
- struct message *message;
+ struct lcr_msg *message;
class Join *join;
int destroy = 0;
struct join_relation *relation, *reltemp;
int num;
int new_state;
- struct message *message;
+ struct lcr_msg *message;
// int size, writesize, oldpointer;
char *number, *numbers;
int JoinPBX::out_setup(unsigned long epoint_id, int message_type, union parameter *param, char *newnumber)
{
struct join_relation *relation;
- struct message *message;
+ struct lcr_msg *message;
class Endpoint *epoint;
PDEBUG(DEBUG_JOIN, "no endpoint found, so we will create an endpoint and send the setup message we have.\n");
void JoinPBX::play_jingle(int in)
{
struct join_relation *relation;
- struct message *message;
+ struct lcr_msg *message;
relation = j_relation;
void JoinRemote::message_remote(int message_type, union parameter *param)
{
- struct message *message;
+ struct lcr_msg *message;
/* create relation if no relation exists */
if (!j_epoint_id)
return;
}
- /* cannot just forward, because param is not of container "struct message" */
+ /* cannot just forward, because param is not of container "struct lcr_msg" */
message = message_create(j_serial, j_epoint_id, JOIN_TO_EPOINT, message_type);
memcpy(&message->param, param, sizeof(message->param));
message_put(message);
*/
PmISDN::~PmISDN()
{
- struct message *message;
+ struct lcr_msg *message;
/* remove bchannel relation */
drop_bchannel();
*/
int PmISDN::handler(void)
{
- struct message *message;
+ struct lcr_msg *message;
int elapsed = 0;
int ret;
#endif
unsigned char *data_temp;
unsigned long length_temp;
- struct message *message;
+ struct lcr_msg *message;
unsigned char *p;
int l;
/* MESSAGE_mISDNSIGNAL */
-//extern struct message *dddebug;
+//extern struct lcr_msg *dddebug;
void PmISDN::message_mISDNsignal(unsigned long epoint_id, int message_id, union parameter *param)
{
switch(param->mISDNsignal.message)
/* MESSAGE_CRYPT */
void PmISDN::message_crypt(unsigned long epoint_id, int message_id, union parameter *param)
{
- struct message *message;
+ struct lcr_msg *message;
switch(param->crypt.type)
{
{
int ret = -1;
int lockfd = -1; /* file lock */
- struct message *message;
+ struct lcr_msg *message;
class Port *port;
class Endpoint *epoint;
class Join *join;
MESSAGES
-struct message *message_first = NULL;
-struct message **messagepointer_end = &message_first;
+struct lcr_msg *message_first = NULL;
+struct lcr_msg **messagepointer_end = &message_first;
/* creates a new message with the given attributes. the message must be filled then. after filling, the message_put must be called */
-struct message *message_create(int id_from, int id_to, int flow, int type)
+struct lcr_msg *message_create(int id_from, int id_to, int flow, int type)
{
- struct message *message;
+ struct lcr_msg *message;
- message = (struct message *)MALLOC(sizeof(struct message));
+ message = (struct lcr_msg *)MALLOC(sizeof(struct lcr_msg));
if (!message)
FATAL("No memory for message.\n");
mmemuse++;
}
/* attaches a message to the end of the message chain */
-void message_put(struct message *message)
+void message_put(struct lcr_msg *message)
{
if (message->id_to == 0)
{
messagepointer_end = &(message->next);
}
-struct message *message_forward(int id_from, int id_to, int flow, union parameter *param)
+struct lcr_msg *message_forward(int id_from, int id_to, int flow, union parameter *param)
{
- struct message *message;
+ struct lcr_msg *message;
/* get point to message */
- message = (struct message *)((unsigned long)param - ((unsigned long)(&message->param) - (unsigned long)message));
+ message = (struct lcr_msg *)((unsigned long)param - ((unsigned long)(&message->param) - (unsigned long)message));
/* protect, so forwarded messages are not freed after handling */
message->keep = 1;
}
/* detaches the first messages from the message chain */
-struct message *message_get(void)
+struct lcr_msg *message_get(void)
{
- struct message *message;
+ struct lcr_msg *message;
if (!message_first)
{
}
/* free a message */
-void message_free(struct message *message)
+void message_free(struct lcr_msg *message)
{
if (message->keep)
return;
- FREE(message, sizeof(struct message));
+ FREE(message, sizeof(struct lcr_msg));
mmemuse--;
}
};
/* message structure */
-struct message {
- struct message *next;
+struct lcr_msg {
+ struct lcr_msg *next;
int type; /* type of message */
int flow; /* from where to where */
unsigned long id_from; /* in case of flow==PORT_TO_EPOINT: id_from is the port's serial, id_to is the epoint's serial */
};
-struct message *message_create(int id_from, int id_to, int flow, int type);
-void message_put(struct message *message);
-struct message *message_forward(int id_from, int id_to, int flow, union parameter *param);
-struct message *message_get(void);
-void message_free(struct message *message);
+struct lcr_msg *message_create(int id_from, int id_to, int flow, int type);
+void message_put(struct lcr_msg *message);
+struct lcr_msg *message_forward(int id_from, int id_to, int flow, union parameter *param);
+struct lcr_msg *message_get(void);
+void message_free(struct lcr_msg *message);
Port::~Port(void)
{
class Port *temp, **tempp;
- struct message *message;
+ struct lcr_msg *message;
if (p_record)
close_record(0, 0);
void Port::set_vbox_play(char *name, int offset)
{
signed long size;
- struct message *message;
+ struct lcr_msg *message;
/* use ser_box_tone() */
set_vbox_tone("", name);
if (((p_tone_size-p_tone_left)/8000) != (p_tone_size-tone_left_before)/8000)
{
//printf("\nsize=%d left=%d\n\n",p_tone_size,p_tone_left);
- struct message *message;
+ struct lcr_msg *message;
message = message_create(p_serial, ACTIVE_EPOINT(p_epointlist), PORT_TO_EPOINT, MESSAGE_TONE_COUNTER);
message->param.counter.current = (p_tone_size-p_tone_left)/8000;
message->param.counter.max = -1;
try_loop:
if (p_tone_eof && ACTIVE_EPOINT(p_epointlist))
{
- struct message *message;
+ struct lcr_msg *message;
message = message_create(p_serial, ACTIVE_EPOINT(p_epointlist), PORT_TO_EPOINT, MESSAGE_TONE_EOF);
message_put(message);
}
* this is called by the message_epoint inherited by child classes
* therefor a return=1 means: stop, no more processing
*/
-//extern struct message *dddebug;
+//extern struct lcr_msg *dddebug;
int Port::message_epoint(unsigned long epoint_id, int message_id, union parameter *param)
{
/* check if we got audio data from one remote port */
*/
int VBoxPort::handler(void)
{
- struct message *message;
+ struct lcr_msg *message;
unsigned long tosend;
unsigned char buffer[ISDN_TRANSMIT];
time_t currenttime;
*/
int VBoxPort::message_epoint(unsigned long epoint_id, int message_id, union parameter *param)
{
- struct message *message;
+ struct lcr_msg *message;
class Endpoint *epoint;
char filename[256], *c;