Commit 3bd3f452 authored by Laurent THOMAS's avatar Laurent THOMAS

:( remove sanitize=address option, fix some cppchecks

parent 8c61e9ff
...@@ -335,17 +335,12 @@ endif () ...@@ -335,17 +335,12 @@ endif ()
add_definitions("-DASN_DISABLE_OER_SUPPORT") add_definitions("-DASN_DISABLE_OER_SUPPORT")
if (build_sanitize)
set(linkasan -lasan)
set(gccasan --sanitize=address)
endif()
######################### #########################
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath -Wl,${CMAKE_CURRENT_BINARY_DIR} ${linkasan}") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath -Wl,${CMAKE_CURRENT_BINARY_DIR}")
######################### #########################
# set a flag for changes in the source code # set a flag for changes in the source code
# these changes are related to hardcoded path to include .h files # these changes are related to hardcoded path to include .h files
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} ${gccasan} -g3 -O0 -DMALLOC_CHECK_=3") set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} -g3 -O0 -DMALLOC_CHECK_=3")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS} -g3 -DMALLOC_CHECK_=3 -O2 -fno-delete-null-pointer-checks") set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS} -g3 -DMALLOC_CHECK_=3 -O2 -fno-delete-null-pointer-checks")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS} -O3") set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS} -O3")
...@@ -2910,7 +2905,7 @@ target_link_libraries (lte-softmodem ...@@ -2910,7 +2905,7 @@ target_link_libraries (lte-softmodem
RRC_LIB NR_RRC_LIB S1AP_LIB S1AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB X2AP_LIB X2AP_ENB M3AP_LIB M3AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB SCHED_RU_LIB RRC_LIB NR_RRC_LIB S1AP_LIB S1AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB X2AP_LIB X2AP_ENB M3AP_LIB M3AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB SCHED_RU_LIB
PHY_COMMON PHY PHY_RU LFDS L2 L2_LTE NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB MISC_NFAPI_LTE_LIB LFDS7 PHY_COMMON PHY PHY_RU LFDS L2 L2_LTE NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB MISC_NFAPI_LTE_LIB LFDS7
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} ${FSPT_MSG_LIB} ${PROTO_AGENT_LIB} ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} ${FSPT_MSG_LIB} ${PROTO_AGENT_LIB}
-Wl,--end-group z dl ${linkasan}) -Wl,--end-group z dl)
target_link_libraries (lte-softmodem ${LIBXML2_LIBRARIES}) target_link_libraries (lte-softmodem ${LIBXML2_LIBRARIES})
target_link_libraries (lte-softmodem pthread m ${CONFIG_LIB} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES}) target_link_libraries (lte-softmodem pthread m ${CONFIG_LIB} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES})
...@@ -2951,7 +2946,7 @@ target_link_libraries (ocp-enb ...@@ -2951,7 +2946,7 @@ target_link_libraries (ocp-enb
RRC_LIB NR_RRC_LIB S1AP_LIB S1AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB X2AP_LIB X2AP_ENB M3AP_LIB M3AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB SCHED_RU_LIB RRC_LIB NR_RRC_LIB S1AP_LIB S1AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB X2AP_LIB X2AP_ENB M3AP_LIB M3AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB SCHED_RU_LIB
PHY_COMMON PHY PHY_RU LFDS L2 L2_LTE NFAPI_COMMON_LIB NFAPI_LIB MISC_NFAPI_LTE_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB LFDS7 SIMU_COMMON PHY_COMMON PHY PHY_RU LFDS L2 L2_LTE NFAPI_COMMON_LIB NFAPI_LIB MISC_NFAPI_LTE_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB LFDS7 SIMU_COMMON
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} ${FSPT_MSG_LIB} ${PROTO_AGENT_LIB} ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} ${FSPT_MSG_LIB} ${PROTO_AGENT_LIB}
-Wl,--end-group z dl ${linkasan}) -Wl,--end-group z dl)
target_link_libraries (ocp-enb ${LIBXML2_LIBRARIES} pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${LIB_LMS_LIBRARIES} ${T_LIB}) target_link_libraries (ocp-enb ${LIBXML2_LIBRARIES} pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${LIB_LMS_LIBRARIES} ${T_LIB})
add_executable(cu_test add_executable(cu_test
...@@ -3021,7 +3016,7 @@ target_link_libraries (lte-uesoftmodem ...@@ -3021,7 +3016,7 @@ target_link_libraries (lte-uesoftmodem
GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON
PHY_UE PHY_RU LFDS L2_UE L2_LTE LFDS7 SIMU_COMMON SIMU NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB MISC_NFAPI_LTE_LIB PHY_UE PHY_RU LFDS L2_UE L2_LTE LFDS7 SIMU_COMMON SIMU NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB MISC_NFAPI_LTE_LIB
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${ATLAS_LIBRARIES} ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${ATLAS_LIBRARIES}
-Wl,--end-group z dl ${linkasan}) -Wl,--end-group z dl)
target_link_libraries (lte-uesoftmodem ${LIBXML2_LIBRARIES}) target_link_libraries (lte-uesoftmodem ${LIBXML2_LIBRARIES})
target_link_libraries (lte-uesoftmodem pthread m ${CONFIG_LIB} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${ATLAS_LIBRARIES}) target_link_libraries (lte-uesoftmodem pthread m ${CONFIG_LIB} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${ATLAS_LIBRARIES})
...@@ -3064,7 +3059,7 @@ target_link_libraries (nr-softmodem ...@@ -3064,7 +3059,7 @@ target_link_libraries (nr-softmodem
${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} RRC_LIB NR_RRC_LIB ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} RRC_LIB NR_RRC_LIB
NGAP_LIB NGAP_GNB S1AP_LIB S1AP_ENB L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB NGAP_LIB NGAP_GNB S1AP_LIB S1AP_ENB L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
X2AP_LIB X2AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB ${PROTO_AGENT_LIB} ${FSPT_MSG_LIB} X2AP_LIB X2AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB ${PROTO_AGENT_LIB} ${FSPT_MSG_LIB}
-Wl,--end-group z dl ${linkasan}) -Wl,--end-group z dl)
target_link_libraries (nr-softmodem ${LIBXML2_LIBRARIES}) target_link_libraries (nr-softmodem ${LIBXML2_LIBRARIES})
target_link_libraries (nr-softmodem pthread m ${CONFIG_LIB} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${ATLAS_LIBRARIES}) target_link_libraries (nr-softmodem pthread m ${CONFIG_LIB} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${ATLAS_LIBRARIES})
...@@ -3104,7 +3099,7 @@ target_link_libraries (ocp-gnb ...@@ -3104,7 +3099,7 @@ target_link_libraries (ocp-gnb
${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} RRC_LIB NR_RRC_LIB ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} RRC_LIB NR_RRC_LIB
NGAP_LIB NGAP_GNB S1AP_LIB S1AP_ENB L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB NGAP_LIB NGAP_GNB S1AP_LIB S1AP_ENB L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
X2AP_LIB X2AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB SIMU_COMMON X2AP_LIB X2AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB SIMU_COMMON
-Wl,--end-group z dl ${linkasan}) -Wl,--end-group z dl)
target_link_libraries (ocp-gnb ${LIBXML2_LIBRARIES} ) target_link_libraries (ocp-gnb ${LIBXML2_LIBRARIES} )
target_link_libraries (ocp-gnb pthread m ${CONFIG_LIB} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${ATLAS_LIBRARIES}) target_link_libraries (ocp-gnb pthread m ${CONFIG_LIB} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${ATLAS_LIBRARIES})
...@@ -3150,7 +3145,7 @@ target_link_libraries (nr-uesoftmodem ...@@ -3150,7 +3145,7 @@ target_link_libraries (nr-uesoftmodem
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${ATLAS_LIBRARIES} ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${ATLAS_LIBRARIES}
NFAPI_USER_LIB S1AP_LIB S1AP_ENB NFAPI_USER_LIB S1AP_LIB S1AP_ENB
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${ATLAS_LIBRARIES} LIB_5GNAS_GNB ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${ATLAS_LIBRARIES} LIB_5GNAS_GNB
-Wl,--end-group z dl ${linkasan}) -Wl,--end-group z dl)
target_link_libraries (nr-uesoftmodem ${LIBXML2_LIBRARIES}) target_link_libraries (nr-uesoftmodem ${LIBXML2_LIBRARIES})
target_link_libraries (nr-uesoftmodem pthread m ${CONFIG_LIB} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${ATLAS_LIBRARIES}) target_link_libraries (nr-uesoftmodem pthread m ${CONFIG_LIB} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${ATLAS_LIBRARIES})
...@@ -3176,7 +3171,7 @@ add_executable(dlsim_tm4 ...@@ -3176,7 +3171,7 @@ add_executable(dlsim_tm4
) )
target_link_libraries (dlsim_tm4 target_link_libraries (dlsim_tm4
-Wl,--start-group SIMU_COMMON SIMU UTIL SCHED_LIB SCHED_RU_LIB PHY LFDS ${ITTI_LIB} -Wl,--end-group -Wl,--start-group SIMU_COMMON SIMU UTIL SCHED_LIB SCHED_RU_LIB PHY LFDS ${ITTI_LIB} -Wl,--end-group
pthread m rt ${CONFIG_LIB} ${ATLAS_LIBRARIES} ${T_LIB} ${linkasan} pthread m rt ${CONFIG_LIB} ${ATLAS_LIBRARIES} ${T_LIB}
) )
add_executable(polartest add_executable(polartest
...@@ -3189,7 +3184,7 @@ add_executable(polartest ...@@ -3189,7 +3184,7 @@ add_executable(polartest
) )
target_link_libraries(polartest target_link_libraries(polartest
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR PHY_NR_COMMON PHY_NR_UE CONFIG_LIB -Wl,--end-group -Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR PHY_NR_COMMON PHY_NR_UE CONFIG_LIB -Wl,--end-group
m pthread ${ATLAS_LIBRARIES} dl ${linkasan} m pthread ${ATLAS_LIBRARIES} dl
) )
add_executable(smallblocktest add_executable(smallblocktest
...@@ -3204,7 +3199,7 @@ add_executable(smallblocktest ...@@ -3204,7 +3199,7 @@ add_executable(smallblocktest
target_link_libraries(smallblocktest target_link_libraries(smallblocktest
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_NR PHY_COMMON PHY_NR_COMMON CONFIG_LIB -Wl,--end-group -Wl,--start-group UTIL SIMU_COMMON SIMU PHY_NR PHY_COMMON PHY_NR_COMMON CONFIG_LIB -Wl,--end-group
m pthread ${ATLAS_LIBRARIES} dl ${linkasan} m pthread ${ATLAS_LIBRARIES} dl
) )
...@@ -3233,7 +3228,7 @@ if (CUDA_FOUND) ...@@ -3233,7 +3228,7 @@ if (CUDA_FOUND)
-Wl,--start-group -Wl,--start-group
LDPC_CU UTIL SIMU PHY_NR CONFIG_LIB LDPC_CU UTIL SIMU PHY_NR CONFIG_LIB
-Wl,--end-group -Wl,--end-group
m pthread ${ATLAS_LIBRARIES} dl ${linkasan} m pthread ${ATLAS_LIBRARIES} dl
) )
else (CUDA_FOUND) else (CUDA_FOUND)
...@@ -3259,7 +3254,7 @@ add_dependencies( ldpctest ldpc_orig ldpc_optim ldpc_optim8seg ldpc ) ...@@ -3259,7 +3254,7 @@ add_dependencies( ldpctest ldpc_orig ldpc_optim ldpc_optim8seg ldpc )
target_link_libraries(ldpctest target_link_libraries(ldpctest
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_NR PHY_COMMON PHY_NR_COMMON CONFIG_LIB -Wl,--end-group -Wl,--start-group UTIL SIMU_COMMON SIMU PHY_NR PHY_COMMON PHY_NR_COMMON CONFIG_LIB -Wl,--end-group
m pthread ${ATLAS_LIBRARIES} dl ${linkasan} m pthread ${ATLAS_LIBRARIES} dl
) )
add_executable(nr_dlschsim add_executable(nr_dlschsim
...@@ -3274,7 +3269,7 @@ add_executable(nr_dlschsim ...@@ -3274,7 +3269,7 @@ add_executable(nr_dlschsim
) )
target_link_libraries(nr_dlschsim target_link_libraries(nr_dlschsim
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group -Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl ${linkasan} m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl
) )
add_executable(nr_pbchsim add_executable(nr_pbchsim
...@@ -3289,7 +3284,7 @@ add_executable(nr_pbchsim ...@@ -3289,7 +3284,7 @@ add_executable(nr_pbchsim
) )
target_link_libraries(nr_pbchsim target_link_libraries(nr_pbchsim
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group -Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl ${linkasan} m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl
) )
#PUCCH ---> Prashanth #PUCCH ---> Prashanth
...@@ -3306,7 +3301,7 @@ add_executable(nr_pucchsim ...@@ -3306,7 +3301,7 @@ add_executable(nr_pucchsim
) )
target_link_libraries(nr_pucchsim target_link_libraries(nr_pucchsim
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group -Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl ${linkasan} m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl
) )
add_executable(nr_dlsim add_executable(nr_dlsim
...@@ -3325,7 +3320,7 @@ add_executable(nr_dlsim ...@@ -3325,7 +3320,7 @@ add_executable(nr_dlsim
) )
target_link_libraries(nr_dlsim target_link_libraries(nr_dlsim
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON RRC_LIB NR_RRC_LIB CONFIG_LIB L2_LTE_NR L2_NR HASHTABLE X2AP_ENB X2AP_LIB SECU_CN NGAP_GNB -Wl,--end-group -Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON RRC_LIB NR_RRC_LIB CONFIG_LIB L2_LTE_NR L2_NR HASHTABLE X2AP_ENB X2AP_LIB SECU_CN NGAP_GNB -Wl,--end-group
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl ${linkasan} m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl
) )
target_compile_definitions(nr_dlsim PUBLIC -DPHYSICAL_SIMULATOR) target_compile_definitions(nr_dlsim PUBLIC -DPHYSICAL_SIMULATOR)
...@@ -3344,7 +3339,7 @@ add_executable(nr_prachsim ...@@ -3344,7 +3339,7 @@ add_executable(nr_prachsim
${SHLIB_LOADER_SOURCES}) ${SHLIB_LOADER_SOURCES})
target_link_libraries(nr_prachsim target_link_libraries(nr_prachsim
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_RU PHY_NR_UE MAC_NR_COMMON SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON RRC_LIB NR_RRC_LIB CONFIG_LIB L2_LTE_NR L2_NR HASHTABLE X2AP_ENB X2AP_LIB SECU_CN NGAP_GNB -Wl,--end-group -Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_RU PHY_NR_UE MAC_NR_COMMON SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON RRC_LIB NR_RRC_LIB CONFIG_LIB L2_LTE_NR L2_NR HASHTABLE X2AP_ENB X2AP_LIB SECU_CN NGAP_GNB -Wl,--end-group
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl ${linkasan}) m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl)
add_executable(nr_ulschsim add_executable(nr_ulschsim
${OPENAIR1_DIR}/SIMULATION/NR_PHY/ulschsim.c ${OPENAIR1_DIR}/SIMULATION/NR_PHY/ulschsim.c
...@@ -3358,7 +3353,7 @@ add_executable(nr_ulschsim ...@@ -3358,7 +3353,7 @@ add_executable(nr_ulschsim
) )
target_link_libraries(nr_ulschsim target_link_libraries(nr_ulschsim
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group -Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl ${linkasan} m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl
) )
add_executable(nr_ulsim add_executable(nr_ulsim
...@@ -3377,7 +3372,7 @@ add_executable(nr_ulsim ...@@ -3377,7 +3372,7 @@ add_executable(nr_ulsim
) )
target_link_libraries(nr_ulsim target_link_libraries(nr_ulsim
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON RRC_LIB NR_RRC_LIB CONFIG_LIB L2_LTE_NR L2_NR HASHTABLE X2AP_ENB X2AP_LIB SECU_CN NGAP_GNB -Wl,--end-group -Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON RRC_LIB NR_RRC_LIB CONFIG_LIB L2_LTE_NR L2_NR HASHTABLE X2AP_ENB X2AP_LIB SECU_CN NGAP_GNB -Wl,--end-group
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl ${linkasan} m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl
) )
target_compile_definitions(nr_ulsim PUBLIC -DPHYSICAL_SIMULATOR) target_compile_definitions(nr_ulsim PUBLIC -DPHYSICAL_SIMULATOR)
...@@ -3397,7 +3392,7 @@ foreach(myExe dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim pr ...@@ -3397,7 +3392,7 @@ foreach(myExe dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim pr
) )
target_link_libraries (${myExe} target_link_libraries (${myExe}
-Wl,--start-group SIMU_COMMON SIMU UTIL SCHED_LIB SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_NR_COMMON PHY PHY_UE PHY_RU LFDS ${ITTI_LIB} LFDS7 -Wl,--end-group -Wl,--start-group SIMU_COMMON SIMU UTIL SCHED_LIB SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_NR_COMMON PHY PHY_UE PHY_RU LFDS ${ITTI_LIB} LFDS7 -Wl,--end-group
pthread m rt ${CONFIG_LIB} ${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${T_LIB} dl ${linkasan} pthread m rt ${CONFIG_LIB} ${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${T_LIB} dl
) )
endforeach(myExe) endforeach(myExe)
...@@ -3411,7 +3406,7 @@ add_executable(test_epc_generate_scenario ...@@ -3411,7 +3406,7 @@ add_executable(test_epc_generate_scenario
${OPENAIR3_DIR}/S1AP/s1ap_eNB_defs.h ${OPENAIR3_DIR}/S1AP/s1ap_eNB_defs.h
) )
target_link_libraries (test_epc_generate_scenario target_link_libraries (test_epc_generate_scenario
-Wl,--start-group RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB F1AP_LIB F1AP GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB PHY LFDS ${ITTI_LIB} ${MSC_LIB} L2 -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${CONFIG_LIB} ${linkasan} -Wl,--start-group RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB F1AP_LIB F1AP GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB PHY LFDS ${ITTI_LIB} ${MSC_LIB} L2 -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${CONFIG_LIB}
) )
add_executable(test_epc_play_scenario add_executable(test_epc_play_scenario
...@@ -3430,7 +3425,7 @@ add_executable(test_epc_play_scenario ...@@ -3430,7 +3425,7 @@ add_executable(test_epc_play_scenario
) )
target_include_directories(test_epc_play_scenario PUBLIC /usr/local/share/asn1c) target_include_directories(test_epc_play_scenario PUBLIC /usr/local/share/asn1c)
target_link_libraries (test_epc_play_scenario target_link_libraries (test_epc_play_scenario
-Wl,--start-group RRC_LIB S1AP_LIB X2AP_LIB X2AP_ENB M3AP_LIB M3AP_ENB F1AP_LIB F1AP GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB PHY_NR_COMMON PHY_COMMON PHY PHY_UE LFDS ${ITTI_LIB} ${MSC_LIB} -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${CONFIG_LIB} ${linkasan} -Wl,--start-group RRC_LIB S1AP_LIB X2AP_LIB X2AP_ENB M3AP_LIB M3AP_ENB F1AP_LIB F1AP GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB PHY_NR_COMMON PHY_COMMON PHY PHY_UE LFDS ${ITTI_LIB} ${MSC_LIB} -Wl,--end-group pthread m rt crypt sctp ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${CONFIG_LIB}
) )
...@@ -3450,7 +3445,7 @@ foreach(myExe s1ap ...@@ -3450,7 +3445,7 @@ foreach(myExe s1ap
${OPENAIR3_DIR}/TEST/test_${myExe}.c ${OPENAIR3_DIR}/TEST/test_${myExe}.c
) )
target_link_libraries (test_${myExe} target_link_libraries (test_${myExe}
-Wl,--start-group SECU_CN UTIL LFDS -Wl,--end-group m rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${CONFIG_LIB} ${linkasan} -Wl,--start-group SECU_CN UTIL LFDS -Wl,--end-group m rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${CONFIG_LIB}
) )
endforeach(myExe) endforeach(myExe)
...@@ -3588,7 +3583,7 @@ target_link_libraries (nr-ittisim ...@@ -3588,7 +3583,7 @@ target_link_libraries (nr-ittisim
NGAP_LIB NGAP_GNB S1AP_LIB S1AP_ENB L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB NGAP_LIB NGAP_GNB S1AP_LIB S1AP_ENB L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
X2AP_LIB X2AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB ${PROTO_AGENT_LIB} ${FSPT_MSG_LIB} X2AP_LIB X2AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB ${PROTO_AGENT_LIB} ${FSPT_MSG_LIB}
PHY_NR_UE SCHED_NR_UE_LIB NR_L2_UE PHY_NR_UE SCHED_NR_UE_LIB NR_L2_UE
-Wl,--end-group z dl ${linkasan}) -Wl,--end-group z dl)
target_link_libraries (nr-ittisim ${LIBXML2_LIBRARIES}) target_link_libraries (nr-ittisim ${LIBXML2_LIBRARIES})
target_link_libraries (nr-ittisim pthread m ${CONFIG_LIB} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${ATLAS_LIBRARIES}) target_link_libraries (nr-ittisim pthread m ${CONFIG_LIB} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${ATLAS_LIBRARIES})
......
...@@ -421,10 +421,6 @@ function main() { ...@@ -421,10 +421,6 @@ function main() {
CMAKE_CMD="$CMAKE_CMD -GNinja" CMAKE_CMD="$CMAKE_CMD -GNinja"
MAKE_CMD=ninja MAKE_CMD=ninja
shift;; shift;;
--sanitize)
CMAKE_CMD="$CMAKE_CMD -Dbuild_sanitize=1"
MAKE_CMD=ninja
shift;;
--ittiSIM) --ittiSIM)
ittiSIM=1 ittiSIM=1
ITTI_SIM="True" ITTI_SIM="True"
......
...@@ -243,7 +243,7 @@ int write_file_matlab(const char *fname, ...@@ -243,7 +243,7 @@ int write_file_matlab(const char *fname,
fprintf(fp,"%d \n",((unsigned char *)&data)[0]); fprintf(fp,"%d \n",((unsigned char *)&data)[0]);
break; break;
default: default:
AssertFatal(false, "unknown dump format: %d\n", format); AssertFatal(false, "unknown dump format: %u\n", format);
} }
if ((format != 10 && format !=11 && format !=12 && format != 13 && format != 15) || multiVec) { if ((format != 10 && format !=11 && format !=12 && format != 13 && format != 15) || multiVec) {
......
...@@ -339,7 +339,9 @@ extern "C" { ...@@ -339,7 +339,9 @@ extern "C" {
int itti_create_queue(const task_info_t *taskInfo) { int itti_create_queue(const task_info_t *taskInfo) {
pthread_mutex_lock (&lock_nb_queues); pthread_mutex_lock (&lock_nb_queues);
int newQueue=nb_queues++; int newQueue=nb_queues++;
AssertFatal(tasks=(task_list_t **) realloc(tasks, nb_queues * sizeof(*tasks)),""); task_list_t **tmp=(task_list_t **) realloc(tasks, nb_queues * sizeof(*tasks));
AssertFatal(tmp!=NULL,"");
tasks=tmp;
tasks[newQueue]= new task_list_t; tasks[newQueue]= new task_list_t;
pthread_mutex_unlock (&lock_nb_queues); pthread_mutex_unlock (&lock_nb_queues);
LOG_I(TMR,"Starting itti queue: %s as task %d\n", taskInfo->name, newQueue); LOG_I(TMR,"Starting itti queue: %s as task %d\n", taskInfo->name, newQueue);
......
...@@ -242,7 +242,7 @@ static void genericWaterFall (OAIgraph_t *graph, scopeSample_t *values, const in ...@@ -242,7 +242,7 @@ static void genericWaterFall (OAIgraph_t *graph, scopeSample_t *values, const in
for (int pix=0; pix<graph->w; pix++) { for (int pix=0; pix<graph->w; pix++) {
scopeSample_t *end=values+(pix+1)*samplesPerPixel; scopeSample_t *end=values+(pix+1)*samplesPerPixel;
end-=2; end-=2;
AssertFatal(end <= values+datasize,"diff : %ld", end-values+datasize); AssertFatal(end <= values+datasize,"diff : %lu", end-values+datasize);
double val=0; double val=0;
for (scopeSample_t *s=values+(pix)*samplesPerPixel; for (scopeSample_t *s=values+(pix)*samplesPerPixel;
......
...@@ -62,7 +62,7 @@ static double snr_dB=25; ...@@ -62,7 +62,7 @@ static double snr_dB=25;
static double sinr_dB=0; static double sinr_dB=0;
static unsigned int max_chan; static unsigned int max_chan;
static channel_desc_t **defined_channels; static channel_desc_t **defined_channels;
static char modellist_name[MAX_OPTNAME_SIZE]=""; static char modellist_name[MAX_OPTNAME_SIZE]={0};
void fill_channel_desc(channel_desc_t *chan_desc, void fill_channel_desc(channel_desc_t *chan_desc,
...@@ -227,7 +227,6 @@ double tdl_a_amps_dB[] = {-13.4, ...@@ -227,7 +227,6 @@ double tdl_a_amps_dB[] = {-13.4,
-16.6, -16.6,
-19.9, -19.9,
-29.7}; -29.7};
#define TDL_A_PATHS 23
double tdl_b_delays[] = {0.0000, double tdl_b_delays[] = {0.0000,
0.1072, 0.1072,
...@@ -276,7 +275,6 @@ double tdl_b_amps_dB[] = {0, ...@@ -276,7 +275,6 @@ double tdl_b_amps_dB[] = {0,
-14.9, -14.9,
-9.2, -9.2,
-11.3}; -11.3};
#define TDL_B_PATHS 23
double tdl_c_delays[] = {0, double tdl_c_delays[] = {0,
0.2099, 0.2099,
...@@ -327,7 +325,6 @@ double tdl_c_amps_dB[] = {-4.4, ...@@ -327,7 +325,6 @@ double tdl_c_amps_dB[] = {-4.4,
-15.7, -15.7,
-21.6, -21.6,
-22.8}; -22.8};
#define TDL_C_PATHS 24
double tdl_d_delays[] = {//0, double tdl_d_delays[] = {//0,
0, 0,
...@@ -360,7 +357,6 @@ double tdl_d_amps_dB[] = {//-0.2, ...@@ -360,7 +357,6 @@ double tdl_d_amps_dB[] = {//-0.2,
-30.0, -30.0,
-27.7}; -27.7};
#define TDL_D_PATHS 13
#define TDL_D_RICEAN_FACTOR .046774 #define TDL_D_RICEAN_FACTOR .046774
double tdl_e_delays[] = {0, double tdl_e_delays[] = {0,
...@@ -395,7 +391,6 @@ double tdl_e_amps_dB[] = {//-0.03, ...@@ -395,7 +391,6 @@ double tdl_e_amps_dB[] = {//-0.03,
-29.8, -29.8,
-29.2}; -29.2};
#define TDL_E_PATHS 14
#define TDL_E_RICEAN_FACTOR 0.0063096 #define TDL_E_RICEAN_FACTOR 0.0063096
double epa_delays[] = { 0,.03,.07,.09,.11,.19,.41}; double epa_delays[] = { 0,.03,.07,.09,.11,.19,.41};
...@@ -540,7 +535,6 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx, ...@@ -540,7 +535,6 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx,
LOG_I(OCM,"Channel Model (inside of new_channel_desc_scm)=%d\n\n", channel_model); LOG_I(OCM,"Channel Model (inside of new_channel_desc_scm)=%d\n\n", channel_model);
int tdl_paths=0; int tdl_paths=0;
double tdl_ricean_factor = 1;
double *tdl_amps_dB; double *tdl_amps_dB;
double *tdl_delays; double *tdl_delays;
...@@ -676,36 +670,32 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx, ...@@ -676,36 +670,32 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx,
break; break;
/* tapped delay line (TDL) channel model from TR 38.901 Section 7.7.2 */ /* tapped delay line (TDL) channel model from TR 38.901 Section 7.7.2 */
#define tdl_m(MoDel)\
DevAssert(sizeof(tdl_ ## MoDel ## _amps_dB) == sizeof(tdl_ ## MoDel ## _delays)); \
tdl_paths=sizeof(tdl_ ## MoDel ## _amps_dB)/sizeof(*tdl_ ## MoDel ## _amps_dB);\
tdl_delays=tdl_ ## MoDel ## _delays;\
tdl_amps_dB=tdl_ ## MoDel ## _amps_dB
case TDL_A: case TDL_A:
case TDL_B: case TDL_B:
case TDL_C: case TDL_C:
case TDL_D: case TDL_D:
case TDL_E: case TDL_E:
chan_desc->ricean_factor = 1;
if (channel_model == TDL_A) { if (channel_model == TDL_A) {
tdl_paths=TDL_A_PATHS; tdl_m(a);
tdl_delays=tdl_a_delays;
tdl_amps_dB=tdl_a_amps_dB;
}else if (channel_model == TDL_B) { }else if (channel_model == TDL_B) {
tdl_paths=TDL_B_PATHS; tdl_m(b);
tdl_delays=tdl_b_delays;
tdl_amps_dB=tdl_b_amps_dB;
} }
else if (channel_model == TDL_C) { else if (channel_model == TDL_C) {
tdl_paths=TDL_C_PATHS; tdl_m(c);
tdl_delays=tdl_c_delays;
tdl_amps_dB=tdl_c_amps_dB;
printf("Initializing TDL_C channel with %d paths\n",TDL_C_PATHS);
} else if (channel_model == TDL_D) { } else if (channel_model == TDL_D) {
tdl_paths=TDL_D_PATHS; tdl_m(d);
tdl_delays=tdl_d_delays; chan_desc->ricean_factor = TDL_D_RICEAN_FACTOR;
tdl_amps_dB=tdl_d_amps_dB;
tdl_ricean_factor = TDL_D_RICEAN_FACTOR;
} else if (channel_model == TDL_E) { } else if (channel_model == TDL_E) {
tdl_paths=TDL_E_PATHS-1; tdl_m(e);
tdl_delays=tdl_e_delays+1; chan_desc->ricean_factor = TDL_E_RICEAN_FACTOR;
tdl_amps_dB=tdl_e_amps_dB; }
tdl_ricean_factor = TDL_E_RICEAN_FACTOR;
}
int tdl_pathsby3 = tdl_paths/3; int tdl_pathsby3 = tdl_paths/3;
if ((tdl_paths%3)>0) tdl_pathsby3++; if ((tdl_paths%3)>0) tdl_pathsby3++;
...@@ -728,7 +718,6 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx, ...@@ -728,7 +718,6 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx,
tdl_delays[i] *= DS_TDL; tdl_delays[i] *= DS_TDL;
} }
chan_desc->delays = tdl_delays; chan_desc->delays = tdl_delays;
chan_desc->ricean_factor = tdl_ricean_factor;
chan_desc->aoa = 0; chan_desc->aoa = 0;
chan_desc->random_aoa = 0; chan_desc->random_aoa = 0;
chan_desc->ch = (struct complex **) malloc(nb_tx*nb_rx*sizeof(struct complex *)); chan_desc->ch = (struct complex **) malloc(nb_tx*nb_rx*sizeof(struct complex *));
...@@ -2034,7 +2023,7 @@ int load_channellist(uint8_t nb_tx, uint8_t nb_rx, double sampling_rate, double ...@@ -2034,7 +2023,7 @@ int load_channellist(uint8_t nb_tx, uint8_t nb_rx, double sampling_rate, double
paramdef_t achannel_params[] = CHANNELMOD_MODEL_PARAMS_DESC; paramdef_t achannel_params[] = CHANNELMOD_MODEL_PARAMS_DESC;
paramlist_def_t channel_list; paramlist_def_t channel_list;
memset(&channel_list,0,sizeof(paramlist_def_t)); memset(&channel_list,0,sizeof(paramlist_def_t));
strncpy(channel_list.listname,modellist_name,MAX_OPTNAME_SIZE-1); memcpy(channel_list.listname,modellist_name,sizeof(channel_list.listname)-1);
int numparams = sizeof(achannel_params)/sizeof(paramdef_t); int numparams = sizeof(achannel_params)/sizeof(paramdef_t);
config_getlist( &channel_list,achannel_params,numparams, CHANNELMOD_SECTION); config_getlist( &channel_list,achannel_params,numparams, CHANNELMOD_SECTION);
......
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