diff --git a/coreapi/address.c b/coreapi/address.c index cd2542808..bb50fe30a 100644 --- a/coreapi/address.c +++ b/coreapi/address.c @@ -32,7 +32,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. **/ LinphoneAddress * linphone_address_new(const char *addr){ SalAddress *saddr=sal_address_new(addr); - if (saddr==NULL) ms_error("Cannot create LinphoneAddress, bad uri [%s]",addr); + if (saddr==NULL) + ms_error("Cannot create LinphoneAddress, bad uri [%s]",addr); return saddr; } diff --git a/coreapi/bellesip_sal/sal_op_presence.c b/coreapi/bellesip_sal/sal_op_presence.c index 836cc11c6..c7f548e18 100644 --- a/coreapi/bellesip_sal/sal_op_presence.c +++ b/coreapi/bellesip_sal/sal_op_presence.c @@ -201,8 +201,9 @@ static void handle_notify(SalOp *op, belle_sip_request_t *req){ } else { sub_state=SalSubscribeActive; } + resp = sal_op_create_response_from_request(op, req, 200); /*answer first because the op may be destroyed by notify_presence */ op->base.root->callbacks.notify_presence(op, sub_state, presence_model, NULL); - resp = sal_op_create_response_from_request(op, req, 200); + } else { /* Formatting error in presence notification body. */ ms_error("Wrongly formatted presence notification received");