summaryrefslogtreecommitdiffstats
path: root/endpoint.cpp
diff options
context:
space:
mode:
authorroot2009-07-05 22:14:21 +0200
committerroot2009-07-05 22:14:21 +0200
commite9bfe48fc5254e79e59c6ffc1698912175edf4e3 (patch)
tree63c13b3d019b9a45bcd1b48354e243f133292401 /endpoint.cpp
parentChanged GSM api to current development tree of OpenBSC. (diff)
downloadlcr-e9bfe48fc5254e79e59c6ffc1698912175edf4e3.tar.gz
lcr-e9bfe48fc5254e79e59c6ffc1698912175edf4e3.tar.xz
lcr-e9bfe48fc5254e79e59c6ffc1698912175edf4e3.zip
Source cleanup.
modified: bootstrap.c modified: cause.c modified: crypt.cpp modified: endpoint.cpp modified: genext.c modified: genrc.c modified: gentones.c modified: genwave.c modified: ie.cpp modified: join.cpp modified: joinpbx.cpp modified: joinremote.cpp modified: lcradmin.c modified: mail.c modified: main.c modified: message.c modified: route.c modified: socket_server.c modified: tones.c modified: trace.c modified: vbox.cpp
Diffstat (limited to 'endpoint.cpp')
-rw-r--r--endpoint.cpp27
1 files changed, 9 insertions, 18 deletions
diff --git a/endpoint.cpp b/endpoint.cpp
index e9c680f..28ea12f 100644
--- a/endpoint.cpp
+++ b/endpoint.cpp
@@ -23,8 +23,7 @@ class Endpoint *find_epoint_id(unsigned int epoint_id)
{
class Endpoint *epoint = epoint_first;
- while(epoint)
- {
+ while(epoint) {
//printf("comparing: '%s' with '%s'\n", name, epoint->name);
if (epoint->ep_serial == epoint_id)
return(epoint);
@@ -62,11 +61,9 @@ Endpoint::Endpoint(unsigned int port_id, unsigned int join_id)
ep_serial = epoint_serial++;
/* link to join or port */
- if (port_id)
- {
+ if (port_id) {
port = find_port_id(port_id);
- if (port)
- {
+ if (port) {
if ((port->p_type&PORT_CLASS_MASK) == PORT_CLASS_mISDN)
earlyb = ((class PmISDN *)port)->p_m_mISDNport->earlyb;
if (!portlist_new(port_id, port->p_type, earlyb))
@@ -97,17 +94,14 @@ Endpoint::~Endpoint(void)
delete ep_app;
/* free relations */
- if (ep_join_id)
- {
+ if (ep_join_id) {
PERROR("warning: still relation to join.\n");
}
/* free portlist */
portlist = ep_portlist;
- while(portlist)
- {
- if (portlist->port_id)
- {
+ while(portlist) {
+ if (portlist->port_id) {
PERROR("warning: still relation to port (portlist list)\n");
}
mtemp = portlist;
@@ -120,8 +114,7 @@ Endpoint::~Endpoint(void)
/* detach */
temp =epoint_first;
tempp = &epoint_first;
- while(temp)
- {
+ while(temp) {
if (temp == this)
break;
@@ -171,8 +164,7 @@ void Endpoint::free_portlist(struct port_list *portlist)
temp = ep_portlist;
tempp = &ep_portlist;
- while(temp)
- {
+ while(temp) {
if (temp == portlist)
break;
@@ -195,8 +187,7 @@ void Endpoint::free_portlist(struct port_list *portlist)
*/
int Endpoint::handler(void)
{
- if (ep_use <= 0)
- {
+ if (ep_use <= 0) {
delete this;
return(-1);
}