Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-UDR
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-UDR
Commits
394fca1b
Commit
394fca1b
authored
Jun 21, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code cleanup
parent
789c6c85
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
112 deletions
+0
-112
src/oai_udr/main_old.cpp
src/oai_udr/main_old.cpp
+0
-74
src/udr_app/CMakeLists.txt_old
src/udr_app/CMakeLists.txt_old
+0
-38
No files found.
src/oai_udr/main_old.cpp
deleted
100644 → 0
View file @
789c6c85
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this
*file except in compliance with the License. You may obtain a copy of the
*License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! file
brief
author Jian Yang,Fengjiao He,Hongxin Wang
date 2020
email: contact@openairinterface.org
*/
#include "logger.hpp"
#include "options.hpp"
#include "udr_config.hpp"
#include "udr_server.hpp"
using
namespace
config
;
udr_config
udr_cfg
;
int
main
(
int
argc
,
char
**
argv
)
{
if
(
!
Options
::
parse
(
argc
,
argv
))
{
std
::
cout
<<
"Options::parse() failed"
<<
std
::
endl
;
return
1
;
}
Logger
::
init
(
"UDR"
,
Options
::
getlogStdout
(),
Options
::
getlogRotFilelog
());
Logger
::
udr_app
().
startup
(
"Options parsed!"
);
// add config file
udr_cfg
.
load
(
Options
::
getlibconfigConfig
());
udr_cfg
.
display
();
Logger
::
udr_app
().
debug
(
"Initiating UDR server endpoints"
);
// Pistache::Address addr(Pistache::Ipv4::any(), Pistache::Port(8080));
Pistache
::
Address
addr
(
udr_cfg
.
nudr
.
addr4
,
Pistache
::
Port
(
udr_cfg
.
nudr
.
port
));
MYSQL
mysql
;
mysql_init
(
&
mysql
);
if
(
!
mysql_real_connect
(
&
mysql
,
udr_cfg
.
mysql
.
mysql_server
.
c_str
(),
udr_cfg
.
mysql
.
mysql_user
.
c_str
(),
udr_cfg
.
mysql
.
mysql_pass
.
c_str
(),
udr_cfg
.
mysql
.
mysql_db
.
c_str
(),
0
,
0
,
0
))
{
Logger
::
udr_app
().
error
(
"An error occurred while connecting to db: %s"
,
mysql_error
(
&
mysql
));
return
0
;
}
UDRApiServer
udrApiServer
(
addr
,
&
mysql
);
udrApiServer
.
init
(
PISTACHE_SERVER_THREADS
);
std
::
thread
udr_api_manager
(
&
UDRApiServer
::
start
,
udrApiServer
);
Logger
::
udr_app
().
debug
(
"Initiating Done!"
);
pause
();
mysql_close
(
&
mysql
);
return
0
;
}
src/udr_app/CMakeLists.txt_old
deleted
100644 → 0
View file @
789c6c85
cmake_minimum_required (VERSION 3.2)
project(udr)
if (CMAKE_OPENXGUDR_BUILD_TYPE STREQUAL Debug)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -DDEBUG_IS_ON=1 -DTRACE_IS_ON=1 -DINFO_IS_ON=1")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
endif()
include(ExternalProject)
set(EXTERNAL_INSTALL_LOCATION ${CMAKE_OPENXGUDR_DIR}/build/ext)
set(SRC_DIR ${CMAKE_OPENXGUDR_DIR}/src)
include_directories(${EXTERNAL_INSTALL_LOCATION}/include)
link_directories(${EXTERNAL_INSTALL_LOCATION}/lib)
include_directories(${SRC_DIR}/model)
include_directories(${SRC_DIR}/api)
include_directories(${SRC_DIR}/impl)
include_directories(${SRC_DIR}/common)
include_directories(${SRC_DIR}/udr_app)
# ${CMAKE_CURRENT_SOURCE_DIR}
file(GLOB SRCS
${SRC_DIR}/api/*.cpp
${SRC_DIR}/impl/*.cpp
${SRC_DIR}/model/*.cpp
${SRC_DIR}/common/*.cpp
${SRC_DIR}/udr_app/*.cpp
${EXTERNAL_INSTALL_LOCATION}/build/src/spdlog/*.cpp
)
add_executable(${PROJECT_NAME} ${SRCS} )
target_link_libraries(${PROJECT_NAME} pistache pthread mysqlclient config++)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment