summaryrefslogtreecommitdiffstats
path: root/joinpbx.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'joinpbx.cpp')
-rw-r--r--joinpbx.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/joinpbx.cpp b/joinpbx.cpp
index 5c686dc..dd54e9b 100644
--- a/joinpbx.cpp
+++ b/joinpbx.cpp
@@ -525,7 +525,7 @@ int joinpbx_countrelations(unsigned int join_id)
if (!join)
return(0);
- if (join->j_type != JOIN_TYPE_REMOTE)
+ if (join->j_type == JOIN_TYPE_REMOTE)
return(2);
if (join->j_type != JOIN_TYPE_PBX)
@@ -635,6 +635,9 @@ void JoinPBX::message_epoint(unsigned int epoint_id, int message_type, union par
return;
}
+ /* count relations */
+ num=joinpbx_countrelations(j_serial);
+
/* process party line */
if (message_type == MESSAGE_SETUP) if (param->setup.partyline && !j_partyline) {
j_partyline = param->setup.partyline;
@@ -783,7 +786,12 @@ void JoinPBX::message_epoint(unsigned int epoint_id, int message_type, union par
release(j_relation, LOCATION_PRIVATE_LOCAL, CAUSE_NORMAL);
return; // must return, because join IS destroyed
}
- /* remove all relations that are in called */
+ /* in a conf, we don't kill the other members */
+ if (num > 2) {
+ release(relation, 0, 0);
+ return;
+ }
+ /* remove all relations that are of called type */
release_again2:
reltemp = j_relation;
while(reltemp) {
@@ -809,9 +817,6 @@ void JoinPBX::message_epoint(unsigned int epoint_id, int message_type, union par
return; // must return, because join may be destroyed
}
- /* count relations */
- num=joinpbx_countrelations(j_serial);
-
/* check number of relations */
if (num > 2) {
PDEBUG(DEBUG_JOIN, "join has more than two relations so there is no need to send a message.\n");