Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
trackrdrd
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
trackrdrd
Commits
0559be0f
Commit
0559be0f
authored
May 31, 2014
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MQ Kafka plugin: fail if "topic" is not configured
parent
2210e95e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
mq.c
trackrdrd/src/mq/kafka/mq.c
+7
-2
No files found.
trackrdrd/src/mq/kafka/mq.c
View file @
0559be0f
...
...
@@ -71,7 +71,7 @@ static FILE *zoologf;
static
zhandle_t
*
zh
;
static
unsigned
zoo_timeout
=
0
;
static
char
topic
[
LINE_MAX
];
static
char
topic
[
LINE_MAX
]
=
""
;
static
rd_kafka_topic_conf_t
*
topic_conf
;
static
rd_kafka_conf_t
*
conf
;
...
...
@@ -349,7 +349,6 @@ conf_add(const char *lval, const char *rval)
return
(
0
);
}
/* XXX: fail if "topic" is not set */
const
char
*
MQ_GlobalInit
(
unsigned
nworkers
,
const
char
*
config_fname
)
{
...
...
@@ -384,6 +383,12 @@ MQ_GlobalInit(unsigned nworkers, const char *config_fname)
return
errmsg
;
}
if
(
topic
[
0
]
==
'\0'
)
{
snprintf
(
errmsg
,
LINE_MAX
,
"topic not set in %s"
,
config_fname
);
MQ_LOG_Log
(
LOG_ERR
,
errmsg
);
return
errmsg
;
}
workers
=
(
kafka_wrk_t
**
)
calloc
(
sizeof
(
kafka_wrk_t
*
),
nworkers
);
if
(
workers
==
NULL
)
{
snprintf
(
errmsg
,
LINE_MAX
,
"Cannot allocate worker table: %s"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment