Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblinphone
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
10
Issues
10
List
Board
Labels
Milestones
Merge Requests
23
Merge Requests
23
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
External Wiki
External Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
BC
public
liblinphone
Commits
795fc66a
Commit
795fc66a
authored
Jan 10, 2018
by
Ronan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(DialPlan): remove unused wrapped functions and clean code
parent
474bce2b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
19 deletions
+7
-19
proxy.c
coreapi/proxy.c
+2
-2
c-dial-plan.cpp
src/c-wrapper/api/c-dial-plan.cpp
+3
-15
dial-plan.cpp
src/dial-plan/dial-plan.cpp
+1
-1
dial-plan.h
src/dial-plan/dial-plan.h
+1
-1
No files found.
coreapi/proxy.c
View file @
795fc66a
...
@@ -660,7 +660,7 @@ char* linphone_proxy_config_normalize_phone_number(LinphoneProxyConfig *proxy, c
...
@@ -660,7 +660,7 @@ char* linphone_proxy_config_normalize_phone_number(LinphoneProxyConfig *proxy, c
ccc
=
DialPlan
::
lookupCccFromE164
(
flatten
);
ccc
=
DialPlan
::
lookupCccFromE164
(
flatten
);
if
(
ccc
>-
1
)
{
/*e164 like phone number*/
if
(
ccc
>-
1
)
{
/*e164 like phone number*/
dialplan
=
DialPlan
::
findByCcc
AsInt
(
ccc
);
dialplan
=
DialPlan
::
findByCcc
(
ccc
);
nationnal_significant_number
=
strstr
(
flatten
,
dialplan
.
getCountryCallingCode
().
c_str
());
nationnal_significant_number
=
strstr
(
flatten
,
dialplan
.
getCountryCallingCode
().
c_str
());
if
(
nationnal_significant_number
)
{
if
(
nationnal_significant_number
)
{
nationnal_significant_number
+=
strlen
(
dialplan
.
getCountryCallingCode
().
c_str
());
nationnal_significant_number
+=
strlen
(
dialplan
.
getCountryCallingCode
().
c_str
());
...
@@ -679,7 +679,7 @@ char* linphone_proxy_config_normalize_phone_number(LinphoneProxyConfig *proxy, c
...
@@ -679,7 +679,7 @@ char* linphone_proxy_config_normalize_phone_number(LinphoneProxyConfig *proxy, c
//probably generic dialplan, preserving proxy dial prefix
//probably generic dialplan, preserving proxy dial prefix
dialplan
.
setCountryCallingCode
(
tmpproxy
->
dial_prefix
);
dialplan
.
setCountryCallingCode
(
tmpproxy
->
dial_prefix
);
}
}
/*it does not make sens to try replace icp with + if we are not sure from the country we are (I.E tmpproxy->dial_prefix==NULL)*/
/*it does not make sens to try replace icp with + if we are not sure from the country we are (I.E tmpproxy->dial_prefix==NULL)*/
if
(
strstr
(
flatten
,
dialplan
.
getInternationalCallPrefix
().
c_str
())
==
flatten
)
{
if
(
strstr
(
flatten
,
dialplan
.
getInternationalCallPrefix
().
c_str
())
==
flatten
)
{
char
*
e164
=
replace_icp_with_plus
(
flatten
,
dialplan
.
getInternationalCallPrefix
().
c_str
());
char
*
e164
=
replace_icp_with_plus
(
flatten
,
dialplan
.
getInternationalCallPrefix
().
c_str
());
...
...
src/c-wrapper/api/c-dial-plan.cpp
View file @
795fc66a
...
@@ -29,14 +29,6 @@ using namespace std;
...
@@ -29,14 +29,6 @@ using namespace std;
L_DECLARE_C_CLONABLE_OBJECT_IMPL
(
DialPlan
);
L_DECLARE_C_CLONABLE_OBJECT_IMPL
(
DialPlan
);
LinphoneDialPlan
*
linphone_dial_plan_ref
(
LinphoneDialPlan
*
dp
)
{
return
reinterpret_cast
<
LinphoneDialPlan
*>
(
belle_sip_object_ref
(
dp
));
}
void
linphone_dial_plan_unref
(
LinphoneDialPlan
*
dp
)
{
belle_sip_object_unref
(
dp
);
}
const
char
*
linphone_dial_plan_get_country
(
const
LinphoneDialPlan
*
dp
)
{
const
char
*
linphone_dial_plan_get_country
(
const
LinphoneDialPlan
*
dp
)
{
return
L_STRING_TO_C
(
L_GET_CPP_PTR_FROM_C_OBJECT
(
dp
)
->
getCountry
());
return
L_STRING_TO_C
(
L_GET_CPP_PTR_FROM_C_OBJECT
(
dp
)
->
getCountry
());
}
}
...
@@ -66,21 +58,17 @@ int linphone_dial_plan_lookup_ccc_from_iso (const char *iso) {
...
@@ -66,21 +58,17 @@ int linphone_dial_plan_lookup_ccc_from_iso (const char *iso) {
}
}
const
LinphoneDialPlan
*
linphone_dial_plan_by_ccc_as_int
(
int
ccc
)
{
const
LinphoneDialPlan
*
linphone_dial_plan_by_ccc_as_int
(
int
ccc
)
{
const
LinphonePrivate
::
DialPlan
&
dp
=
LinphonePrivate
::
DialPlan
::
findByCccAsInt
(
ccc
);
static
const
LinphonePrivate
::
DialPlan
&
dp
=
LinphonePrivate
::
DialPlan
::
findByCcc
(
ccc
);
return
L_GET_C_BACK_PTR
(
&
dp
);
return
L_GET_C_BACK_PTR
(
&
dp
);
}
}
const
LinphoneDialPlan
*
linphone_dial_plan_by_ccc
(
const
char
*
ccc
)
{
const
LinphoneDialPlan
*
linphone_dial_plan_by_ccc
(
const
char
*
ccc
)
{
const
LinphonePrivate
::
DialPlan
&
dp
=
LinphonePrivate
::
DialPlan
::
findByCcc
(
L_C_TO_STRING
(
ccc
));
static
const
LinphonePrivate
::
DialPlan
&
dp
=
LinphonePrivate
::
DialPlan
::
findByCcc
(
L_C_TO_STRING
(
ccc
));
return
L_GET_C_BACK_PTR
(
&
dp
);
return
L_GET_C_BACK_PTR
(
&
dp
);
}
}
const
LinphoneDialPlan
*
linphone_dial_plan_get_all
()
{
return
nullptr
;
}
const
bctbx_list_t
*
linphone_dial_plan_get_all_list
()
{
const
bctbx_list_t
*
linphone_dial_plan_get_all_list
()
{
const
list
<
LinphonePrivate
::
DialPlan
>
&
dps
=
LinphonePrivate
::
DialPlan
::
getAllDialPlans
();
static
const
list
<
LinphonePrivate
::
DialPlan
>
&
dps
=
LinphonePrivate
::
DialPlan
::
getAllDialPlans
();
return
L_GET_RESOLVED_C_LIST_FROM_CPP_LIST
(
dps
);
return
L_GET_RESOLVED_C_LIST_FROM_CPP_LIST
(
dps
);
}
}
...
...
src/dial-plan/dial-plan.cpp
View file @
795fc66a
...
@@ -379,7 +379,7 @@ int DialPlan::lookupCccFromIso (const string &iso) {
...
@@ -379,7 +379,7 @@ int DialPlan::lookupCccFromIso (const string &iso) {
return
-
1
;
return
-
1
;
}
}
const
DialPlan
&
DialPlan
::
findByCcc
AsInt
(
int
ccc
)
{
const
DialPlan
&
DialPlan
::
findByCcc
(
int
ccc
)
{
return
DialPlan
::
findByCcc
(
Utils
::
toString
(
ccc
));
return
DialPlan
::
findByCcc
(
Utils
::
toString
(
ccc
));
}
}
...
...
src/dial-plan/dial-plan.h
View file @
795fc66a
...
@@ -55,7 +55,7 @@ public:
...
@@ -55,7 +55,7 @@ public:
static
int
lookupCccFromE164
(
const
std
::
string
&
e164
);
static
int
lookupCccFromE164
(
const
std
::
string
&
e164
);
static
int
lookupCccFromIso
(
const
std
::
string
&
iso
);
static
int
lookupCccFromIso
(
const
std
::
string
&
iso
);
static
const
DialPlan
&
findByCcc
AsInt
(
int
ccc
);
static
const
DialPlan
&
findByCcc
(
int
ccc
);
static
const
DialPlan
&
findByCcc
(
const
std
::
string
&
ccc
);
static
const
DialPlan
&
findByCcc
(
const
std
::
string
&
ccc
);
static
const
std
::
list
<
DialPlan
>
&
getAllDialPlans
();
static
const
std
::
list
<
DialPlan
>
&
getAllDialPlans
();
...
...
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