diff --git a/core/AmMimeBody.cpp b/core/AmMimeBody.cpp index 29e6820f..02fc94c0 100644 --- a/core/AmMimeBody.cpp +++ b/core/AmMimeBody.cpp @@ -648,6 +648,8 @@ void AmMimeBody::setHeaders(const string& hdrs) AmMimeBody* AmMimeBody::addPart(const string& content_type) { + DBG("Adding a new part to an existing body.\n"); + AmMimeBody* body = NULL; if(ct.type.empty() && ct.subtype.empty()) { // fill *this* body diff --git a/core/AmOfferAnswer.cpp b/core/AmOfferAnswer.cpp index a486c713..df12278c 100644 --- a/core/AmOfferAnswer.cpp +++ b/core/AmOfferAnswer.cpp @@ -270,31 +270,34 @@ int AmOfferAnswer::onRxSdp(unsigned int m_cseq, const AmMimeBody& body, const ch int AmOfferAnswer::onTxSdp(unsigned int m_cseq, const AmMimeBody& body) { - // assume that the payload is ok if it is not empty. - // (do not parse again self-generated SDP) - if(body.empty()){ + DBG("AmOfferAnswer::onTxSdp()\n"); + + /* assume that the payload is ok if it is not empty. + * (do not parse again self-generated SDP) */ + if (body.empty()) { + DBG("Body is empty, cannot do anything here.\n"); return -1; } - switch(state) { + switch (state) { - case OA_None: - case OA_Completed: - setState(OA_OfferSent); - cseq = m_cseq; - break; + case OA_None: + case OA_Completed: + setState(OA_OfferSent); + cseq = m_cseq; + break; - case OA_OfferRecved: - setState(OA_Completed); - break; + case OA_OfferRecved: + setState(OA_Completed); + break; - case OA_OfferSent: - // There is already a pending offer!!! - DBG("There is already a pending offer, onTxSdp fails\n"); - return -1; + case OA_OfferSent: + /* There is already a pending offer */ + DBG("There is already a pending offer, onTxSdp fails\n"); + return -1; - default: - break; + default: + break; } return 0;