-
Notifications
You must be signed in to change notification settings - Fork 937
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nats: add KEMI publish function and event_callback param #3154
Conversation
Thanks for the pull request. @seven1240 to generate locally - see here http://www.kamailio.org/wiki/devel/module-docbook-readme |
I updated the doc and squashed into one commit. |
@eschmidbauer: any comments on this PR? |
src/modules/nats/nats_mod.c
Outdated
@@ -73,39 +79,36 @@ static void onMsg( | |||
natsConnection *nc, natsSubscription *sub, natsMsg *msg, void *closure) | |||
{ | |||
nats_on_message_ptr on_message = (nats_on_message_ptr)closure; | |||
char *s = (char *)natsMsg_GetSubject(msg); | |||
// char *s = (char *)natsMsg_GetSubject(msg); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we remove this comment?
} | ||
} else { | ||
run_top_route(event_rt.rlist[rt], fmsg, 0); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (rt < 0 && keng) {
if (sr_kemi_route(keng, fmsg, EVENT_ROUTE, &nats_event_callback, evname) < 0) {
LM_ERR("error running event route kemi callback\n");
}
return 0;
}
run_top_route(event_rt.rlist[rt], fmsg, 0);
return 0;
src/modules/nats/nats_mod.h
Outdated
@@ -30,6 +30,7 @@ | |||
#include "../json/api.h" | |||
#include "../../core/cfg/cfg_struct.h" | |||
#include "../../core/fmsg.h" | |||
// #include "../../core/str.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we remove this commented code ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a few minor comments - otherwise looks good.
thank you!
Thanks. updated as suggested and squashed and rebased to the latest master. |
I see @eschmidbauer approved the changes, therefore I merge it. |
(cherry picked from commit 25d42b7)
Pre-Submission Checklist
in
doc/
subfolder, the README file is autogenerated)Type Of Change
Checklist:
Description
event_callback
KEMI param like in other modulesKSR.nats.publish
I can fix module doc if it looks good. How to generate docs locally btw?