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
belle-sip
Commits
8b72d74b
Commit
8b72d74b
authored
Feb 04, 2013
by
jehan
Browse files
attribute are after time desc in session desc
parent
529aa1ad
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/belle_sdp_impl.c
View file @
8b72d74b
...
...
@@ -308,7 +308,7 @@ static void belle_sdp_base_description_clone(belle_sdp_base_description_t *base_
int
belle_sdp_base_description_marshal
(
belle_sdp_base_description_t
*
base_description
,
char
*
buff
,
unsigned
int
offset
,
unsigned
int
buff_size
)
{
unsigned
int
current_offset
=
offset
;
belle_sip_list_t
*
bandwidths
;
belle_sip_list_t
*
attributes
;
//
belle_sip_list_t* attributes;
if
(
base_description
->
info
)
{
current_offset
+=
belle_sip_object_marshal
(
BELLE_SIP_OBJECT
(
base_description
->
info
),
buff
,
current_offset
,
buff_size
);
current_offset
+=
snprintf
(
buff
+
current_offset
,
buff_size
-
current_offset
,
"
\r\n
"
);
...
...
@@ -321,10 +321,10 @@ int belle_sdp_base_description_marshal(belle_sdp_base_description_t* base_descri
current_offset
+=
belle_sip_object_marshal
(
BELLE_SIP_OBJECT
(
bandwidths
->
data
),
buff
,
current_offset
,
buff_size
);
current_offset
+=
snprintf
(
buff
+
current_offset
,
buff_size
-
current_offset
,
"
\r\n
"
);
}
for
(
attributes
=
base_description
->
attributes
;
attributes
!=
NULL
;
attributes
=
attributes
->
next
){
current_offset
+=
belle_sip_object_marshal
(
BELLE_SIP_OBJECT
(
attributes
->
data
),
buff
,
current_offset
,
buff_size
);
current_offset
+=
snprintf
(
buff
+
current_offset
,
buff_size
-
current_offset
,
"
\r\n
"
);
}
//
for(attributes=base_description->attributes;attributes!=NULL;attributes=attributes->next){
//
current_offset+=belle_sip_object_marshal(BELLE_SIP_OBJECT(attributes->data),buff,current_offset,buff_size);
//
current_offset+=snprintf(buff+current_offset, buff_size-current_offset, "\r\n");
//
}
return
current_offset
-
offset
;
}
...
...
@@ -445,9 +445,15 @@ void belle_sdp_media_description_clone(belle_sdp_media_description_t *media_desc
}
int
belle_sdp_media_description_marshal
(
belle_sdp_media_description_t
*
media_description
,
char
*
buff
,
unsigned
int
offset
,
unsigned
int
buff_size
)
{
unsigned
int
current_offset
=
offset
;
belle_sip_list_t
*
attributes
;
current_offset
+=
belle_sip_object_marshal
(
BELLE_SIP_OBJECT
(
media_description
->
media
),
buff
,
current_offset
,
buff_size
);
current_offset
+=
snprintf
(
buff
+
current_offset
,
buff_size
-
current_offset
,
"
\r\n
"
);
current_offset
+=
belle_sdp_base_description_marshal
(
BELLE_SIP_CAST
(
media_description
,
belle_sdp_base_description_t
),
buff
,
current_offset
,
buff_size
);
for
(
attributes
=
media_description
->
base_description
.
attributes
;
attributes
!=
NULL
;
attributes
=
attributes
->
next
){
current_offset
+=
belle_sip_object_marshal
(
BELLE_SIP_OBJECT
(
attributes
->
data
),
buff
,
current_offset
,
buff_size
);
current_offset
+=
snprintf
(
buff
+
current_offset
,
buff_size
-
current_offset
,
"
\r\n
"
);
}
return
current_offset
-
offset
;
}
BELLE_SDP_NEW
(
media_description
,
belle_sdp_base_description
)
...
...
@@ -854,6 +860,7 @@ int belle_sdp_session_description_marshal(belle_sdp_session_description_t* sessi
unsigned
int
current_offset
=
offset
;
belle_sip_list_t
*
media_descriptions
;
belle_sip_list_t
*
times
;
belle_sip_list_t
*
attributes
;
current_offset
+=
belle_sip_object_marshal
(
BELLE_SIP_OBJECT
(
session_description
->
version
),
buff
,
current_offset
,
buff_size
);
current_offset
+=
snprintf
(
buff
+
current_offset
,
buff_size
-
current_offset
,
"
\r\n
"
);
...
...
@@ -872,6 +879,11 @@ int belle_sdp_session_description_marshal(belle_sdp_session_description_t* sessi
current_offset
+=
snprintf
(
buff
+
current_offset
,
buff_size
-
current_offset
,
"
\r\n
"
);
}
for
(
attributes
=
session_description
->
base_description
.
attributes
;
attributes
!=
NULL
;
attributes
=
attributes
->
next
){
current_offset
+=
belle_sip_object_marshal
(
BELLE_SIP_OBJECT
(
attributes
->
data
),
buff
,
current_offset
,
buff_size
);
current_offset
+=
snprintf
(
buff
+
current_offset
,
buff_size
-
current_offset
,
"
\r\n
"
);
}
for
(
media_descriptions
=
session_description
->
media_descriptions
;
media_descriptions
!=
NULL
;
media_descriptions
=
media_descriptions
->
next
){
current_offset
+=
belle_sip_object_marshal
(
BELLE_SIP_OBJECT
(
media_descriptions
->
data
),
buff
,
current_offset
,
buff_size
);
}
...
...
tester/belle_sip_uri_tester.c
View file @
8b72d74b
...
...
@@ -74,6 +74,8 @@ static void testIPV6URI_base(const char* ip6) {
static
void
testIPV6URI
(
void
)
{
testIPV6URI_base
(
"fe80::1"
);
testIPV6URI_base
(
"2a01:e35:1387:1020:6233:4bff:fe0b:5663"
);
testIPV6URI_base
(
"2a01:e35:1387:1020:6233::5663"
);
testIPV6URI_base
(
"::1"
);
}
static
void
testSIPSURI
(
void
)
{
...
...
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