]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
properly remove the AST_FAX_TECH_GATEWAY flag (instead of setting all of the other...
authorMatthew Nicholson <mnicholson@digium.com>
Mon, 3 Oct 2011 15:19:44 +0000 (15:19 +0000)
committerMatthew Nicholson <mnicholson@digium.com>
Mon, 3 Oct 2011 15:19:44 +0000 (15:19 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@339011 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_fax.c

index 5f2b693f53df1dac74f8fd1b1ff99581c512e347..d3359aea3253697b533a216d44dc2da916320eee 100644 (file)
@@ -2377,7 +2377,7 @@ static void destroy_gateway(void *data)
        if (gateway->s) {
                fax_session_release(gateway->s, gateway->token);
                gateway->token = NULL;
-               gateway->s->details->caps |= ~AST_FAX_TECH_GATEWAY;
+               gateway->s->details->caps &= ~AST_FAX_TECH_GATEWAY;
 
                ao2_lock(faxregistry.container);
                ao2_unlink(faxregistry.container, gateway->s);
@@ -2421,7 +2421,7 @@ static struct fax_gateway *fax_gateway_new(struct ast_fax_session_details *detai
 
        details->caps = AST_FAX_TECH_GATEWAY;
        if (details->gateway_timeout && !(gateway->s = fax_session_reserve(details, &gateway->token))) {
-               details->caps |= ~AST_FAX_TECH_GATEWAY;
+               details->caps &= ~AST_FAX_TECH_GATEWAY;
                ast_log(LOG_ERROR, "Can't reserve a FAX session, gateway attempt failed.\n");
                ao2_ref(gateway, -1);
                return NULL;