summaryrefslogtreecommitdiffstats
path: root/joinpbx.cpp
diff options
context:
space:
mode:
authorSuper User2007-07-31 07:34:18 +0200
committerSuper User2007-07-31 07:34:18 +0200
commit54d34cda7a6f0d9bd3ff22d529ce69ff2c004bd3 (patch)
treef58def401dbcb8dc1459770b77d766a7b5d76544 /joinpbx.cpp
parentfixed routing: only parameters that are allowed may be present in the routing... (diff)
downloadlcr-54d34cda7a6f0d9bd3ff22d529ce69ff2c004bd3.tar.gz
lcr-54d34cda7a6f0d9bd3ff22d529ce69ff2c004bd3.tar.xz
lcr-54d34cda7a6f0d9bd3ff22d529ce69ff2c004bd3.zip
fixed crash when receiving notify messages
some other fixes start adding new mISDN api.
Diffstat (limited to 'joinpbx.cpp')
-rw-r--r--joinpbx.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/joinpbx.cpp b/joinpbx.cpp
index 62da7f0..ff8fcd1 100644
--- a/joinpbx.cpp
+++ b/joinpbx.cpp
@@ -255,8 +255,8 @@ JoinPBX::JoinPBX(class Endpoint *epoint) : Join()
j_pid = getpid();
j_updatebridge = 0;
j_partyline = 0;
- j_multicause = CAUSE_NOUSER;
- j_multilocation = LOCATION_PRIVATE_LOCAL;
+ j_multicause = 0;
+ j_multilocation = 0;
/* initialize a relation only to the calling interface */
relation = j_relation = (struct join_relation *)MALLOC(sizeof(struct join_relation));
@@ -791,7 +791,10 @@ void JoinPBX::message_epoint(unsigned long epoint_id, int message_type, union pa
case RELATION_TYPE_SETUP: /* by called */
/* collect cause and send collected cause */
collect_cause(&j_multicause, &j_multilocation, param->disconnectinfo.cause, param->disconnectinfo.location);
- release(relation, j_multilocation, j_multicause);
+ if (j_multicause)
+ release(relation, j_multilocation, j_multicause);
+ else
+ release(relation, LOCATION_PRIVATE_LOCAL, CAUSE_UNSPECIFIED);
break;
case RELATION_TYPE_CALLING: /* by calling */