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
48140cef
Commit
48140cef
authored
Jun 24, 2013
by
jehan
Browse files
remove unwanted quotes from LinphoenMessage external body url
parent
04f3c8af
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
coreapi/bellesip_sal/sal_op_message.c
coreapi/bellesip_sal/sal_op_message.c
+8
-1
tester/message_tester.c
tester/message_tester.c
+2
-1
No files found.
coreapi/bellesip_sal/sal_op_message.c
View file @
48140cef
...
...
@@ -108,12 +108,19 @@ static void process_request_event(void *op_base, const belle_sip_request_event_t
,
belle_sip_header_cseq_get_seq_number
(
cseq
));
salmsg
.
from
=
from
;
salmsg
.
text
=
plain_text
?
belle_sip_message_get_body
(
BELLE_SIP_MESSAGE
(
req
))
:
NULL
;
salmsg
.
url
=
external_body
?
belle_sip_parameters_get_parameter
(
BELLE_SIP_PARAMETERS
(
content_type
),
"URL"
)
:
NULL
;
salmsg
.
url
=
NULL
;
if
(
external_body
&&
belle_sip_parameters_get_parameter
(
BELLE_SIP_PARAMETERS
(
content_type
),
"URL"
))
{
size_t
url_length
=
strlen
(
belle_sip_parameters_get_parameter
(
BELLE_SIP_PARAMETERS
(
content_type
),
"URL"
));
char
*
url
=
ms_malloc
(
url_length
);
if
(
sscanf
(
belle_sip_parameters_get_parameter
(
BELLE_SIP_PARAMETERS
(
content_type
),
"URL"
),
"
\"
%s
\"
"
,
url
)
==
1
)
salmsg
.
url
=
url
;
}
salmsg
.
message_id
=
message_id
;
salmsg
.
time
=
date
?
belle_sip_header_date_get_time
(
date
)
:
time
(
NULL
);
op
->
base
.
root
->
callbacks
.
text_received
(
op
,
&
salmsg
);
belle_sip_object_unref
(
address
);
belle_sip_free
(
from
);
if
(
salmsg
.
url
)
ms_free
((
char
*
)
salmsg
.
url
);
response_code
=
200
;
}
else
{
ms_error
(
"Unsupported MESSAGE with content type [%s/%s]"
,
belle_sip_header_content_type_get_type
(
content_type
)
...
...
tester/message_tester.c
View file @
48140cef
...
...
@@ -164,9 +164,10 @@ static void text_message_with_external_body(void) {
linphone_chat_room_send_message2
(
chat_room
,
message
,
linphone_chat_message_state_change
,
pauline
->
lc
);
CU_ASSERT_TRUE
(
wait_for
(
pauline
->
lc
,
marie
->
lc
,
&
marie
->
stat
.
number_of_LinphoneMessageReceived
,
1
));
CU_ASSERT_TRUE
(
wait_for
(
pauline
->
lc
,
marie
->
lc
,
&
pauline
->
stat
.
number_of_LinphoneMessageDelivered
,
1
));
CU_ASSERT_EQUAL
(
pauline
->
stat
.
number_of_LinphoneMessageInProgress
,
1
);
CU_ASSERT_EQUAL
(
marie
->
stat
.
number_of_LinphoneMessageExtBodyReceived
,
1
);
/*fixme use history to check message content*/
linphone_core_manager_destroy
(
marie
);
linphone_core_manager_destroy
(
pauline
);
}
...
...
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