<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi Opensips developers,<div>While going through media_exchang.c code:</div><div><br></div><div><div>static int b2b_media_notify(struct sip_msg *msg, str *key, int type,</div><div>                str *logic_key, void *param, int flags)</div><div>{</div></div><div>....</div><div><div>terminate:</div><div>        <b>MEDIA_LEG_LOCK(msl);</b></div><div>        if (initial_state == MEDIA_SESSION_STATE_INIT) {</div><div>                /* this is the initial leg, not a re-invite */</div><div>                <b>MEDIA_LEG_UNLOCK(msl);</b></div><div>                handle_media_session_negative(msl);</div><div>        } else {</div><div>                <b>MEDIA_LEG_UNLOCK(msl);</b></div><div>        }</div><div>        return -1;</div><div>}</div></div><div><br></div><div>there is no point in lock and unlock above.... unless the first unlock is supposed to be after handle_media_session_negative(msl);?</div><div><br></div><div>Thanks!</div></div></div></div></div>