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
1c1ad846
Commit
1c1ad846
authored
May 07, 2018
by
Benjamin REIS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix testers
parent
2fad0db4
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
45 additions
and
28 deletions
+45
-28
linphonecore.c
coreapi/linphonecore.c
+2
-3
private_functions.h
coreapi/private_functions.h
+1
-1
c-content.cpp
src/c-wrapper/api/c-content.cpp
+4
-4
client-group-chat-room.cpp
src/chat/chat-room/client-group-chat-room.cpp
+6
-5
client-group-chat-room.h
src/chat/chat-room/client-group-chat-room.h
+2
-1
local-conference-event-handler.cpp
src/conference/handlers/local-conference-event-handler.cpp
+5
-2
local-conference-list-event-handler.cpp
...nference/handlers/local-conference-list-event-handler.cpp
+8
-7
remote-conference-event-handler-p.h
src/conference/handlers/remote-conference-event-handler-p.h
+1
-0
remote-conference-event-handler.h
src/conference/handlers/remote-conference-event-handler.h
+1
-0
remote-conference-list-event-handler.cpp
...ference/handlers/remote-conference-list-event-handler.cpp
+9
-1
content-manager.cpp
src/content/content-manager.cpp
+2
-1
main-db.cpp
src/db/main-db.cpp
+2
-1
group_chat_tester.c
tester/group_chat_tester.c
+1
-1
local_tester_hosts
tester/local_tester_hosts
+1
-1
No files found.
coreapi/linphonecore.c
View file @
1c1ad846
...
...
@@ -2178,10 +2178,9 @@ static void _linphone_core_conference_subscribe_received(LinphoneCore *lc, Linph
IdentityAddress
(
*
L_GET_CPP_PTR_FROM_C_OBJECT
(
resource
)),
IdentityAddress
(
*
L_GET_CPP_PTR_FROM_C_OBJECT
(
resource
))
));
if
(
chatRoom
)
{
linphone_event_accept_subscription
(
lev
);
if
(
chatRoom
)
L_GET_PRIVATE
(
static_pointer_cast
<
ServerGroupChatRoom
>
(
chatRoom
))
->
subscribeReceived
(
lev
);
}
else
else
linphone_event_deny_subscription
(
lev
,
LinphoneReasonDeclined
);
}
...
...
coreapi/private_functions.h
View file @
1c1ad846
...
...
@@ -384,7 +384,7 @@ void linphone_configure_op(LinphoneCore *lc, LinphonePrivate::SalOp *op, const L
void
linphone_configure_op_with_proxy
(
LinphoneCore
*
lc
,
LinphonePrivate
::
SalOp
*
op
,
const
LinphoneAddress
*
dest
,
SalCustomHeader
*
headers
,
bool_t
with_contact
,
LinphoneProxyConfig
*
proxy
);
LinphoneContent
*
linphone_content_new
(
void
);
LinphoneContent
*
linphone_content_copy
(
const
LinphoneContent
*
ref
);
SalBodyHandler
*
sal_body_handler_from_content
(
const
LinphoneContent
*
content
);
SalBodyHandler
*
sal_body_handler_from_content
(
const
LinphoneContent
*
content
,
bool
parseMultipart
=
true
);
SalReason
linphone_reason_to_sal
(
LinphoneReason
reason
);
LinphoneReason
linphone_reason_from_sal
(
SalReason
reason
);
void
linphone_error_info_to_sal
(
const
LinphoneErrorInfo
*
ei
,
SalErrorInfo
*
sei
);
...
...
src/c-wrapper/api/c-content.cpp
View file @
1c1ad846
...
...
@@ -211,7 +211,7 @@ const char *linphone_content_get_key(const LinphoneContent *content) {
const
LinphonePrivate
::
FileTransferContent
*
ftc
=
static_cast
<
const
LinphonePrivate
::
FileTransferContent
*>
(
c
);
content
->
key
=
ms_strdup
(
ftc
->
getFileKeyAsString
());
}
return
content
->
key
;
}
...
...
@@ -259,7 +259,7 @@ static LinphoneContent * linphone_content_new_with_body_handler(SalBodyHandler *
linphone_content_set_string_buffer
(
content
,
body
);
belle_sip_free
(
body
);
}
belle_sip_list_t
*
headers
=
(
belle_sip_list_t
*
)
sal_body_handler_get_headers
(
body_handler
);
while
(
headers
)
{
belle_sip_header_t
*
cHeader
=
BELLE_SIP_HEADER
(
headers
->
data
);
...
...
@@ -297,13 +297,13 @@ LinphoneContent * linphone_content_from_sal_body_handler(SalBodyHandler *body_ha
return
NULL
;
}
SalBodyHandler
*
sal_body_handler_from_content
(
const
LinphoneContent
*
content
)
{
SalBodyHandler
*
sal_body_handler_from_content
(
const
LinphoneContent
*
content
,
bool
parseMultipart
)
{
if
(
content
==
NULL
)
return
NULL
;
SalBodyHandler
*
body_handler
;
LinphonePrivate
::
ContentType
contentType
=
L_GET_CPP_PTR_FROM_C_OBJECT
(
content
)
->
getContentType
();
if
(
contentType
.
isMultipart
())
{
if
(
contentType
.
isMultipart
()
&&
parseMultipart
)
{
size_t
size
=
linphone_content_get_size
(
content
);
char
*
buffer
=
ms_strdup
(
L_GET_CPP_PTR_FROM_C_OBJECT
(
content
)
->
getBodyAsUtf8String
().
c_str
());
const
char
*
boundary
=
L_STRING_TO_C
(
contentType
.
getParameter
(
"boundary"
).
getValue
());
...
...
src/chat/chat-room/client-group-chat-room.cpp
View file @
1c1ad846
...
...
@@ -258,7 +258,8 @@ ClientGroupChatRoom::ClientGroupChatRoom (
AbstractChatRoom
::
CapabilitiesMask
capabilities
,
const
string
&
subject
,
list
<
shared_ptr
<
Participant
>>
&&
participants
,
unsigned
int
lastNotifyId
unsigned
int
lastNotifyId
,
bool
hasBeenLeft
)
:
ChatRoom
(
*
new
ClientGroupChatRoomPrivate
,
core
,
chatRoomId
),
RemoteConference
(
core
,
me
->
getAddress
(),
nullptr
)
{
L_D
();
...
...
@@ -276,7 +277,8 @@ RemoteConference(core, me->getAddress(), nullptr) {
dConference
->
eventHandler
->
setChatRoomId
(
chatRoomId
);
dConference
->
eventHandler
->
setLastNotify
(
lastNotifyId
);
getCore
()
->
getPrivate
()
->
remoteListEventHandler
->
addHandler
(
dConference
->
eventHandler
.
get
());
if
(
!
hasBeenLeft
)
getCore
()
->
getPrivate
()
->
remoteListEventHandler
->
addHandler
(
dConference
->
eventHandler
.
get
());
}
ClientGroupChatRoom
::~
ClientGroupChatRoom
()
{
...
...
@@ -498,8 +500,7 @@ void ClientGroupChatRoom::leave () {
L_D
();
L_D_T
(
RemoteConference
,
dConference
);
dConference
->
eventHandler
->
unsubscribe
();
dConference
->
eventHandler
->
getPrivate
()
->
lev
=
nullptr
;
shared_ptr
<
CallSession
>
session
=
dConference
->
focus
->
getPrivate
()
->
getSession
();
if
(
session
)
session
->
terminate
();
...
...
@@ -534,7 +535,7 @@ void ClientGroupChatRoom::onConferenceTerminated (const IdentityAddress &addr) {
L_D
();
L_D_T
(
RemoteConference
,
dConference
);
dConference
->
eventHandler
->
unsubscribe
()
;
dConference
->
eventHandler
->
getPrivate
()
->
lev
=
nullptr
;
dConference
->
eventHandler
->
resetLastNotify
();
d
->
setState
(
ChatRoom
::
State
::
Terminated
);
d
->
addEvent
(
make_shared
<
ConferenceEvent
>
(
...
...
src/chat/chat-room/client-group-chat-room.h
View file @
1c1ad846
...
...
@@ -54,7 +54,8 @@ public:
AbstractChatRoom
::
CapabilitiesMask
capabilities
,
const
std
::
string
&
subject
,
std
::
list
<
std
::
shared_ptr
<
Participant
>>
&&
participants
,
unsigned
int
lastNotifyId
unsigned
int
lastNotifyId
,
bool
hasBeenLeft
=
false
);
~
ClientGroupChatRoom
();
...
...
src/conference/handlers/local-conference-event-handler.cpp
View file @
1c1ad846
...
...
@@ -410,6 +410,7 @@ void LocalConferenceEventHandler::subscribeReceived (LinphoneEvent *lev, bool on
bctbx_free
(
addrStr
);
if
(
!
participant
)
{
lError
()
<<
"received SUBSCRIBE corresponds to no participant of the conference; "
<<
d
->
conf
->
getConferenceAddress
().
asString
()
<<
", no NOTIFY sent."
;
linphone_event_deny_subscription
(
lev
,
LinphoneReasonDeclined
);
return
;
}
...
...
@@ -418,16 +419,18 @@ void LocalConferenceEventHandler::subscribeReceived (LinphoneEvent *lev, bool on
IdentityAddress
contactAddr
(
contactAddrStr
);
bctbx_free
(
contactAddrStr
);
shared_ptr
<
ParticipantDevice
>
device
=
participant
->
getPrivate
()
->
findDevice
(
contactAddr
);
if
(
!
device
)
{
if
(
!
device
||
(
device
->
getState
()
!=
ParticipantDevice
::
State
::
Present
&&
device
->
getState
()
!=
ParticipantDevice
::
State
::
Joining
)
)
{
lError
()
<<
"received SUBSCRIBE for conference: "
<<
d
->
conf
->
getConferenceAddress
().
asString
()
<<
"device sending subscribe: "
<<
contactAddr
.
asString
()
<<
" is not known, no NOTIFY sent."
;
linphone_event_deny_subscription
(
lev
,
LinphoneReasonDeclined
);
return
;
}
linphone_event_accept_subscription
(
lev
);
if
(
linphone_event_get_subscription_state
(
lev
)
==
LinphoneSubscriptionActive
)
{
unsigned
int
lastNotify
=
static_cast
<
unsigned
int
>
(
Utils
::
stoi
(
linphone_event_get_custom_header
(
lev
,
"Last-Notify-Version"
)));
device
->
setConferenceSubscribeEvent
(
lev
);
if
(
lastNotify
==
0
)
{
if
(
lastNotify
==
0
||
(
device
->
getState
()
==
ParticipantDevice
::
State
::
Joining
)
)
{
lInfo
()
<<
"Sending initial notify of conference:"
<<
d
->
conf
->
getConferenceAddress
().
asString
()
<<
" to: "
<<
device
->
getAddress
().
asString
();
d
->
notifyFullState
(
d
->
createNotifyFullState
(
static_cast
<
int
>
(
d
->
lastNotify
),
oneToOne
),
device
);
}
else
if
(
lastNotify
<
d
->
lastNotify
)
{
...
...
src/conference/handlers/local-conference-list-event-handler.cpp
View file @
1c1ad846
...
...
@@ -54,8 +54,6 @@ namespace {
void
LocalConferenceListEventHandler
::
subscribeReceived
(
LinphoneEvent
*
lev
,
const
LinphoneContent
*
body
)
{
LinphoneSubscriptionState
subscriptionState
=
linphone_event_get_subscription_state
(
lev
);
if
(
subscriptionState
!=
LinphoneSubscriptionIncomingReceived
&&
subscriptionState
!=
LinphoneSubscriptionTerminated
)
return
;
const
string
&
xmlBody
=
string
(
linphone_content_get_string_buffer
(
body
));
if
(
xmlBody
.
empty
())
{
...
...
@@ -63,6 +61,11 @@ void LocalConferenceListEventHandler::subscribeReceived (LinphoneEvent *lev, con
return
;
}
linphone_event_accept_subscription
(
lev
);
if
(
subscriptionState
!=
LinphoneSubscriptionIncomingReceived
&&
subscriptionState
!=
LinphoneSubscriptionTerminated
)
return
;
const
LinphoneAddress
*
lAddr
=
linphone_event_get_from
(
lev
);
char
*
addrStr
=
linphone_address_as_string
(
lAddr
);
IdentityAddress
participantAddr
(
addrStr
);
...
...
@@ -110,7 +113,7 @@ void LocalConferenceListEventHandler::subscribeReceived (LinphoneEvent *lev, con
continue
;
}
shared_ptr
<
ParticipantDevice
>
device
=
participant
->
getPrivate
()
->
findDevice
(
deviceAddr
);
if
(
!
device
)
{
if
(
!
device
||
(
device
->
getState
()
!=
ParticipantDevice
::
State
::
Present
&&
device
->
getState
()
!=
ParticipantDevice
::
State
::
Joining
)
)
{
lError
()
<<
"Received subscribe for unknown device: "
<<
deviceAddr
<<
" for participant: "
<<
participantAddr
<<
" for chat room: "
<<
chatRoomId
;
continue
;
...
...
@@ -134,6 +137,7 @@ void LocalConferenceListEventHandler::subscribeReceived (LinphoneEvent *lev, con
char
token
[
17
];
belle_sip_random_token
(
token
,
sizeof
(
token
));
content
->
addHeader
(
"Content-Id"
,
token
);
content
->
addHeader
(
"Content-Length"
,
Utils
::
toString
(
notifyBody
.
size
()));
contents
.
push_back
(
content
);
// Add entry into the Rlmi content of the notify body
...
...
@@ -146,11 +150,8 @@ void LocalConferenceListEventHandler::subscribeReceived (LinphoneEvent *lev, con
}
}
if
(
noContent
)
{
linphone_event_deny_subscription
(
lev
,
LinphoneReasonDeclined
);
if
(
noContent
)
return
;
}
linphone_event_accept_subscription
(
lev
);
Xsd
::
Rlmi
::
List
list
(
""
,
0
,
TRUE
);
list
.
setResource
(
resources
);
...
...
src/conference/handlers/remote-conference-event-handler-p.h
View file @
1c1ad846
...
...
@@ -32,6 +32,7 @@
LINPHONE_BEGIN_NAMESPACE
class
RemoteConferenceEventHandlerPrivate
:
public
ObjectPrivate
,
public
CoreListener
{
friend
class
ClientGroupChatRoom
;
private
:
void
simpleNotifyReceived
(
const
std
::
string
&
xmlBody
);
void
subscribe
();
...
...
src/conference/handlers/remote-conference-event-handler.h
View file @
1c1ad846
...
...
@@ -31,6 +31,7 @@ class RemoteConference;
class
RemoteConferenceEventHandlerPrivate
;
class
RemoteConferenceEventHandler
:
public
Object
{
friend
class
ClientGroupChatRoom
;
public
:
RemoteConferenceEventHandler
(
RemoteConference
*
remoteConference
);
~
RemoteConferenceEventHandler
();
...
...
src/conference/handlers/remote-conference-list-event-handler.cpp
View file @
1c1ad846
...
...
@@ -76,7 +76,15 @@ void RemoteConferenceListEventHandler::subscribe () {
Xsd
::
ResourceLists
::
ResourceLists
rl
=
Xsd
::
ResourceLists
::
ResourceLists
();
Xsd
::
ResourceLists
::
ListType
l
=
Xsd
::
ResourceLists
::
ListType
();
for
(
const
auto
&
handler
:
handlers
)
{
Address
addr
=
handler
->
getChatRoomId
().
getPeerAddress
();
const
ChatRoomId
&
chatRoomId
=
handler
->
getChatRoomId
();
shared_ptr
<
AbstractChatRoom
>
cr
=
getCore
()
->
findChatRoom
(
chatRoomId
);
if
(
!
cr
)
continue
;
if
(
cr
->
hasBeenLeft
())
continue
;
Address
addr
=
chatRoomId
.
getPeerAddress
();
addr
.
setUriParam
(
"Last-Notify"
,
Utils
::
toString
(
handler
->
getLastNotify
()));
Xsd
::
ResourceLists
::
EntryType
entry
=
Xsd
::
ResourceLists
::
EntryType
(
addr
.
asStringUriOnly
());
l
.
getEntry
().
push_back
(
entry
);
...
...
src/content/content-manager.cpp
View file @
1c1ad846
...
...
@@ -62,8 +62,9 @@ Content ContentManager::contentListToMultipart (const list<Content *> &contents,
for
(
Content
*
content
:
contents
)
{
LinphoneContent
*
cContent
=
L_GET_C_BACK_PTR
(
content
);
SalBodyHandler
*
sbh
=
sal_body_handler_
from_content
(
cContent
);
SalBodyHandler
*
sbh
=
sal_body_handler_
ref
(
sal_body_handler_from_content
(
cContent
,
false
)
);
belle_sip_multipart_body_handler_add_part
(
mpbh
,
BELLE_SIP_BODY_HANDLER
(
sbh
));
sal_body_handler_unref
(
sbh
);
linphone_content_unref
(
cContent
);
}
...
...
src/db/main-db.cpp
View file @
1c1ad846
...
...
@@ -2399,7 +2399,8 @@ list<shared_ptr<AbstractChatRoom>> MainDb::getChatRooms () const {
capabilities
,
subject
,
move
(
participants
),
lastNotifyId
lastNotifyId
,
hasBeenLeft
);
AbstractChatRoomPrivate
*
dChatRoom
=
chatRoom
->
getPrivate
();
dChatRoom
->
setState
(
ChatRoom
::
State
::
Instantiated
);
...
...
tester/group_chat_tester.c
View file @
1c1ad846
...
...
@@ -1543,7 +1543,7 @@ static void group_chat_room_reinvited_after_removed_base (bool_t offline_when_re
coresManagerList
=
bctbx_list_append
(
coresManagerList
,
laure
);
}
if
(
!
offline_when_reinvited
)
BC_ASSERT_TRUE
(
wait_for_list
(
coresList
,
&
laure
->
stat
.
number_of_LinphoneChatRoomStateTerminated
,
initialLaureStats
.
number_of_LinphoneChatRoomStateTerminated
+
1
,
3
000
));
BC_ASSERT_TRUE
(
wait_for_list
(
coresList
,
&
laure
->
stat
.
number_of_LinphoneChatRoomStateTerminated
,
initialLaureStats
.
number_of_LinphoneChatRoomStateTerminated
+
1
,
5
000
));
wait_for_list
(
coresList
,
0
,
1
,
2000
);
initialLaureStats
=
laure
->
stat
;
...
...
tester/local_tester_hosts
View file @
1c1ad846
127.0.0.1 sip2.linphone.org sip.example.org sipopen.example.org auth.example.org auth1.example.org auth2.example.org altname.linphone.org sip.wildcard1.linphone.org altname.wildcard2.linphone.org sipv4.example.org conf.example.org
::1 sip2.linphone.org sip.example.org sipopen.example.org auth.example.org auth1.example.org auth2.example.org altname.linphone.org sip.wildcard1.linphone.org altname.wildcard2.linphone.org
188.165.46.90 tunnel.wildcard2.linphone.org
64:ff9b::94.23.19.176 sipv4-nat64.example.org
64:ff9b::94.23.19.176 sipv4-nat64.example.org
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