Commit 5643f7a9 authored by Lionel Gauthier's avatar Lionel Gauthier

stderr out for fopen

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7279 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 92c7c808
...@@ -62,6 +62,7 @@ int msc_init(msc_env_t envP) ...@@ -62,6 +62,7 @@ int msc_init(msc_env_t envP)
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;} if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) { if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
msc_fd[i] = fopen("/tmp/openair.msc.ip_ue.log","w"); msc_fd[i] = fopen("/tmp/openair.msc.ip_ue.log","w");
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.ip_ue.log : %s", strerror(errno));
msc_log_declare_proto(i); msc_log_declare_proto(i);
} }
break; break;
...@@ -70,6 +71,7 @@ int msc_init(msc_env_t envP) ...@@ -70,6 +71,7 @@ int msc_init(msc_env_t envP)
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;} if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
if (envP == MSC_E_UTRAN_LIPA) { if (envP == MSC_E_UTRAN_LIPA) {
msc_fd[i] = fopen("/tmp/openair.msc.ip_enb.log","w"); msc_fd[i] = fopen("/tmp/openair.msc.ip_enb.log","w");
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.ip_enb.log : %s", strerror(errno));
msc_log_declare_proto(i); msc_log_declare_proto(i);
} }
break; break;
...@@ -78,6 +80,7 @@ int msc_init(msc_env_t envP) ...@@ -78,6 +80,7 @@ int msc_init(msc_env_t envP)
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;} if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) { if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
msc_fd[i] = fopen("/tmp/openair.msc.nas_ue.log","w"); msc_fd[i] = fopen("/tmp/openair.msc.nas_ue.log","w");
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.nas_ue.log : %s", strerror(errno));
msc_log_declare_proto(i); msc_log_declare_proto(i);
} }
break; break;
...@@ -86,6 +89,7 @@ int msc_init(msc_env_t envP) ...@@ -86,6 +89,7 @@ int msc_init(msc_env_t envP)
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;} if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) { if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
msc_fd[i] = fopen("/tmp/openair.msc.rrc_ue.log","w"); msc_fd[i] = fopen("/tmp/openair.msc.rrc_ue.log","w");
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.rrc_ue.log : %s", strerror(errno));
msc_log_declare_proto(i); msc_log_declare_proto(i);
} }
break; break;
...@@ -94,6 +98,7 @@ int msc_init(msc_env_t envP) ...@@ -94,6 +98,7 @@ int msc_init(msc_env_t envP)
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;} if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) { if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
msc_fd[i] = fopen("/tmp/openair.msc.pdcp_ue.log","w"); msc_fd[i] = fopen("/tmp/openair.msc.pdcp_ue.log","w");
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.pdcp_ue.log : %s", strerror(errno));
msc_log_declare_proto(i); msc_log_declare_proto(i);
} }
break; break;
...@@ -102,6 +107,7 @@ int msc_init(msc_env_t envP) ...@@ -102,6 +107,7 @@ int msc_init(msc_env_t envP)
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;} if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) { if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
msc_fd[i] = fopen("/tmp/openair.msc.rlc_ue.log","w"); msc_fd[i] = fopen("/tmp/openair.msc.rlc_ue.log","w");
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.rlc_ue.log : %s", strerror(errno));
msc_log_declare_proto(i); msc_log_declare_proto(i);
} }
break; break;
...@@ -110,6 +116,7 @@ int msc_init(msc_env_t envP) ...@@ -110,6 +116,7 @@ int msc_init(msc_env_t envP)
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;} if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) { if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
msc_fd[i] = fopen("/tmp/openair.msc.mac_ue.log","w"); msc_fd[i] = fopen("/tmp/openair.msc.mac_ue.log","w");
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.mac_ue.log : %s", strerror(errno));
msc_log_declare_proto(i); msc_log_declare_proto(i);
} }
break; break;
...@@ -118,6 +125,7 @@ int msc_init(msc_env_t envP) ...@@ -118,6 +125,7 @@ int msc_init(msc_env_t envP)
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;} if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) { if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
msc_fd[i] = fopen("/tmp/openair.msc.phy_ue.log","w"); msc_fd[i] = fopen("/tmp/openair.msc.phy_ue.log","w");
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.phy_ue.log : %s", strerror(errno));
msc_log_declare_proto(i); msc_log_declare_proto(i);
} }
break; break;
...@@ -126,6 +134,7 @@ int msc_init(msc_env_t envP) ...@@ -126,6 +134,7 @@ int msc_init(msc_env_t envP)
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;} if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) { if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
msc_fd[i] = fopen("/tmp/openair.msc.phy_enb.log","w"); msc_fd[i] = fopen("/tmp/openair.msc.phy_enb.log","w");
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.phy_enb.log : %s", strerror(errno));
msc_log_declare_proto(i); msc_log_declare_proto(i);
} }
break; break;
...@@ -134,6 +143,7 @@ int msc_init(msc_env_t envP) ...@@ -134,6 +143,7 @@ int msc_init(msc_env_t envP)
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;} if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) { if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
msc_fd[i] = fopen("/tmp/openair.msc.mac_enb.log","w"); msc_fd[i] = fopen("/tmp/openair.msc.mac_enb.log","w");
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.mac_enb.log : %s", strerror(errno));
msc_log_declare_proto(i); msc_log_declare_proto(i);
} }
break; break;
...@@ -142,6 +152,7 @@ int msc_init(msc_env_t envP) ...@@ -142,6 +152,7 @@ int msc_init(msc_env_t envP)
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;} if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) { if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
msc_fd[i] = fopen("/tmp/openair.msc.rlc_enb.log","w"); msc_fd[i] = fopen("/tmp/openair.msc.rlc_enb.log","w");
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.rlc_enb.log : %s", strerror(errno));
msc_log_declare_proto(i); msc_log_declare_proto(i);
} }
break; break;
...@@ -150,6 +161,7 @@ int msc_init(msc_env_t envP) ...@@ -150,6 +161,7 @@ int msc_init(msc_env_t envP)
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;} if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) { if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
msc_fd[i] = fopen("/tmp/openair.msc.pdcp_enb.log","w"); msc_fd[i] = fopen("/tmp/openair.msc.pdcp_enb.log","w");
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.pdcp_enb.log : %s", strerror(errno));
msc_log_declare_proto(i); msc_log_declare_proto(i);
} }
break; break;
...@@ -158,6 +170,7 @@ int msc_init(msc_env_t envP) ...@@ -158,6 +170,7 @@ int msc_init(msc_env_t envP)
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;} if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) { if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
msc_fd[i] = fopen("/tmp/openair.msc.rrc_enb.log","w"); msc_fd[i] = fopen("/tmp/openair.msc.rrc_enb.log","w");
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.rrc_enb.log : %s", strerror(errno));
msc_log_declare_proto(i); msc_log_declare_proto(i);
} }
break; break;
...@@ -166,6 +179,7 @@ int msc_init(msc_env_t envP) ...@@ -166,6 +179,7 @@ int msc_init(msc_env_t envP)
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;} if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
if ((envP == MSC_E_UTRAN) || (envP == MSC_EPC) || (envP == MSC_MME)) { if ((envP == MSC_E_UTRAN) || (envP == MSC_EPC) || (envP == MSC_MME)) {
msc_fd[i] = fopen("/tmp/openair.msc.s1ap_enb.log","w"); msc_fd[i] = fopen("/tmp/openair.msc.s1ap_enb.log","w");
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.s1ap_enb.log : %s", strerror(errno));
msc_log_declare_proto(i); msc_log_declare_proto(i);
} }
break; break;
...@@ -174,6 +188,7 @@ int msc_init(msc_env_t envP) ...@@ -174,6 +188,7 @@ int msc_init(msc_env_t envP)
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;} if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA) || (envP == MSC_EPC) || (envP == MSC_SP_GW)) { if ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA) || (envP == MSC_EPC) || (envP == MSC_SP_GW)) {
msc_fd[i] = fopen("/tmp/openair.msc.gtpu_enb.log","w"); msc_fd[i] = fopen("/tmp/openair.msc.gtpu_enb.log","w");
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.gtpu_enb.log : %s", strerror(errno));
msc_log_declare_proto(i); msc_log_declare_proto(i);
} }
break; break;
...@@ -182,6 +197,7 @@ int msc_init(msc_env_t envP) ...@@ -182,6 +197,7 @@ int msc_init(msc_env_t envP)
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;} if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
if ((envP == MSC_EPC) || (envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) { if ((envP == MSC_EPC) || (envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
msc_fd[i] = fopen("/tmp/openair.msc.gtpu_sgw.log","w"); msc_fd[i] = fopen("/tmp/openair.msc.gtpu_sgw.log","w");
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.gtpu_sgw.log : %s", strerror(errno));
msc_log_declare_proto(i); msc_log_declare_proto(i);
} }
break; break;
...@@ -190,6 +206,7 @@ int msc_init(msc_env_t envP) ...@@ -190,6 +206,7 @@ int msc_init(msc_env_t envP)
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;} if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
if ((envP == MSC_EPC) || (envP == MSC_MME) || (envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) { if ((envP == MSC_EPC) || (envP == MSC_MME) || (envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
msc_fd[i] = fopen("/tmp/openair.msc.s1ap_mme.log","w"); msc_fd[i] = fopen("/tmp/openair.msc.s1ap_mme.log","w");
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.s1ap_mme.log : %s", strerror(errno));
msc_log_declare_proto(i); msc_log_declare_proto(i);
} }
break; break;
...@@ -198,6 +215,7 @@ int msc_init(msc_env_t envP) ...@@ -198,6 +215,7 @@ int msc_init(msc_env_t envP)
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;} if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
if ((envP == MSC_EPC) || (envP == MSC_MME)) { if ((envP == MSC_EPC) || (envP == MSC_MME)) {
msc_fd[i] = fopen("/tmp/openair.msc.mme_app.log","w"); msc_fd[i] = fopen("/tmp/openair.msc.mme_app.log","w");
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.mme_app.log : %s", strerror(errno));
msc_log_declare_proto(i); msc_log_declare_proto(i);
} }
break; break;
...@@ -205,6 +223,7 @@ int msc_init(msc_env_t envP) ...@@ -205,6 +223,7 @@ int msc_init(msc_env_t envP)
rv = snprintf(&msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "NAS_MME"); rv = snprintf(&msc_proto2str[i][0], MSC_MAX_PROTO_NAME_LENGTH, "NAS_MME");
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;} if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
msc_fd[i] = fopen("/tmp/openair.msc.nas_mme.log","w"); msc_fd[i] = fopen("/tmp/openair.msc.nas_mme.log","w");
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.nas_mme.log : %s", strerror(errno));
msc_log_declare_proto(i); msc_log_declare_proto(i);
break; break;
case MSC_NAS_EMM_MME: case MSC_NAS_EMM_MME:
...@@ -212,6 +231,7 @@ int msc_init(msc_env_t envP) ...@@ -212,6 +231,7 @@ int msc_init(msc_env_t envP)
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;} if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
if ((envP == MSC_EPC) || (envP == MSC_MME)) { if ((envP == MSC_EPC) || (envP == MSC_MME)) {
msc_fd[i] = fopen("/tmp/openair.msc.nas_emm_mme.log","w"); msc_fd[i] = fopen("/tmp/openair.msc.nas_emm_mme.log","w");
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.nas_emm_mme.log : %s", strerror(errno));
msc_log_declare_proto(i); msc_log_declare_proto(i);
} }
break; break;
...@@ -220,6 +240,7 @@ int msc_init(msc_env_t envP) ...@@ -220,6 +240,7 @@ int msc_init(msc_env_t envP)
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;} if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
if ((envP == MSC_EPC) || (envP == MSC_MME)) { if ((envP == MSC_EPC) || (envP == MSC_MME)) {
msc_fd[i] = fopen("/tmp/openair.msc.nas_esm_mme.log","w"); msc_fd[i] = fopen("/tmp/openair.msc.nas_esm_mme.log","w");
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.nas_esm_mme.log : %s", strerror(errno));
msc_log_declare_proto(i); msc_log_declare_proto(i);
} }
break; break;
...@@ -228,6 +249,7 @@ int msc_init(msc_env_t envP) ...@@ -228,6 +249,7 @@ int msc_init(msc_env_t envP)
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;} if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
if (envP == MSC_EPC) { if (envP == MSC_EPC) {
msc_fd[i] = fopen("/tmp/openair.msc.spgwapp_mme.log","w"); msc_fd[i] = fopen("/tmp/openair.msc.spgwapp_mme.log","w");
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.spgwapp_mme.log : %s", strerror(errno));
msc_log_declare_proto(i); msc_log_declare_proto(i);
} }
break; break;
...@@ -236,6 +258,7 @@ int msc_init(msc_env_t envP) ...@@ -236,6 +258,7 @@ int msc_init(msc_env_t envP)
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;} if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
if (envP == MSC_MME) { if (envP == MSC_MME) {
msc_fd[i] = fopen("/tmp/openair.msc.s11_mme.log","w"); msc_fd[i] = fopen("/tmp/openair.msc.s11_mme.log","w");
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.s11_mme.log : %s", strerror(errno));
msc_log_declare_proto(i); msc_log_declare_proto(i);
} }
break; break;
...@@ -244,6 +267,7 @@ int msc_init(msc_env_t envP) ...@@ -244,6 +267,7 @@ int msc_init(msc_env_t envP)
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;} if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
if ((envP == MSC_EPC) || (envP == MSC_MME)) { if ((envP == MSC_EPC) || (envP == MSC_MME)) {
msc_fd[i] = fopen("/tmp/openair.msc.s6a_mme.log","w"); msc_fd[i] = fopen("/tmp/openair.msc.s6a_mme.log","w");
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.s6a_mme.log : %s", strerror(errno));
msc_log_declare_proto(i); msc_log_declare_proto(i);
} }
break; break;
...@@ -252,6 +276,7 @@ int msc_init(msc_env_t envP) ...@@ -252,6 +276,7 @@ int msc_init(msc_env_t envP)
if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;} if (rv >= MSC_MAX_PROTO_NAME_LENGTH) {msc_proto2str[i][MSC_MAX_PROTO_NAME_LENGTH-1] = 0;}
if ((envP == MSC_EPC) || (envP == MSC_MME)) { if ((envP == MSC_EPC) || (envP == MSC_MME)) {
msc_fd[i] = fopen("/tmp/openair.msc.hss.log","w"); msc_fd[i] = fopen("/tmp/openair.msc.hss.log","w");
if (msc_fd[i] == NULL) fprintf(stderr, "Could not open MSC log file /tmp/openair.msc.hss.log : %s", strerror(errno));
msc_log_declare_proto(i); msc_log_declare_proto(i);
} }
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment