X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=blobdiff_plain;f=joinpbx.cpp;h=dd54e9ba8e366d6e84781dc700f402a14ed16cd5;hp=5c686dcdb3afe7296920d7cf91bcc84016859cc2;hb=2188efe2cc9dfb473bf41540960382d7c43b892e;hpb=e9bfe48fc5254e79e59c6ffc1698912175edf4e3 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");