xcap_server: proper test of retun code for add lump rpl
authorDaniel-Constantin Mierla <miconda@gmail.com>
Fri, 21 Jul 2017 11:50:07 +0000 (13:50 +0200)
committerDaniel-Constantin Mierla <miconda@gmail.com>
Fri, 21 Jul 2017 11:50:07 +0000 (13:50 +0200)
src/modules/xcap_server/xcap_server.c

index 86f7816..15c5a91 100644 (file)
@@ -284,7 +284,7 @@ static int xcaps_send_reply(sip_msg_t *msg, int code, str *reason,
        }
        if(body && body->len>0)
        {
-               if (add_lump_rpl(msg, body->s, body->len, LUMP_RPL_BODY) < 0)
+               if (add_lump_rpl(msg, body->s, body->len, LUMP_RPL_BODY) == 0)
                {
                        LM_ERR("Error while adding reply lump\n");
                        return -1;