Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
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
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
Michael Black
OpenXG UE
Commits
308baec0
Commit
308baec0
authored
Aug 23, 2016
by
Frédéric Leroy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor(conf2uedata): add make_plmn_from_conf()
parent
2bb97342
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
10 deletions
+23
-10
openair3/NAS/TOOLS/conf2uedata.c
openair3/NAS/TOOLS/conf2uedata.c
+23
-10
No files found.
openair3/NAS/TOOLS/conf2uedata.c
View file @
308baec0
...
@@ -300,27 +300,40 @@ int get_plmn_index(const char * mccmnc) {
...
@@ -300,27 +300,40 @@ int get_plmn_index(const char * mccmnc) {
return
-
1
;
return
-
1
;
}
}
plmn_t
make_plmn_from_conf
(
const
plmn_conf_param_t
*
plmn_conf
)
{
plmn_t
plmn
;
char
num
[
6
];
memset
(
&
plmn
,
0xff
,
sizeof
(
plmn
));
snprintf
(
num
,
6
,
"%s%s"
,
plmn_conf
->
mcc
,
plmn_conf
->
mnc
);
plmn
.
MCCdigit2
=
plmn_conf
->
mcc
[
1
];
plmn
.
MCCdigit1
=
plmn_conf
->
mcc
[
0
];
plmn
.
MCCdigit3
=
plmn_conf
->
mcc
[
2
];
plmn
.
MNCdigit2
=
plmn_conf
->
mnc
[
1
];
plmn
.
MNCdigit1
=
plmn_conf
->
mnc
[
0
];
if
(
strlen
(
plmn_conf
->
mnc
)
>
2
)
{
plmn
.
MNCdigit3
=
plmn_conf
->
mnc
[
2
];
}
return
plmn
;
}
void
fill_network_record_list
()
{
void
fill_network_record_list
()
{
for
(
int
i
=
0
;
i
<
plmn_nb
;
i
++
)
{
for
(
int
i
=
0
;
i
<
plmn_nb
;
i
++
)
{
strcpy
(
user_network_record_list
[
i
].
fullname
,
strcpy
(
user_network_record_list
[
i
].
fullname
,
user_plmn_list
[
i
].
fullname
);
user_plmn_list
[
i
].
fullname
);
strcpy
(
user_network_record_list
[
i
].
shortname
,
strcpy
(
user_network_record_list
[
i
].
shortname
,
user_plmn_list
[
i
].
shortname
);
user_plmn_list
[
i
].
shortname
);
char
num
[
6
];
char
num
[
6
];
sprintf
(
num
,
"%s%s"
,
user_plmn_list
[
i
].
mcc
,
user_plmn_list
[
i
].
mnc
);
sprintf
(
num
,
"%s%s"
,
user_plmn_list
[
i
].
mcc
,
user_plmn_list
[
i
].
mnc
);
user_network_record_list
[
i
].
num
=
atoi
(
num
);
user_network_record_list
[
i
].
num
=
atoi
(
num
);
user_network_record_list
[
i
].
plmn
.
MCCdigit2
=
user_plmn_list
[
i
].
mcc
[
1
];
user_network_record_list
[
i
].
plmn
.
MCCdigit1
=
user_plmn_list
[
i
].
mcc
[
0
];
user_network_record_list
[
i
].
plmn
=
make_plmn_from_conf
(
&
user_plmn_list
[
i
]);
user_network_record_list
[
i
].
plmn
.
MCCdigit3
=
user_plmn_list
[
i
].
mcc
[
2
];
user_network_record_list
[
i
].
plmn
.
MNCdigit2
=
user_plmn_list
[
i
].
mnc
[
1
];
user_network_record_list
[
i
].
plmn
.
MNCdigit1
=
user_plmn_list
[
i
].
mnc
[
0
];
user_network_record_list
[
i
].
tac_end
=
0xfffd
;
user_network_record_list
[
i
].
tac_end
=
0xfffd
;
user_network_record_list
[
i
].
tac_start
=
0x0001
;
user_network_record_list
[
i
].
tac_start
=
0x0001
;
if
(
strlen
(
user_plmn_list
[
i
].
mnc
)
>
2
)
{
user_network_record_list
[
i
].
plmn
.
MNCdigit3
=
user_plmn_list
[
i
].
mnc
[
2
];
}
}
}
}
}
...
...
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