提交 4ae41dd1 authored 作者: Chris Rienzo's avatar Chris Rienzo

mod_rayo: move alias definition to config file, tweak console command completion…

mod_rayo: move alias definition to config file, tweak console command completion to make testing easier
上级 10908a0a
......@@ -162,6 +162,7 @@ extern const char *rayo_call_get_dcp_jid(struct rayo_call *call);
#define rayo_component_init(component, pool, type, subtype, id, parent, client_jid) _rayo_component_init(component, pool, type, subtype, id, parent, client_jid, __FILE__, __LINE__)
extern struct rayo_component *_rayo_component_init(struct rayo_component *component, switch_memory_pool_t *pool, const char *type, const char *subtype, const char *id, struct rayo_actor *parent, const char *client_jid, const char *file, int line);
extern switch_bool_t is_component_actor(struct rayo_actor *);
typedef iks *(*rayo_actor_xmpp_handler)(struct rayo_actor *, struct rayo_message *, void *);
extern void rayo_actor_command_handler_add(const char *type, const char *subtype, const char *name, rayo_actor_xmpp_handler fn);
......
......@@ -40,7 +40,7 @@
struct rayo_component *rayo_component_locate(const char *id, const char *file, int line)
{
struct rayo_actor *actor = rayo_actor_locate_by_id(id, file, line);
if (actor && !strncmp(RAT_COMPONENT, actor->type, strlen(RAT_COMPONENT))) {
if (actor && is_component_actor(actor)) {
return RAYO_COMPONENT(actor);
} else if (actor) {
RAYO_UNLOCK(actor);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论