Revert Jim's earlier "fix" :)
[asterisk/asterisk.git] / autoservice.c
index 0082ea8..df4973a 100755 (executable)
@@ -147,7 +147,7 @@ int ast_autoservice_stop(struct ast_channel *chan)
                pthread_kill(asthread, SIGURG);
        ast_mutex_unlock(&autolock);
        /* Wait for it to un-block */
-       while(chan->blocking)
+       while(ast_test_flag(chan, AST_FLAG_BLOCKING))
                usleep(1000);
        return res;
 }