X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=blobdiff_plain;f=port.cpp;h=4afca9c7978729533a701f6f57f547a1835540d4;hp=74f8aacb0bf1ed20e17705a853054004756c93c3;hb=5463e1b62a39ce417b610584e3d34a8bc30ac15e;hpb=877a2dfd52782f72ba2d28483212166f2326b1fa diff --git a/port.cpp b/port.cpp index 74f8aac..4afca9c 100644 --- a/port.cpp +++ b/port.cpp @@ -149,8 +149,6 @@ Port::Port(int type, const char *portname, struct port_settings *settings) { class Port *temp, **tempp; - PDEBUG(DEBUG_PORT, "new port of type 0x%x, name '%s'\n", type, portname); - /* initialize object */ if (settings) memcpy(&p_settings, settings, sizeof(struct port_settings)); @@ -195,6 +193,8 @@ Port::Port(int type, const char *portname, struct port_settings *settings) *tempp = this; classuse++; + + PDEBUG(DEBUG_PORT, "new port (%d) of type 0x%x, name '%s'\n", p_serial, type, portname); } @@ -206,7 +206,7 @@ Port::~Port(void) class Port *temp, **tempp; struct lcr_msg *message; - PDEBUG(DEBUG_PORT, "removing port of type 0x%x, name '%s'\n", p_type, p_name); + PDEBUG(DEBUG_PORT, "removing port (%d) of type 0x%x, name '%s'\n", p_serial, p_type, p_name); if (p_bridge) { PDEBUG(DEBUG_PORT, "Removing us from bridge %u\n", p_bridge->bridge_id); @@ -301,7 +301,7 @@ void Port::set_tone(const char *dir, const char *name) if (name == NULL) name = ""; - if (!dir && !dir[0]) + if (!dir || !dir[0]) dir = options.tones_dir; /* just in case we have no PmISDN instance */ /* no counter, no eof, normal speed */