[GPRS] Make SGSN more verbose when startup fails

This commit is contained in:
Harald Welte 2010-05-19 15:46:31 +02:00
parent e4860d7c48
commit 6efc176722
1 changed files with 13 additions and 2 deletions

View File

@ -172,12 +172,23 @@ int main(int argc, char **argv)
}
rc = sgsn_gtp_init(&sgsn_inst);
if (rc)
if (rc) {
LOGP(DGPRS, LOGL_FATAL, "Cannot bind/listen on GTP socket\n");
exit(2);
}
rc = gprs_ns_nsip_listen(sgsn_nsi);
if (rc)
if (rc < 0) {
LOGP(DGPRS, LOGL_FATAL, "Cannot bind/listen on NSIP socket\n");
exit(2);
}
rc = gprs_ns_frgre_listen(sgsn_nsi);
if (rc < 0) {
LOGP(DGPRS, LOGL_FATAL, "Cannot bind/listen GRE "
"socket. Do you have CAP_NET_RAW?\n");
exit(2);
}
while (1) {
rc = bsc_select_main(0);