Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
9c7828d9
Commit
9c7828d9
authored
Sep 08, 2010
by
Alexandre Savard
Browse files
[#3963] Fix instant message parsing (text/plain & recipient-list)
parent
46695d5a
Changes
2
Hide whitespace changes
Inline
Side-by-side
sflphone-common/src/sip/im/InstantMessaging.cpp
View file @
9c7828d9
...
...
@@ -314,7 +314,7 @@ std::string InstantMessaging::findTextUriList (std::string& text)
size_t
end
=
text
.
find
(
boundary
,
begin
);
return
text
.
substr
(
begin
+
2
,
end
-
begin
);
return
text
.
substr
(
begin
+
2
,
end
-
begin
-
2
);
}
std
::
string
InstantMessaging
::
findTextMessage
(
std
::
string
&
text
)
...
...
@@ -328,7 +328,7 @@ std::string InstantMessaging::findTextMessage (std::string& text)
size_t
end
=
text
.
find
(
boundary
,
begin
);
return
text
.
substr
(
begin
+
2
,
end
-
begin
);
return
text
.
substr
(
begin
+
2
,
end
-
begin
-
3
);
}
...
...
sflphone-common/test/instantmessagingtest.cpp
View file @
9c7828d9
...
...
@@ -284,7 +284,7 @@ void InstantMessagingTest::testGetTextArea ()
std
::
string
message
=
_im
->
findTextMessage
(
formatedText
);
//
CPPUNIT_ASSERT(message == "Here is the text area");
CPPUNIT_ASSERT
(
message
==
"Here is the text area"
);
std
::
cout
<<
"message: "
<<
message
<<
std
::
endl
;
}
...
...
@@ -308,7 +308,7 @@ void InstantMessagingTest::testGetUriListArea ()
std
::
string
urilist
=
_im
->
findTextUriList
(
formatedText
);
//
CPPUNIT_ASSERT(urilist.compare("<?xml version=\"1.0\" encoding=\"UTF-8\"?><resource-lists xmlns=\"urn:ietf:params:xml:ns:resource-lists\" xmlns:cp=\"urn:ietf:params:xml:ns:copycontrol\"><list><entry uri=\"sip:alex@example.com\" cp:copyControl=\"to\" /><entry uri=\"sip:manu@example.com\" cp:copyControl=\"to\" /></list></resource-lists>") == 0);
CPPUNIT_ASSERT
(
urilist
.
compare
(
"<?xml version=
\"
1.0
\"
encoding=
\"
UTF-8
\"
?><resource-lists xmlns=
\"
urn:ietf:params:xml:ns:resource-lists
\"
xmlns:cp=
\"
urn:ietf:params:xml:ns:copycontrol
\"
><list><entry uri=
\"
sip:alex@example.com
\"
cp:copyControl=
\"
to
\"
/><entry uri=
\"
sip:manu@example.com
\"
cp:copyControl=
\"
to
\"
/></list></resource-lists>"
)
==
0
);
std
::
cout
<<
"urilist: "
<<
urilist
<<
std
::
endl
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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