Commit 5643f7a9 authored by gauthier's avatar 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)
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)) {
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);
}
break;
......@@ -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 (envP == MSC_E_UTRAN_LIPA) {
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);
}
break;
......@@ -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 ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
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);
}
break;
......@@ -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 ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
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);
}
break;
......@@ -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 ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
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);
}
break;
......@@ -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 ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
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);
}
break;
......@@ -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 ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
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);
}
break;
......@@ -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 ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
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);
}
break;
......@@ -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 ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
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);
}
break;
......@@ -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 ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
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);
}
break;
......@@ -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 ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
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);
}
break;
......@@ -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 ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
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);
}
break;
......@@ -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 ((envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
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);
}
break;
......@@ -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 ((envP == MSC_E_UTRAN) || (envP == MSC_EPC) || (envP == MSC_MME)) {
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);
}
break;
......@@ -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 ((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");
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);
}
break;
......@@ -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 ((envP == MSC_EPC) || (envP == MSC_E_UTRAN) || (envP == MSC_E_UTRAN_LIPA)) {
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);
}
break;
......@@ -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 ((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");
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);
}
break;
......@@ -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 ((envP == MSC_EPC) || (envP == MSC_MME)) {
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);
}
break;
......@@ -205,6 +223,7 @@ int msc_init(msc_env_t envP)
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;}
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);
break;
case MSC_NAS_EMM_MME:
......@@ -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 ((envP == MSC_EPC) || (envP == MSC_MME)) {
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);
}
break;
......@@ -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 ((envP == MSC_EPC) || (envP == MSC_MME)) {
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);
}
break;
......@@ -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 (envP == MSC_EPC) {
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);
}
break;
......@@ -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 (envP == MSC_MME) {
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);
}
break;
......@@ -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 ((envP == MSC_EPC) || (envP == MSC_MME)) {
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);
}
break;
......@@ -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 ((envP == MSC_EPC) || (envP == MSC_MME)) {
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);
}
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