Skip to content

Commit

Permalink
smpp: at least one listener is mandatory for this module
Browse files Browse the repository at this point in the history
Thanks go to Slava Bendersky (volga629 on GitHub) for reporting this
Close #1723
  • Loading branch information
razvancrainea committed Jun 10, 2019
1 parent 1ba8fda commit bb072f6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions modules/proto_smpp/proto_smpp.c
Expand Up @@ -152,6 +152,13 @@ static int mod_init(void)
db_url.len = strlen(db_url.s);
smpp_outbound_uri.len = strlen(smpp_outbound_uri.s);

/* if we don't have a listener, we won't be able to connect, or send
* enquiries, therefore it's mandatory to have at least one */
if (!proto_has_listeners(PROTO_SMPP)) {
LM_ERR("at least one listener is mandatory for using the SMPP module!\n");
return -1;
}

if (smpp_db_init(&db_url) < 0)
return -1;

Expand Down

0 comments on commit bb072f6

Please sign in to comment.