Skip to content

Commit

Permalink
replace deprecated api of librdkafka
Browse files Browse the repository at this point in the history
  • Loading branch information
brg-liuwei authored Oct 10, 2017
1 parent ced4a32 commit 82a2fc1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ before_install:
install:
- if [ ! -d /opt ]; then mkdir /opt; fi
- if [ ! -d download-cache ]; then mkdir download-cache; fi
- if [ ! -d download-cache/librdkafka ]; then git clone -b 0.9.0 https://github.com/edenhill/librdkafka.git download-cache/librdkafka; fi
- if [ ! -d download-cache/librdkafka ]; then git clone -b v0.11.0 https://github.com/edenhill/librdkafka.git download-cache/librdkafka; fi
- if [ ! -f download-cache/nginx-$NGINX_VERSION.tar.gz ]; then wget -O download-cache/nginx-$NGINX_VERSION.tar.gz http://nginx.org/download/nginx-$NGINX_VERSION.tar.gz; fi
- if [ ! -f download-cache/openssl-$OPENSSL_VER.tar.gz ]; then wget -O download-cache/openssl-$OPENSSL_VER.tar.gz https://www.openssl.org/source/openssl-$OPENSSL_VER.tar.gz; fi
- if [ ! -f download-cache/kafka_$SCALA_VERSION-$KAFKA_VERSION.tgz ]; then wget -O download-cache/kafka_$SCALA_VERSION-$KAFKA_VERSION.tgz http://www-us.apache.org/dist/kafka/$KAFKA_VERSION/kafka_$SCALA_VERSION-$KAFKA_VERSION.tgz; fi
Expand Down
4 changes: 1 addition & 3 deletions ngx_http_kafka_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

#include <librdkafka/rdkafka.h>

#include <errno.h>

#define KAFKA_TOPIC_MAXLEN 256
#define KAFKA_BROKER_MAXLEN 512

Expand Down Expand Up @@ -455,7 +453,7 @@ static void ngx_http_kafka_post_callback_handler(ngx_http_request_t *r)
RD_KAFKA_MSG_F_COPY, (void *)msg, len, NULL, 0, conn_log);
if (rc != 0) {
ngx_log_error(NGX_LOG_ERR, conn_log, 0,
rd_kafka_err2str(rd_kafka_errno2err(errno)));
rd_kafka_err2str(rd_kafka_last_error()));

err_msg = (u_char *)KAFKA_ERR_PRODUCER;
err_msg_size = sizeof(KAFKA_ERR_PRODUCER);
Expand Down

0 comments on commit 82a2fc1

Please sign in to comment.