diff options
Diffstat (limited to 'openbsc/src/gprs/sgsn_ares.c')
-rw-r--r-- | openbsc/src/gprs/sgsn_ares.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/openbsc/src/gprs/sgsn_ares.c b/openbsc/src/gprs/sgsn_ares.c index 825b01c5b..c4012a4e3 100644 --- a/openbsc/src/gprs/sgsn_ares.c +++ b/openbsc/src/gprs/sgsn_ares.c @@ -157,10 +157,16 @@ int sgsn_ares_init(struct sgsn_instance *sgsn) optmask = ARES_OPT_FLAGS | ARES_OPT_SOCK_STATE_CB; - /*| ARES_OPT_SERVERS ... TODO..*/ + if (sgsn->ares_servers) + optmask |= ARES_OPT_SERVERS; ares_library_init(ARES_LIB_INIT_ALL); rc = ares_init_options(&sgsn->ares_channel, &options, optmask); + if (rc != ARES_SUCCESS) + return rc; + + if (sgsn->ares_servers) + rc = ares_set_servers(sgsn->ares_channel, sgsn->ares_servers); return rc; } |