mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-15 05:48:33 +00:00
a little update to the sofia-sip library
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4939 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
fabed21ea8
commit
853936abd3
270 files changed
+37121
-11402
No files matched your search
@@ -58,6 +58,6 @@ EXTRA_DIST = Doxyfile soa.docs $(BUILT_SOURCES)
|
||||
# ----------------------------------------------------------------------
|
||||
# Sofia specific rules
|
||||
|
||||
include ../sofia.am
|
||||
include $(top_srcdir)/rules/sofia.am
|
||||
|
||||
TAG_DLL_FLAGS = LIST=soa_tag_list
|
||||
@@ -167,7 +167,7 @@ int soa_add(char const *name,
|
||||
struct soa_namenode const *n;
|
||||
struct soa_namenode *e;
|
||||
|
||||
SU_DEBUG_9(("soa_add(%s%s%s, %p) called\n", NICE(name), actions));
|
||||
SU_DEBUG_9(("soa_add(%s%s%s, %p) called\n", NICE(name), (void *)actions));
|
||||
|
||||
if (name == NULL || actions == NULL)
|
||||
return su_seterrno(EFAULT);
|
||||
@@ -227,7 +227,7 @@ soa_session_t *soa_create(char const *name,
|
||||
size_t namelen;
|
||||
|
||||
SU_DEBUG_9(("soa_create(\"%s\", %p, %p) called\n",
|
||||
name ? name : "default", root, magic));
|
||||
name ? name : "default", (void *)root, (void *)magic));
|
||||
|
||||
if (name && name[0]) {
|
||||
struct soa_namenode const *n;
|
||||
@@ -276,7 +276,7 @@ soa_session_t *soa_clone(soa_session_t *parent_ss,
|
||||
|
||||
SU_DEBUG_9(("soa_clone(%s::%p, %p, %p) called\n",
|
||||
parent_ss ? parent_ss->ss_actions->soa_name : "",
|
||||
parent_ss, root, magic));
|
||||
(void *)parent_ss, (void *)root, (void *)magic));
|
||||
|
||||
if (parent_ss == NULL || root == NULL)
|
||||
return (void)su_seterrno(EFAULT), NULL;
|
||||
@@ -302,7 +302,7 @@ soa_session_t *soa_clone(soa_session_t *parent_ss,
|
||||
soa_session_t *soa_session_ref(soa_session_t *ss)
|
||||
{
|
||||
SU_DEBUG_9(("soa_session_ref(%s::%p) called\n",
|
||||
ss ? ss->ss_actions->soa_name : "", ss));
|
||||
ss ? ss->ss_actions->soa_name : "", (void *)ss));
|
||||
return su_home_ref(ss->ss_home);
|
||||
}
|
||||
|
||||
@@ -310,7 +310,7 @@ soa_session_t *soa_session_ref(soa_session_t *ss)
|
||||
void soa_session_unref(soa_session_t *ss)
|
||||
{
|
||||
SU_DEBUG_9(("soa_session_unref(%s::%p) called\n",
|
||||
ss ? ss->ss_actions->soa_name : "", ss));
|
||||
ss ? ss->ss_actions->soa_name : "", (void *)ss));
|
||||
su_home_unref(ss->ss_home);
|
||||
}
|
||||
|
||||
@@ -350,7 +350,7 @@ int soa_base_init(char const *name,
|
||||
void soa_destroy(soa_session_t *ss)
|
||||
{
|
||||
SU_DEBUG_9(("soa_destroy(%s::%p) called\n",
|
||||
ss ? ss->ss_actions->soa_name : "", ss));
|
||||
ss ? ss->ss_actions->soa_name : "", (void *)ss));
|
||||
|
||||
if (ss) {
|
||||
ss->ss_active = 0;
|
||||
@@ -396,7 +396,7 @@ int soa_set_params(soa_session_t *ss, tag_type_t tag, tag_value_t value, ...)
|
||||
int n;
|
||||
|
||||
SU_DEBUG_9(("soa_set_params(%s::%p, ...) called\n",
|
||||
ss ? ss->ss_actions->soa_name : "", ss));
|
||||
ss ? ss->ss_actions->soa_name : "", (void *)ss));
|
||||
|
||||
if (ss == NULL)
|
||||
return su_seterrno(EFAULT), -1;
|
||||
@@ -606,7 +606,7 @@ int soa_get_params(soa_session_t const *ss,
|
||||
int n;
|
||||
|
||||
SU_DEBUG_9(("soa_get_params(%s::%p, ...) called\n",
|
||||
ss ? ss->ss_actions->soa_name : "", ss));
|
||||
ss ? ss->ss_actions->soa_name : "", (void *)ss));
|
||||
|
||||
if (ss == NULL)
|
||||
return su_seterrno(EFAULT), -1;
|
||||
@@ -688,7 +688,7 @@ tagi_t *soa_get_paramlist(soa_session_t const *ss,
|
||||
tagi_t *params = NULL;
|
||||
|
||||
SU_DEBUG_9(("soa_get_paramlist(%s::%p, ...) called\n",
|
||||
ss ? ss->ss_actions->soa_name : "", ss));
|
||||
ss ? ss->ss_actions->soa_name : "", (void *)ss));
|
||||
|
||||
if (ss) {
|
||||
ta_start(ta, tag, value);
|
||||
@@ -756,7 +756,7 @@ int soa_error_as_sip_response(soa_session_t *ss,
|
||||
char const **return_phrase)
|
||||
{
|
||||
SU_DEBUG_9(("soa_error_as_sip_response(%s::%p, ...) called\n",
|
||||
ss ? ss->ss_actions->soa_name : "", ss));
|
||||
ss ? ss->ss_actions->soa_name : "", (void *)ss));
|
||||
|
||||
if (ss == NULL || ss->ss_status < 400 || ss->ss_status >= 700) {
|
||||
if (return_phrase)
|
||||
@@ -777,7 +777,7 @@ char const *soa_error_as_sip_reason(soa_session_t *ss)
|
||||
char *reason;
|
||||
|
||||
SU_DEBUG_9(("soa_error_as_sip_reason(%s::%p) called\n",
|
||||
ss ? ss->ss_actions->soa_name : "", ss));
|
||||
ss ? ss->ss_actions->soa_name : "", (void *)ss));
|
||||
|
||||
if (ss == NULL)
|
||||
return "SIP;cause=500;text=\"Internal Server Error\"";
|
||||
@@ -832,8 +832,8 @@ int soa_get_capability_sdp(soa_session_t const *ss,
|
||||
char const *sdp_str;
|
||||
|
||||
SU_DEBUG_9(("soa_get_capability_sdp(%s::%p, [%p], [%p], [%p]) called\n",
|
||||
ss ? ss->ss_actions->soa_name : "", ss,
|
||||
return_sdp, return_sdp_str, return_len));
|
||||
ss ? ss->ss_actions->soa_name : "", (void *)ss,
|
||||
(void *)return_sdp, (void *)return_sdp_str, (void *)return_len));
|
||||
|
||||
if (ss == NULL)
|
||||
return (void)su_seterrno(EFAULT), -1;
|
||||
@@ -878,7 +878,7 @@ int soa_set_capability_sdp(soa_session_t *ss,
|
||||
char const *str, issize_t len)
|
||||
{
|
||||
SU_DEBUG_9(("soa_set_capability_sdp(%s::%p, %p, %p, "MOD_ZD") called\n",
|
||||
ss ? ss->ss_actions->soa_name : "", ss, sdp, str, (ssize_t)len));
|
||||
ss ? ss->ss_actions->soa_name : "", (void *)ss, (void *)sdp, (void *)str, (ssize_t)len));
|
||||
|
||||
return soa_set_sdp(ss, soa_capability_sdp_kind, sdp, str, len);
|
||||
}
|
||||
@@ -964,8 +964,8 @@ int soa_get_user_sdp(soa_session_t const *ss,
|
||||
char const *sdp_str;
|
||||
|
||||
SU_DEBUG_9(("soa_get_user_sdp(%s::%p, [%p], [%p], [%p]) called\n",
|
||||
ss ? ss->ss_actions->soa_name : "", ss,
|
||||
return_sdp, return_sdp_str, return_len));
|
||||
ss ? ss->ss_actions->soa_name : "", (void *)ss,
|
||||
(void *)return_sdp, (void *)return_sdp_str, (void *)return_len));
|
||||
|
||||
if (ss == NULL)
|
||||
return (void)su_seterrno(EFAULT), -1;
|
||||
@@ -1036,7 +1036,7 @@ int soa_set_user_sdp(soa_session_t *ss,
|
||||
char const *str, issize_t len)
|
||||
{
|
||||
SU_DEBUG_9(("soa_set_user_sdp(%s::%p, %p, %p, "MOD_ZD") called\n",
|
||||
ss ? ss->ss_actions->soa_name : "", ss, sdp, str, (ssize_t)len));
|
||||
ss ? ss->ss_actions->soa_name : "", (void *)ss, (void *)sdp, (void *)str, (ssize_t)len));
|
||||
|
||||
return soa_set_sdp(ss, soa_user_sdp_kind, sdp, str, len);
|
||||
}
|
||||
@@ -1081,8 +1081,8 @@ int soa_get_remote_sdp(soa_session_t const *ss,
|
||||
char const *sdp_str;
|
||||
|
||||
SU_DEBUG_9(("soa_get_remote_sdp(%s::%p, [%p], [%p], [%p]) called\n",
|
||||
ss ? ss->ss_actions->soa_name : "", ss,
|
||||
return_sdp, return_sdp_str, return_len));
|
||||
ss ? ss->ss_actions->soa_name : "", (void *)ss,
|
||||
(void *)return_sdp, (void *)return_sdp_str, (void *)return_len));
|
||||
|
||||
if (ss == NULL)
|
||||
return (void)su_seterrno(EFAULT), -1;
|
||||
@@ -1155,7 +1155,7 @@ int soa_set_remote_sdp(soa_session_t *ss,
|
||||
char const *str, issize_t len)
|
||||
{
|
||||
SU_DEBUG_9(("soa_set_remote_sdp(%s::%p, %p, %p, "MOD_ZD") called\n",
|
||||
ss ? ss->ss_actions->soa_name : "", ss, sdp, str, (ssize_t)len));
|
||||
ss ? ss->ss_actions->soa_name : "", (void *)ss, (void *)sdp, (void *)str, (ssize_t)len));
|
||||
|
||||
return soa_set_sdp(ss, soa_remote_sdp_kind, sdp, str, len);
|
||||
}
|
||||
@@ -1198,7 +1198,7 @@ int soa_base_set_remote_sdp(soa_session_t *ss,
|
||||
int soa_clear_remote_sdp(soa_session_t *ss)
|
||||
{
|
||||
SU_DEBUG_9(("soa_clear_remote_sdp(%s::%p) called\n",
|
||||
ss ? ss->ss_actions->soa_name : "", ss));
|
||||
ss ? ss->ss_actions->soa_name : "", (void *)ss));
|
||||
|
||||
if (!ss)
|
||||
return (void)su_seterrno(EFAULT), -1;
|
||||
@@ -1253,8 +1253,8 @@ int soa_get_local_sdp(soa_session_t const *ss,
|
||||
char const *sdp_str;
|
||||
|
||||
SU_DEBUG_9(("soa_get_local_sdp(%s::%p, [%p], [%p], [%p]) called\n",
|
||||
ss ? ss->ss_actions->soa_name : "", ss,
|
||||
return_sdp, return_sdp_str, return_len));
|
||||
ss ? ss->ss_actions->soa_name : "", (void *)ss,
|
||||
(void *)return_sdp, (void *)return_sdp_str, (void *)return_len));
|
||||
|
||||
if (ss == NULL)
|
||||
return (void)su_seterrno(EFAULT), -1;
|
||||
@@ -1286,7 +1286,7 @@ int soa_init_offer_answer(soa_session_t *ss)
|
||||
int complete;
|
||||
|
||||
SU_DEBUG_9(("soa_init_offer_answer(%s::%p) called\n",
|
||||
ss ? ss->ss_actions->soa_name : "", ss));
|
||||
ss ? ss->ss_actions->soa_name : "", (void *)ss));
|
||||
|
||||
if (!ss)
|
||||
return 0;
|
||||
@@ -1308,7 +1308,7 @@ int soa_init_offer_answer(soa_session_t *ss)
|
||||
char **soa_media_features(soa_session_t *ss, int live, su_home_t *home)
|
||||
{
|
||||
SU_DEBUG_9(("soa_media_features(%s::%p, %u, %p) called\n",
|
||||
ss ? ss->ss_actions->soa_name : "", ss, live, home));
|
||||
ss ? ss->ss_actions->soa_name : "", (void *)ss, live, (void *)home));
|
||||
|
||||
if (ss)
|
||||
return ss->ss_actions->soa_media_features(ss, live, home);
|
||||
@@ -1324,7 +1324,7 @@ char **soa_base_media_features(soa_session_t *ss, int live, su_home_t *home)
|
||||
char const * const * soa_sip_require(soa_session_t const *ss)
|
||||
{
|
||||
SU_DEBUG_9(("soa_sip_require(%s::%p) called\n",
|
||||
ss ? ss->ss_actions->soa_name : "", ss));
|
||||
ss ? ss->ss_actions->soa_name : "", (void *)ss));
|
||||
|
||||
if (ss)
|
||||
return ss->ss_actions->soa_sip_require(ss);
|
||||
@@ -1341,7 +1341,7 @@ char const * const * soa_base_sip_require(soa_session_t const *ss)
|
||||
char const * const * soa_sip_supported(soa_session_t const *ss)
|
||||
{
|
||||
SU_DEBUG_9(("soa_sip_supported(%s::%p) called\n",
|
||||
ss ? ss->ss_actions->soa_name : "", ss));
|
||||
ss ? ss->ss_actions->soa_name : "", (void *)ss));
|
||||
|
||||
if (ss)
|
||||
return ss->ss_actions->soa_sip_supported(ss);
|
||||
@@ -1360,7 +1360,7 @@ int soa_remote_sip_features(soa_session_t *ss,
|
||||
char const * const * require)
|
||||
{
|
||||
SU_DEBUG_9(("soa_remote_sip_features(%s::%p, %p, %p) called\n",
|
||||
ss ? ss->ss_actions->soa_name : "", ss, supported, require));
|
||||
ss ? ss->ss_actions->soa_name : "", (void *)ss, (void *)supported, (void *)require));
|
||||
|
||||
if (ss)
|
||||
return ss->ss_actions->soa_remote_sip_features(ss, supported, require);
|
||||
@@ -1405,8 +1405,8 @@ int soa_generate_offer(soa_session_t *ss,
|
||||
int always,
|
||||
soa_callback_f *completed)
|
||||
{
|
||||
SU_DEBUG_9(("soa_generate_offer(%s::%p, %u, %p) called\n",
|
||||
ss ? ss->ss_actions->soa_name : "", ss, always, completed));
|
||||
SU_DEBUG_9(("soa_generate_offer(%s::%p, %u) called\n",
|
||||
ss ? ss->ss_actions->soa_name : "", (void *)ss, always));
|
||||
|
||||
/** @ERROR EFAULT Bad address. */
|
||||
if (ss == NULL)
|
||||
@@ -1493,8 +1493,8 @@ int soa_base_generate_offer(soa_session_t *ss,
|
||||
int soa_generate_answer(soa_session_t *ss,
|
||||
soa_callback_f *completed)
|
||||
{
|
||||
SU_DEBUG_9(("soa_generate_answer(%s::%p, %p) called\n",
|
||||
ss ? ss->ss_actions->soa_name : "", ss, completed));
|
||||
SU_DEBUG_9(("soa_generate_answer(%s::%p) called\n",
|
||||
ss ? ss->ss_actions->soa_name : "", (void *)ss));
|
||||
|
||||
/** @ERROR EFAULT Bad address as @a ss. */
|
||||
if (ss == NULL)
|
||||
@@ -1573,8 +1573,8 @@ int soa_base_generate_answer(soa_session_t *ss,
|
||||
int soa_process_answer(soa_session_t *ss,
|
||||
soa_callback_f *completed)
|
||||
{
|
||||
SU_DEBUG_9(("soa_process_answer(%s::%p, %p) called\n",
|
||||
ss ? ss->ss_actions->soa_name : "", ss, completed));
|
||||
SU_DEBUG_9(("soa_process_answer(%s::%p) called\n",
|
||||
ss ? ss->ss_actions->soa_name : "", (void *)ss));
|
||||
|
||||
/** @ERROR EFAULT Bad address as @a ss. */
|
||||
if (ss == NULL)
|
||||
@@ -1654,8 +1654,8 @@ int soa_base_process_answer(soa_session_t *ss,
|
||||
int soa_process_reject(soa_session_t *ss,
|
||||
soa_callback_f *completed)
|
||||
{
|
||||
SU_DEBUG_9(("soa_process_reject(%s::%p, %p) called\n",
|
||||
ss ? ss->ss_actions->soa_name : "", ss, completed));
|
||||
SU_DEBUG_9(("soa_process_reject(%s::%p) called\n",
|
||||
ss ? ss->ss_actions->soa_name : "", (void *)ss));
|
||||
|
||||
/** @ERROR EFAULT Bad address as @a ss. */
|
||||
if (ss == NULL)
|
||||
@@ -1711,7 +1711,7 @@ int soa_base_process_reject(soa_session_t *ss,
|
||||
int soa_activate(soa_session_t *ss, char const *option)
|
||||
{
|
||||
SU_DEBUG_9(("soa_activate(%s::%p, %s%s%s) called\n",
|
||||
ss ? ss->ss_actions->soa_name : "", ss, NICE(option)));
|
||||
ss ? ss->ss_actions->soa_name : "", (void *)ss, NICE(option)));
|
||||
|
||||
/** @ERROR EFAULT Bad address as @a ss. */
|
||||
if (ss == NULL)
|
||||
@@ -1741,7 +1741,7 @@ int soa_base_activate(soa_session_t *ss, char const *option)
|
||||
int soa_deactivate(soa_session_t *ss, char const *option)
|
||||
{
|
||||
SU_DEBUG_9(("soa_deactivate(%s::%p, %s%s%s) called\n",
|
||||
ss ? ss->ss_actions->soa_name : "", ss, NICE(option)));
|
||||
ss ? ss->ss_actions->soa_name : "", (void *)ss, NICE(option)));
|
||||
|
||||
/** @ERROR EFAULT Bad address as @a ss. */
|
||||
if (ss == NULL)
|
||||
@@ -1763,7 +1763,7 @@ int soa_base_deactivate(soa_session_t *ss, char const *option)
|
||||
void soa_terminate(soa_session_t *ss, char const *option)
|
||||
{
|
||||
SU_DEBUG_9(("soa_terminate(%s::%p) called\n",
|
||||
ss ? ss->ss_actions->soa_name : "", ss));
|
||||
ss ? ss->ss_actions->soa_name : "", (void *)ss));
|
||||
|
||||
/** @ERROR EFAULT Bad address as @a ss. */
|
||||
if (ss == NULL)
|
||||
@@ -1799,49 +1799,65 @@ int soa_is_complete(soa_session_t const *ss)
|
||||
/** Return true if audio has been activated. */
|
||||
int soa_is_audio_active(soa_session_t const *ss)
|
||||
{
|
||||
return ss ? ss->ss_local_activity->ma_audio : SOA_ACTIVE_DISABLED;
|
||||
int ma = ss ? ss->ss_local_activity->ma_audio : SOA_ACTIVE_DISABLED;
|
||||
if (ma >= 4) ma |= -8;
|
||||
return ma;
|
||||
}
|
||||
|
||||
/** Return true if video has been activated. */
|
||||
int soa_is_video_active(soa_session_t const *ss)
|
||||
{
|
||||
return ss ? ss->ss_local_activity->ma_video : SOA_ACTIVE_DISABLED;
|
||||
int ma = ss ? ss->ss_local_activity->ma_video : SOA_ACTIVE_DISABLED;
|
||||
if (ma >= 4) ma |= -8;
|
||||
return ma;
|
||||
}
|
||||
|
||||
/** Return true if image sharing has been activated. */
|
||||
int soa_is_image_active(soa_session_t const *ss)
|
||||
{
|
||||
return ss ? ss->ss_local_activity->ma_image : SOA_ACTIVE_DISABLED;
|
||||
int ma = ss ? ss->ss_local_activity->ma_image : SOA_ACTIVE_DISABLED;
|
||||
if (ma >= 4) ma |= -8;
|
||||
return ma;
|
||||
}
|
||||
|
||||
/** Return true if messaging session has been activated. */
|
||||
int soa_is_chat_active(soa_session_t const *ss)
|
||||
{
|
||||
return ss ? ss->ss_local_activity->ma_chat : SOA_ACTIVE_DISABLED;
|
||||
int ma = ss ? ss->ss_local_activity->ma_chat : SOA_ACTIVE_DISABLED;
|
||||
if (ma >= 4) ma |= -8;
|
||||
return ma;
|
||||
}
|
||||
|
||||
/** Return true if remote audio is active (not on hold). */
|
||||
int soa_is_remote_audio_active(soa_session_t const *ss)
|
||||
{
|
||||
return ss ? ss->ss_remote_activity->ma_audio : SOA_ACTIVE_DISABLED;
|
||||
int ma = ss ? ss->ss_remote_activity->ma_audio : SOA_ACTIVE_DISABLED;
|
||||
if (ma >= 4) ma |= -8;
|
||||
return ma;
|
||||
}
|
||||
|
||||
/** Return true if remote video is active (not on hold). */
|
||||
int soa_is_remote_video_active(soa_session_t const *ss)
|
||||
{
|
||||
return ss ? ss->ss_remote_activity->ma_video : SOA_ACTIVE_DISABLED;
|
||||
int ma = ss ? ss->ss_remote_activity->ma_video : SOA_ACTIVE_DISABLED;
|
||||
if (ma >= 4) ma |= -8;
|
||||
return ma;
|
||||
}
|
||||
|
||||
/** Return true if image sharing is active (not on hold). */
|
||||
int soa_is_remote_image_active(soa_session_t const *ss)
|
||||
{
|
||||
return ss ? ss->ss_remote_activity->ma_image : SOA_ACTIVE_DISABLED;
|
||||
int ma = ss ? ss->ss_remote_activity->ma_image : SOA_ACTIVE_DISABLED;
|
||||
if (ma >= 4) ma |= -8;
|
||||
return ma;
|
||||
}
|
||||
|
||||
/** Return true if chat session is active (not on hold). */
|
||||
int soa_is_remote_chat_active(soa_session_t const *ss)
|
||||
{
|
||||
return ss ? ss->ss_remote_activity->ma_chat : SOA_ACTIVE_DISABLED;
|
||||
int ma = ss ? ss->ss_remote_activity->ma_chat : SOA_ACTIVE_DISABLED;
|
||||
if (ma >= 4) ma |= -8;
|
||||
return ma;
|
||||
}
|
||||
|
||||
/* ======================================================================== */
|
||||
|
||||
@@ -822,7 +822,7 @@ int soa_sdp_mode_set_is_needed(sdp_session_t const *session,
|
||||
sdp_mode_t recv_mode;
|
||||
|
||||
SU_DEBUG_7(("soa_sdp_mode_set_is_needed(%p, %p, \"%s\"): called\n",
|
||||
session, remote, hold ? hold : ""));
|
||||
(void *)session, (void *)remote, hold ? hold : ""));
|
||||
|
||||
if (!session )
|
||||
return 0;
|
||||
@@ -865,7 +865,7 @@ int soa_sdp_mode_set(sdp_session_t *session,
|
||||
sdp_mode_t send_mode, recv_mode;
|
||||
|
||||
SU_DEBUG_7(("soa_sdp_mode_set(%p, %p, \"%s\"): called\n",
|
||||
session, remote, hold ? hold : ""));
|
||||
(void *)session, (void *)remote, hold ? hold : ""));
|
||||
|
||||
if (!session || !session->sdp_media)
|
||||
return 0;
|
||||
@@ -928,7 +928,8 @@ static int offer_answer_step(soa_session_t *ss,
|
||||
|
||||
su_home_auto(tmphome, sizeof tmphome);
|
||||
|
||||
SU_DEBUG_7(("soa_static_offer_answer_action(%p, %s): called\n", ss, by));
|
||||
SU_DEBUG_7(("soa_static_offer_answer_action(%p, %s): called\n",
|
||||
(void *)ss, by));
|
||||
|
||||
if (user == NULL)
|
||||
return soa_set_status(ss, 500, "No session set by user");
|
||||
@@ -954,7 +955,8 @@ static int offer_answer_step(soa_session_t *ss,
|
||||
if (local == NULL) switch (action) {
|
||||
case generate_offer:
|
||||
case generate_answer:
|
||||
SU_DEBUG_7(("soa_static(%p, %s): generating local description\n", ss, by));
|
||||
SU_DEBUG_7(("soa_static(%p, %s): %s\n", (void *)ss, by,
|
||||
"generating local description"));
|
||||
|
||||
local = local0;
|
||||
*local = *user, local->sdp_media = NULL;
|
||||
@@ -987,7 +989,7 @@ static int offer_answer_step(soa_session_t *ss,
|
||||
break;
|
||||
if (local != local0)
|
||||
*local0 = *local, local = local0;
|
||||
SU_DEBUG_7(("soa_static(%p, %s): %s\n", ss, by,
|
||||
SU_DEBUG_7(("soa_static(%p, %s): %s\n", (void *)ss, by,
|
||||
"upgrade with local description"));
|
||||
soa_sdp_upgrade(ss, tmphome, local, user, user);
|
||||
break;
|
||||
@@ -999,7 +1001,7 @@ static int offer_answer_step(soa_session_t *ss,
|
||||
if (1) {
|
||||
if (local != local0)
|
||||
*local0 = *local, local = local0;
|
||||
SU_DEBUG_7(("soa_static(%p, %s): %s\n", ss, by,
|
||||
SU_DEBUG_7(("soa_static(%p, %s): %s\n", (void *)ss, by,
|
||||
"upgrade with remote description"));
|
||||
soa_sdp_upgrade(ss, tmphome, local, user, remote);
|
||||
}
|
||||
@@ -1032,7 +1034,8 @@ static int offer_answer_step(soa_session_t *ss,
|
||||
} while (0)
|
||||
DUP_LOCAL(local);
|
||||
}
|
||||
SU_DEBUG_7(("soa_static(%p, %s): marking rejected media\n", ss, by));
|
||||
SU_DEBUG_7(("soa_static(%p, %s): %s\n", (void *)ss, by,
|
||||
"marking rejected media"));
|
||||
soa_sdp_reject(tmphome, local, remote);
|
||||
}
|
||||
break;
|
||||
@@ -1065,7 +1068,7 @@ static int offer_answer_step(soa_session_t *ss,
|
||||
if (ss->ss_local_remote_version == remote_version)
|
||||
break;
|
||||
if (1 /* We don't have good test for codecs */) {
|
||||
SU_DEBUG_7(("soa_static(%p, %s): %s\n", ss, by,
|
||||
SU_DEBUG_7(("soa_static(%p, %s): %s\n", (void *)ss, by,
|
||||
"upgrade codecs with remote description"));
|
||||
if (local != local0) {
|
||||
*local0 = *local, local = local0;
|
||||
@@ -1143,7 +1146,8 @@ static int offer_answer_step(soa_session_t *ss,
|
||||
ss->ss_previous_remote_version = ss->ss_local_remote_version;
|
||||
}
|
||||
|
||||
SU_DEBUG_7(("soa_static(%p, %s): storing local description\n", ss, by));
|
||||
SU_DEBUG_7(("soa_static(%p, %s): %s\n", (void *)ss, by,
|
||||
"storing local description"));
|
||||
|
||||
/* Update the unparsed and pretty-printed descriptions */
|
||||
if (soa_description_set(ss, ss->ss_local, local, NULL, 0) < 0) {
|
||||
|
||||
@@ -163,10 +163,10 @@ struct soa_session
|
||||
|
||||
struct soa_media_activity
|
||||
{
|
||||
int ma_audio:4; /**< Audio activity (send/recv) */
|
||||
int ma_video:4; /**< Video activity (send/recv) */
|
||||
int ma_image:4; /**< Image activity (send/recv) for JPIP */
|
||||
int ma_chat:4; /**< Chat activity (send/recv) */
|
||||
unsigned ma_audio:4; /**< Audio activity (send/recv) */
|
||||
unsigned ma_video:4; /**< Video activity (send/recv) */
|
||||
unsigned ma_image:4; /**< Image activity (send/recv) for JPIP */
|
||||
unsigned ma_chat:4; /**< Chat activity (send/recv) */
|
||||
} ss_local_activity[1], ss_remote_activity[1];
|
||||
|
||||
/** Capabilities as specified by application */
|
||||
|
||||
@@ -353,7 +353,9 @@ int test_static_offer_answer(struct context *ctx)
|
||||
soa_session_t *a, *b;
|
||||
|
||||
char const *caps = NONE, *offer = NONE, *answer = NONE;
|
||||
isize_t capslen = -1, offerlen = -1, answerlen = -1;
|
||||
isize_t capslen = (isize_t)-1;
|
||||
isize_t offerlen = (isize_t)-1;
|
||||
isize_t answerlen = (isize_t)-1;
|
||||
|
||||
su_home_t home[1] = { SU_HOME_INIT(home) };
|
||||
|
||||
@@ -611,7 +613,7 @@ int test_codec_selection(struct context *ctx)
|
||||
soa_session_t *a, *b;
|
||||
|
||||
char const *offer = NONE, *answer = NONE;
|
||||
isize_t offerlen = -1, answerlen = -1;
|
||||
isize_t offerlen = (isize_t)-1, answerlen = (isize_t)-1;
|
||||
|
||||
sdp_session_t const *a_sdp, *b_sdp;
|
||||
sdp_media_t const *m;
|
||||
@@ -1243,12 +1245,12 @@ static RETSIGTYPE sig_alarm(int s)
|
||||
}
|
||||
#endif
|
||||
|
||||
void usage(void)
|
||||
void usage(int exitcode)
|
||||
{
|
||||
fprintf(stderr,
|
||||
"usage: %s [-v|-q] [-l level] [-p outbound-proxy-uri]\n",
|
||||
"usage: %s [-v|-q] [-a] [-l level] [-p outbound-proxy-uri]\n",
|
||||
name);
|
||||
exit(1);
|
||||
exit(exitcode);
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
@@ -1261,6 +1263,8 @@ int main(int argc, char *argv[])
|
||||
for (i = 1; argv[i]; i++) {
|
||||
if (strcmp(argv[i], "-v") == 0)
|
||||
tstflags |= tst_verbatim;
|
||||
else if (strcmp(argv[i], "-a") == 0)
|
||||
tstflags |= tst_abort;
|
||||
else if (strcmp(argv[i], "-q") == 0)
|
||||
tstflags &= ~tst_verbatim;
|
||||
else if (strcmp(argv[i], "-1") == 0)
|
||||
@@ -1277,7 +1281,7 @@ int main(int argc, char *argv[])
|
||||
level = 3, rest = "";
|
||||
|
||||
if (rest == NULL || *rest)
|
||||
usage();
|
||||
usage(1);
|
||||
|
||||
su_log_set_level(soa_log, level);
|
||||
}
|
||||
@@ -1294,7 +1298,7 @@ int main(int argc, char *argv[])
|
||||
break;
|
||||
}
|
||||
else
|
||||
usage();
|
||||
usage(1);
|
||||
}
|
||||
|
||||
if (o_attach) {
|
||||
|
||||
Reference in new issue
Block a user