plugins/out_kafka/librdkafka-1.5.0/src/rdkafka_admin.c
static void rd_kafka_admin_common_worker_destroy (rd_kafka_t *rk,
                                                  rd_kafka_op_t *rko) {
        int timer_was_stopped;

        /* Free resources for this op. */
        timer_was_stopped =
                rd_kafka_timer_stop(&rk->rk_timers,
                                    &rko->rko_u.admin_request.tmr, rd_true);


        if (rko->rko_u.admin_request.eonce) {
                /* Remove the stopped timer's eonce reference since its
                 * callback will not have fired if we stopped the timer. */
                if (timer_was_stopped)
                        rd_kafka_enq_once_del_source(rko->rko_u.admin_request.
                                                     eonce, "timeout timer");

                /* This is thread-safe to do even if there are outstanding
                 * timers or wait-controller references to the eonce
                 * since they only hold direct reference to the eonce,
                 * not the rko (the eonce holds a reference to the rko but
                 * it is cleared here). */
                rd_kafka_enq_once_destroy(rko->rko_u.admin_request.eonce);
                rko->rko_u.admin_request.eonce = NULL;
        }
}
/**
 * @brief Common worker destroy to be called in destroy: label
 *        in worker.
 */
@brief Common worker destroy to be called in destroy: label
in worker.
@brief Common worker destroy to be called in destroy : label in worker .
static void rd_kafka_admin_common_worker_destroy (rd_kafka_t *rk,
                                                  rd_kafka_op_t *rko) {
        int timer_was_stopped;
        timer_was_stopped =
                rd_kafka_timer_stop(&rk->rk_timers,
                                    &rko->rko_u.admin_request.tmr, rd_true);
        if (rko->rko_u.admin_request.eonce) {
                if (timer_was_stopped)
                        rd_kafka_enq_once_del_source(rko->rko_u.admin_request.
                                                     eonce, "timeout timer");
                rd_kafka_enq_once_destroy(rko->rko_u.admin_request.eonce);
                rko->rko_u.admin_request.eonce = NULL;
        }
}
static void rd_kafka_admin_common_worker_destroy ( rd_kafka_t * rk , rd_kafka_op_t * rko ) { int timer_was_stopped ; timer_was_stopped = rd_kafka_timer_stop ( & rk -> rk_timers , & rko -> rko_u . admin_request . tmr , rd_true ) ; if ( rko -> rko_u . admin_request . eonce ) { if ( timer_was_stopped ) rd_kafka_enq_once_del_source ( rko -> rko_u . admin_request . eonce , " " ) ; rd_kafka_enq_once_destroy ( rko -> rko_u . admin_request . eonce ) ; rko -> rko_u . admin_request . eonce = NULL ; } }
@brief Common worker destroy to be called in destroy: label
        in worker.
@brief Common worker destroy to be called in destroy : label in worker .
/* Free resources for this op. */ /* Remove the stopped timer's eonce reference since its
                 * callback will not have fired if we stopped the timer. */ /* This is thread-safe to do even if there are outstanding
                 * timers or wait-controller references to the eonce
                 * since they only hold direct reference to the eonce,
                 * not the rko (the eonce holds a reference to the rko but
                 * it is cleared here). */