X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=blobdiff_plain;f=vbox.cpp;h=8447b896667b6a64935aa8b5ddacc21ee684d9de;hp=c8c30129a2070619b556043386947cc6fa2f1497;hb=79bd731c0db3e3202cfeed2af3fb217ae744b70f;hpb=877a2dfd52782f72ba2d28483212166f2326b1fa diff --git a/vbox.cpp b/vbox.cpp index c8c3012..8447b89 100644 --- a/vbox.cpp +++ b/vbox.cpp @@ -23,7 +23,7 @@ int record_timeout(struct lcr_timer *timer, void *instance, int index); /* * initialize vbox port */ -VBoxPort::VBoxPort(int type, struct port_settings *settings) : Port(type, "vbox", settings) +VBoxPort::VBoxPort(int type, struct port_settings *settings) : Port(type, "vbox", settings, NULL) { p_vbox_timeout = 0; p_vbox_announce_fh = -1; @@ -191,6 +191,11 @@ void VBoxPort::send_announcement(void) int VBoxPort::bridge_rx(unsigned char *data, int len) { + int ret; + + if ((ret = Port::bridge_rx(data, len))) + return ret; + if (p_record) record(data, len, 1); // from up return 0; @@ -251,7 +256,8 @@ int VBoxPort::message_epoint(unsigned int epoint_id, int message_id, union param case MESSAGE_SETUP: /* dial-out command received from epoint, answer with connect */ /* get apppbx */ - memcpy(&p_vbox_ext, &((class EndpointAppPBX *)(epoint->ep_app))->e_ext, sizeof(p_vbox_ext)); + if (epoint->ep_app_type == EAPP_TYPE_PBX) + memcpy(&p_vbox_ext, &((class EndpointAppPBX *)(epoint->ep_app))->e_ext, sizeof(p_vbox_ext)); /* extract optional announcement file */ if ((c = strchr(param->setup.dialinginfo.id, ','))) { if (c[1] == '/')