Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
59cdb885
Commit
59cdb885
authored
Sep 01, 2014
by
jehan
Browse files
various fix for lib linphone tester on Android
parent
32c1c8b5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
38 deletions
+10
-38
build/android/liblinphone_gitversion.h
build/android/liblinphone_gitversion.h
+0
-1
coreapi/linphonecore.c
coreapi/linphonecore.c
+4
-35
tester/call_tester.c
tester/call_tester.c
+5
-0
tester/message_tester.c
tester/message_tester.c
+1
-2
No files found.
build/android/liblinphone_gitversion.h
deleted
100644 → 0
View file @
32c1c8b5
#define LIBLINPHONE_GIT_VERSION "unknown"
coreapi/linphonecore.c
View file @
59cdb885
...
...
@@ -40,7 +40,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "liblinphone_gitversion.h"
#ifndef ANDROID
/*on Android LIBLINPHONE version is passed from root Makefile*/
#include "liblinphone_gitversion.h"
#endif
#else
#ifndef LIBLINPHONE_GIT_VERSION
#define LIBLINPHONE_GIT_VERSION "unknown"
...
...
@@ -1598,28 +1600,8 @@ int linphone_core_get_sip_port(LinphoneCore *lc)
return
tr
.
udp_port
>
0
?
tr
.
udp_port
:
(
tr
.
tcp_port
>
0
?
tr
.
tcp_port
:
tr
.
tls_port
);
}
#if !USE_BELLE_SIP
static
char
_ua_name
[
64
]
=
"Linphone"
;
static
char
_ua_version
[
64
]
=
LINPHONE_VERSION
;
#endif
#if HAVE_EXOSIP_GET_VERSION && !USE_BELLESIP
extern
const
char
*
eXosip_get_version
();
#endif
static
void
apply_user_agent
(
LinphoneCore
*
lc
){
#if !USE_BELLESIP
/*default user agent is handled at sal level*/
char
ua_string
[
256
];
snprintf
(
ua_string
,
sizeof
(
ua_string
)
-
1
,
"%s/%s (eXosip2/%s)"
,
_ua_name
,
_ua_version
,
#if HAVE_EXOSIP_GET_VERSION
eXosip_get_version
()
#else
"unknown"
#endif
);
if
(
lc
->
sal
)
sal_set_user_agent
(
lc
->
sal
,
ua_string
);
#endif
}
static
char
_ua_version
[
64
]
=
LIBLINPHONE_VERSION
;
/**
* Sets the user agent string used in SIP messages.
...
...
@@ -1627,27 +1609,15 @@ static void apply_user_agent(LinphoneCore *lc){
* @ingroup misc
**/
void
linphone_core_set_user_agent
(
LinphoneCore
*
lc
,
const
char
*
name
,
const
char
*
ver
){
#if USE_BELLESIP
char
ua_string
[
256
];
snprintf
(
ua_string
,
sizeof
(
ua_string
)
-
1
,
"%s/%s"
,
name
?
name
:
""
,
ver
?
ver
:
""
);
if
(
lc
->
sal
)
{
sal_set_user_agent
(
lc
->
sal
,
ua_string
);
sal_append_stack_string_to_user_agent
(
lc
->
sal
);
}
#else
strncpy
(
_ua_name
,
name
,
sizeof
(
_ua_name
)
-
1
);
strncpy
(
_ua_version
,
ver
,
sizeof
(
_ua_version
));
apply_user_agent
(
lc
);
#endif
}
const
char
*
linphone_core_get_user_agent
(
LinphoneCore
*
lc
){
#if USE_BELLESIP
return
sal_get_user_agent
(
lc
->
sal
);
#else
static
char
ua_buffer
[
255
]
=
{
0
};
snprintf
(
ua_buffer
,
"%s/%s"
,
_ua_name
,
_ua_version
,
254
);
return
ua_buffer
;
#endif
}
const
char
*
linphone_core_get_user_agent_name
(
void
){
...
...
@@ -1705,7 +1675,6 @@ static int apply_transports(LinphoneCore *lc){
}
}
}
apply_user_agent
(
lc
);
return
0
;
}
...
...
tester/call_tester.c
View file @
59cdb885
...
...
@@ -454,10 +454,15 @@ static void call_with_specified_codec_bitrate(void) {
#ifdef __arm__
if
(
ms_get_cpu_count
()
<
2
)
{
/*2 opus codec channel + resampler is too much for a single core*/
#ifndef ANDROID
codec
=
"speex"
;
rate
=
8000
;
min_bw
=
20
;
max_bw
=
35
;
#else
CU_PASS
(
"Test requires at least a dual core"
);
goto
end
;
#endif
}
#endif
...
...
tester/message_tester.c
View file @
59cdb885
...
...
@@ -66,10 +66,9 @@ void file_transfer_received(LinphoneCore *lc, LinphoneChatMessage *message, cons
FILE
*
file
=
NULL
;
char
receive_file
[
256
];
snprintf
(
receive_file
,
sizeof
(
receive_file
),
"%s/receive_file.dump"
,
liblinphone_tester_writable_dir_prefix
);
if
(
!
linphone_chat_message_get_user_data
(
message
))
{
/*first chunk, creating file*/
file
=
fopen
(
"
receive_file
.dump"
,
"wb"
);
file
=
fopen
(
receive_file
,
"wb"
);
linphone_chat_message_set_user_data
(
message
,(
void
*
)
file
);
/*store fd for next chunks*/
}
else
{
/*next chunk*/
...
...
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