Freeswitch-svn
Threads by month
- ----- 2026 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
February 2007
- 9 participants
- 296 discussions
[commit] r4181 - in freeswitch/trunk: conf src src/include src/mod/endpoints/mod_dingaling src/mod/endpoints/mod_iax src/mod/endpoints/mod_portaudio src/mod/endpoints/mod_sofia src/mod/endpoints/mod_wanpipe src/mod/endpoints/mod_woomera
by Freeswitch SVN 09 Feb '07
by Freeswitch SVN 09 Feb '07
09 Feb '07
Author: anthm
Date: Fri Feb 9 15:03:07 2007
New Revision: 4181
Modified:
freeswitch/trunk/conf/wanpipe.conf.xml
freeswitch/trunk/src/include/switch_core.h
freeswitch/trunk/src/include/switch_module_interfaces.h
freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c
freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c
freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c
freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
freeswitch/trunk/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c
freeswitch/trunk/src/mod/endpoints/mod_woomera/mod_woomera.c
freeswitch/trunk/src/switch_core.c
freeswitch/trunk/src/switch_ivr.c
Log:
update core
Modified: freeswitch/trunk/conf/wanpipe.conf.xml
==============================================================================
--- freeswitch/trunk/conf/wanpipe.conf.xml (original)
+++ freeswitch/trunk/conf/wanpipe.conf.xml Fri Feb 9 15:03:07 2007
@@ -2,7 +2,7 @@
<settings>
<param name="debug" value="0"/>
<param name="dialplan" value="XML"/>
- <param name="mtu" value="320"/>
+ <param name="ms-per-frame" value="20"/>
<param name="dtmf-on" value="800"/>
<param name="dtmf-off" value="100"/>
<param name="supress-dtmf-tone" value="yes"/>
Modified: freeswitch/trunk/src/include/switch_core.h
==============================================================================
--- freeswitch/trunk/src/include/switch_core.h (original)
+++ freeswitch/trunk/src/include/switch_core.h Fri Feb 9 15:03:07 2007
@@ -612,13 +612,13 @@
\param caller_profile the originator's caller profile
\param new_session a NULL pointer to aim at the newly created session
\param pool optional existing memory pool to donate to the session
- \return SWITCH_STATUS_SUCCESS if the session was created
+ \return the cause code of the attempted call
*/
-SWITCH_DECLARE(switch_status_t) switch_core_session_outgoing_channel(switch_core_session_t *session,
- char *endpoint_name,
- switch_caller_profile_t *caller_profile,
- switch_core_session_t **new_session,
- switch_memory_pool_t *pool);
+SWITCH_DECLARE(switch_call_cause_t) switch_core_session_outgoing_channel(switch_core_session_t *session,
+ char *endpoint_name,
+ switch_caller_profile_t *caller_profile,
+ switch_core_session_t **new_session,
+ switch_memory_pool_t *pool);
/*!
\brief Answer the channel of a given session
Modified: freeswitch/trunk/src/include/switch_module_interfaces.h
==============================================================================
--- freeswitch/trunk/src/include/switch_module_interfaces.h (original)
+++ freeswitch/trunk/src/include/switch_module_interfaces.h Fri Feb 9 15:03:07 2007
@@ -172,7 +172,7 @@
/*! \brief A table of i/o routines that an endpoint interface can implement */
struct switch_io_routines {
/*! creates an outgoing session from given session, caller profile */
- switch_status_t (*outgoing_channel)(switch_core_session_t *, switch_caller_profile_t *, switch_core_session_t **, switch_memory_pool_t *);
+ switch_call_cause_t (*outgoing_channel)(switch_core_session_t *, switch_caller_profile_t *, switch_core_session_t **, switch_memory_pool_t *);
/*! answers the given session's channel */
switch_status_t (*answer_channel)(switch_core_session_t *);
/*! read a frame from a session */
Modified: freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c Fri Feb 9 15:03:07 2007
@@ -180,8 +180,8 @@
static switch_status_t channel_on_ring(switch_core_session_t *session);
static switch_status_t channel_on_loopback(switch_core_session_t *session);
static switch_status_t channel_on_transmit(switch_core_session_t *session);
-static switch_status_t channel_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
- switch_core_session_t **new_session, switch_memory_pool_t *pool);
+static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
+ switch_core_session_t **new_session, switch_memory_pool_t *pool);
static switch_status_t channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
switch_io_flag_t flags, int stream_id);
static switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
@@ -1508,8 +1508,8 @@
/* Make sure when you have 2 sessions in the same scope that you pass the appropriate one to the routines
that allocate memory or you will have 1 channel with memory allocated from another channel's pool!
*/
-static switch_status_t channel_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
- switch_core_session_t **new_session, switch_memory_pool_t *pool)
+static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
+ switch_core_session_t **new_session, switch_memory_pool_t *pool)
{
if ((*new_session = switch_core_session_request(&channel_endpoint_interface, pool)) != 0) {
struct private_object *tech_pvt;
@@ -1534,7 +1534,7 @@
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Invalid URL!\n");
terminate_session(new_session, __LINE__, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
- return SWITCH_STATUS_GENERR;
+ return SWITCH_CAUSE_INVALID_NUMBER_FORMAT;
}
if ((dnis = strchr(callto, ':'))) {
@@ -1571,17 +1571,17 @@
if (!ldl_handle_ready(mdl_profile->handle)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Doh! we are not logged in yet!\n");
terminate_session(new_session, __LINE__, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
- return SWITCH_STATUS_GENERR;
+ return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
}
if (!(full_id = ldl_handle_probe(mdl_profile->handle, callto, user, idbuf, sizeof(idbuf)))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Unknown Recipient!\n");
- terminate_session(new_session, __LINE__, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
- return SWITCH_STATUS_GENERR;
+ terminate_session(new_session, __LINE__, SWITCH_CAUSE_NO_USER_RESPONSE);
+ return SWITCH_CAUSE_NO_USER_RESPONSE;
}
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Unknown Profile!\n");
terminate_session(new_session, __LINE__, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
- return SWITCH_STATUS_GENERR;
+ return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
}
@@ -1601,7 +1601,7 @@
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Hey where is my memory pool?\n");
terminate_session(new_session, __LINE__, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
- return SWITCH_STATUS_GENERR;
+ return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
}
if (outbound_profile) {
@@ -1616,7 +1616,7 @@
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Doh! no caller profile\n");
terminate_session(new_session, __LINE__, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
- return SWITCH_STATUS_GENERR;
+ return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
}
switch_channel_set_flag(channel, CF_OUTBOUND);
@@ -1633,15 +1633,15 @@
ldl_session_set_value(dlsession, "caller_id_number", outbound_profile->caller_id_number);
tech_pvt->dlsession = dlsession;
if (!get_codecs(tech_pvt)) {
- terminate_session(new_session, __LINE__, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
- return SWITCH_STATUS_GENERR;
+ terminate_session(new_session, __LINE__, SWITCH_CAUSE_BEARERCAPABILITY_NOTAVAIL);
+ return SWITCH_CAUSE_BEARERCAPABILITY_NOTAVAIL;
}
switch_channel_set_state(channel, CS_INIT);
- return SWITCH_STATUS_SUCCESS;
+ return SWITCH_CAUSE_SUCCESS;
}
- return SWITCH_STATUS_GENERR;
+ return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
}
Modified: freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c Fri Feb 9 15:03:07 2007
@@ -426,8 +426,8 @@
static switch_status_t channel_on_ring(switch_core_session_t *session);
static switch_status_t channel_on_loopback(switch_core_session_t *session);
static switch_status_t channel_on_transmit(switch_core_session_t *session);
-static switch_status_t channel_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
- switch_core_session_t **new_session, switch_memory_pool_t *pool);
+static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
+ switch_core_session_t **new_session, switch_memory_pool_t *pool);
static switch_status_t channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
switch_io_flag_t flags, int stream_id);
static switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
@@ -802,8 +802,8 @@
/* Make sure when you have 2 sessions in the same scope that you pass the appropriate one to the routines
that allocate memory or you will have 1 channel with memory allocated from another channel's pool!
*/
-static switch_status_t channel_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
- switch_core_session_t **new_session, switch_memory_pool_t *pool)
+static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
+ switch_core_session_t **new_session, switch_memory_pool_t *pool)
{
if ((*new_session = switch_core_session_request(&channel_endpoint_interface, pool)) != 0) {
private_t *tech_pvt;
@@ -819,7 +819,7 @@
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Hey where is my memory pool?\n");
switch_core_session_destroy(new_session);
- return SWITCH_STATUS_GENERR;
+ return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
}
if (outbound_profile) {
@@ -834,18 +834,18 @@
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Doh! no caller profile\n");
switch_core_session_destroy(new_session);
- return SWITCH_STATUS_GENERR;
+ SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
}
if ((tech_pvt->iax_session = iax_session_new()) == 0) {
switch_core_session_destroy(new_session);
- return SWITCH_STATUS_GENERR;
+ return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
}
if (iax_set_codec(tech_pvt, tech_pvt->iax_session, &req, &cap, &samprate, IAX_QUERY) != SWITCH_STATUS_SUCCESS) {
switch_core_session_destroy(new_session);
- return SWITCH_STATUS_GENERR;
+ return SWITCH_CAUSE_BEARERCAPABILITY_NOTIMPL;
}
if (samprate) {
@@ -859,10 +859,10 @@
switch_channel_set_flag(channel, CF_OUTBOUND);
switch_set_flag_locked(tech_pvt, TFLAG_OUTBOUND);
switch_channel_set_state(channel, CS_INIT);
- return SWITCH_STATUS_SUCCESS;
+ return SWITCH_CAUSE_SUCCESS;
}
- return SWITCH_STATUS_GENERR;
+ return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
}
Modified: freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c Fri Feb 9 15:03:07 2007
@@ -142,9 +142,9 @@
static switch_status_t channel_on_ring(switch_core_session_t *session);
static switch_status_t channel_on_loopback(switch_core_session_t *session);
static switch_status_t channel_on_transmit(switch_core_session_t *session);
-static switch_status_t channel_outgoing_channel(switch_core_session_t *session,
- switch_caller_profile_t *outbound_profile,
- switch_core_session_t **new_session, switch_memory_pool_t *pool);
+static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session,
+ switch_caller_profile_t *outbound_profile,
+ switch_core_session_t **new_session, switch_memory_pool_t *pool);
static switch_status_t channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
switch_io_flag_t flags, int stream_id);
static switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
@@ -824,8 +824,8 @@
/* Make sure when you have 2 sessions in the same scope that you pass the appropriate one to the routines
that allocate memory or you will have 1 channel with memory allocated from another channel's pool!
*/
-static switch_status_t channel_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
- switch_core_session_t **new_session, switch_memory_pool_t *pool)
+static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
+ switch_core_session_t **new_session, switch_memory_pool_t *pool)
{
if ((*new_session = switch_core_session_request(&channel_endpoint_interface, pool)) != 0) {
@@ -844,7 +844,7 @@
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Hey where is my memory pool?\n");
switch_core_session_destroy(new_session);
- return SWITCH_STATUS_GENERR;
+ return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
}
if (outbound_profile) {
@@ -860,16 +860,16 @@
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Doh! no caller profile\n");
switch_core_session_destroy(new_session);
- return SWITCH_STATUS_GENERR;
+ return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
}
switch_channel_set_flag(channel, CF_OUTBOUND);
switch_set_flag_locked(tech_pvt, TFLAG_OUTBOUND);
switch_channel_set_state(channel, CS_INIT);
- return SWITCH_STATUS_SUCCESS;
+ return SWITCH_CAUSE_SUCCESS;
}
- return SWITCH_STATUS_GENERR;
+ return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
}
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c Fri Feb 9 15:03:07 2007
@@ -330,8 +330,8 @@
static switch_status_t sofia_on_transmit(switch_core_session_t *session);
-static switch_status_t sofia_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
- switch_core_session_t **new_session, switch_memory_pool_t *pool);
+static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
+ switch_core_session_t **new_session, switch_memory_pool_t *pool);
static switch_status_t sofia_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
switch_io_flag_t flags, int stream_id);
@@ -1246,6 +1246,7 @@
return 501;
case SWITCH_CAUSE_NORMAL_UNSPECIFIED:
return 480;
+ case SWITCH_CAUSE_REQUESTED_CHAN_UNAVAIL:
case SWITCH_CAUSE_NORMAL_CIRCUIT_CONGESTION:
case SWITCH_CAUSE_NETWORK_OUT_OF_ORDER:
case SWITCH_CAUSE_NORMAL_TEMPORARY_FAILURE:
@@ -2182,10 +2183,10 @@
}
-static switch_status_t sofia_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
- switch_core_session_t **new_session, switch_memory_pool_t *pool)
+static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
+ switch_core_session_t **new_session, switch_memory_pool_t *pool)
{
- switch_status_t status = SWITCH_STATUS_FALSE;
+ switch_call_cause_t cause = SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
switch_core_session_t *nsession;
char *data, *profile_name, *dest;
sofia_profile_t *profile;
@@ -2213,6 +2214,7 @@
if (!(dest = strchr(profile_name, '/'))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid URL\n");
terminate_session(&nsession, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER, __LINE__);
+ cause = SWITCH_CAUSE_INVALID_NUMBER_FORMAT;
goto done;
}
@@ -2221,6 +2223,7 @@
if (!(profile = (sofia_profile_t *) switch_core_hash_find(globals.profile_hash, profile_name))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid Profile\n");
terminate_session(&nsession, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER, __LINE__);
+ cause = SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
goto done;
}
@@ -2233,7 +2236,8 @@
tech_pvt->dest = switch_core_session_strdup(nsession, buf);
} else {
- terminate_session(&nsession, SWITCH_CAUSE_NO_ROUTE_DESTINATION, __LINE__);
+ cause = SWITCH_CAUSE_NO_ROUTE_DESTINATION;
+ terminate_session(&nsession, cause, __LINE__);
goto done;
}
} else if (!strchr(dest, '@')) {
@@ -2243,7 +2247,8 @@
tech_pvt->dest = switch_core_session_strdup(nsession, buf);
} else {
- terminate_session(&nsession, SWITCH_CAUSE_NO_ROUTE_DESTINATION, __LINE__);
+ cause = SWITCH_CAUSE_NO_ROUTE_DESTINATION;
+ terminate_session(&nsession, cause, __LINE__);
goto done;
}
} else {
@@ -2261,7 +2266,7 @@
switch_set_flag_locked(tech_pvt, TFLAG_OUTBOUND);
switch_channel_set_state(nchannel, CS_INIT);
*new_session = nsession;
- status = SWITCH_STATUS_SUCCESS;
+ cause = SWITCH_CAUSE_SUCCESS;
if (session) {
//char *val;
//switch_channel_t *channel = switch_core_session_get_channel(session);
@@ -2269,7 +2274,7 @@
}
done:
- return status;
+ return cause;
}
Modified: freeswitch/trunk/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c Fri Feb 9 15:03:07 2007
@@ -71,12 +71,12 @@
} TFLAGS;
-#define DEFAULT_MTU 160
+#define DEFAULT_SAMPLES_PER_FRAME 160
static struct {
int debug;
int panic;
- uint32_t mtu;
+ uint32_t samples_per_frame;
int dtmf_on;
int dtmf_off;
int supress_dtmf_tone;
@@ -92,7 +92,6 @@
int dchan;
unsigned int bchans;
int node;
- int mtu;
int pswitch;
char *dialplan;
unsigned int l1;
@@ -134,6 +133,7 @@
unsigned int skip_read_frames;
unsigned int skip_write_frames;
switch_mutex_t *flag_mutex;
+ int frame_size;
#ifdef DOTRACE
int fd;
int fd2;
@@ -296,8 +296,8 @@
static switch_status_t wanpipe_on_hangup(switch_core_session_t *session);
static switch_status_t wanpipe_on_loopback(switch_core_session_t *session);
static switch_status_t wanpipe_on_transmit(switch_core_session_t *session);
-static switch_status_t wanpipe_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
- switch_core_session_t **new_session, switch_memory_pool_t *pool);
+static switch_call_cause_t wanpipe_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
+ switch_core_session_t **new_session, switch_memory_pool_t *pool);
static switch_status_t wanpipe_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
switch_io_flag_t flags, int stream_id);
static switch_status_t wanpipe_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
@@ -323,9 +323,8 @@
switch_channel_t *channel = NULL;
wanpipe_tdm_api_t tdm_api = {{0}};
int err = 0;
- unsigned int mtu_mru;
unsigned int rate = 8000;
- int new_mtu = ((globals.mtu / 8) / 2);
+
channel = switch_core_session_get_channel(session);
assert(channel != NULL);
@@ -337,23 +336,11 @@
err = sangoma_tdm_set_codec(tech_pvt->wpsock->fd, &tdm_api, WP_SLINEAR);
- mtu_mru = sangoma_tdm_get_usr_mtu_mru(tech_pvt->wpsock->fd, &tdm_api);
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "WANPIPE INIT MTU is %d\n", mtu_mru);
-
- if (mtu_mru != globals.mtu) {
- sangoma_tdm_set_usr_period(tech_pvt->wpsock->fd, &tdm_api, 40);
- err = sangoma_tdm_set_usr_period(tech_pvt->wpsock->fd, &tdm_api, new_mtu);
- mtu_mru = sangoma_tdm_get_usr_mtu_mru(tech_pvt->wpsock->fd, &tdm_api);
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "ADJUSTED MTU AFTER SETTING IT TO %d is %d %d [%s]\n", new_mtu, mtu_mru, err, strerror(err));
- if (mtu_mru != globals.mtu) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failure to adjust MTU\n");
- switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
- return SWITCH_STATUS_FALSE;
- }
- }
+ sangoma_tdm_set_usr_period(tech_pvt->wpsock->fd, &tdm_api, globals.samples_per_frame / 8);
+ tech_pvt->frame_size = sangoma_tdm_get_usr_mtu_mru(tech_pvt->wpsock->fd, &tdm_api);
if (switch_core_codec_init
- (&tech_pvt->read_codec, "L16", NULL, rate, 20, 1, SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE, NULL,
+ (&tech_pvt->read_codec, "L16", NULL, rate, globals.samples_per_frame / 8, 1, SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE, NULL,
switch_core_session_get_pool(session)) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "%s Cannot set read codec\n", switch_channel_get_name(channel));
switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
@@ -361,7 +348,7 @@
}
if (switch_core_codec_init
- (&tech_pvt->write_codec, "L16", NULL, rate, 20, 1, SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE, NULL,
+ (&tech_pvt->write_codec, "L16", NULL, rate, globals.samples_per_frame / 8, 1, SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE, NULL,
switch_core_session_get_pool(session)) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "%s Cannot set read codec\n", switch_channel_get_name(channel));
switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
@@ -449,12 +436,14 @@
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "WANPIPE HANGUP\n");
if (!switch_test_flag(tech_pvt, TFLAG_NOSIG)) {
- pri_hangup(tech_pvt->spri->pri, tech_pvt->call, tech_pvt->cause);
+ pri_hangup(tech_pvt->spri->pri, tech_pvt->call, switch_channel_get_cause(channel));
pri_destroycall(tech_pvt->spri->pri, tech_pvt->call);
+ switch_mutex_lock(globals.channel_mutex);
if (chanmap->map[tech_pvt->callno]) {
chanmap->map[tech_pvt->callno][0] = '\0';
}
+ switch_mutex_unlock(globals.channel_mutex);
/*
pri_hangup(tech_pvt->spri->pri,
tech_pvt->hangup_event.hangup.call ? tech_pvt->hangup_event.hangup.call : tech_pvt->ring_event.ring.call,
@@ -521,7 +510,7 @@
switch_channel_t *channel = NULL;
uint8_t *bp;
uint32_t bytes = 0;
- int res = 0;
+ int bread = 0;
char digit_str[80];
channel = switch_core_session_get_channel(session);
@@ -530,7 +519,6 @@
tech_pvt = switch_core_session_get_private(session);
assert(tech_pvt != NULL);
-
if (switch_test_flag(tech_pvt, TFLAG_BYE) || tech_pvt->wpsock->fd < 0) {
return SWITCH_STATUS_GENERR;
}
@@ -539,8 +527,7 @@
*frame = NULL;
memset(tech_pvt->databuf, 0, sizeof(tech_pvt->databuf));
- while (bytes < globals.mtu) {
-
+ while (bytes < globals.samples_per_frame * 2) {
if (switch_test_flag(tech_pvt, TFLAG_BYE) || tech_pvt->wpsock->fd < 0) {
return SWITCH_STATUS_GENERR;
}
@@ -550,7 +537,7 @@
return SWITCH_STATUS_GENERR;
}
- if ((res = sangoma_readmsg_socket(tech_pvt->wpsock->fd,
+ if ((bread = sangoma_readmsg_socket(tech_pvt->wpsock->fd,
&tech_pvt->hdrframe,
sizeof(tech_pvt->hdrframe), bp, sizeof(tech_pvt->databuf) - bytes, 0)) < 0) {
if (errno == EBUSY) {
@@ -560,7 +547,7 @@
}
}
- bytes += res;
+ bytes += bread;
bp += bytes;
}
@@ -571,8 +558,8 @@
tech_pvt->read_frame.datalen = bytes;
tech_pvt->read_frame.samples = bytes / 2;
- res = teletone_dtmf_detect (&tech_pvt->dtmf_detect, tech_pvt->read_frame.data, tech_pvt->read_frame.samples);
- res = teletone_dtmf_get(&tech_pvt->dtmf_detect, digit_str, sizeof(digit_str));
+ teletone_dtmf_detect (&tech_pvt->dtmf_detect, tech_pvt->read_frame.data, tech_pvt->read_frame.samples);
+ teletone_dtmf_get(&tech_pvt->dtmf_detect, digit_str, sizeof(digit_str));
if(digit_str[0]) {
switch_channel_queue_dtmf(channel, digit_str);
@@ -622,8 +609,8 @@
return SWITCH_STATUS_GENERR;
}
- if ((bread = switch_buffer_read(tech_pvt->dtmf_buffer, dtmf, globals.mtu)) < globals.mtu) {
- while (bread < globals.mtu) {
+ if ((bread = switch_buffer_read(tech_pvt->dtmf_buffer, dtmf, tech_pvt->frame_size)) < tech_pvt->frame_size) {
+ while (bread < tech_pvt->frame_size) {
dtmf[bread++] = 0;
}
}
@@ -674,14 +661,14 @@
#endif
#ifdef DOTRACE
- write(tech_pvt->fd, bp, (int) globals.mtu);
+ write(tech_pvt->fd, bp, (int) tech_pvt->frame_size);
#endif
- towrite = bytes >= globals.mtu ? globals.mtu : bytes;
+ towrite = bytes >= tech_pvt->frame_size ? tech_pvt->frame_size : bytes;
- if (towrite < globals.mtu) {
- int diff = globals.mtu - towrite;
+ if (towrite < tech_pvt->frame_size) {
+ int diff = tech_pvt->frame_size - towrite;
memset(bp + towrite, 0, diff);
- towrite = globals.mtu;
+ towrite = tech_pvt->frame_size;
}
result = sangoma_sendmsg_socket(tech_pvt->wpsock->fd,
@@ -689,7 +676,7 @@
if (result < 0) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,
"Bad Write frame len %u write %d bytes returned %d (%s)!\n", towrite,
- globals.mtu, result, strerror(errno));
+ tech_pvt->frame_size, result, strerror(errno));
if (errno == EBUSY) {
continue;
}
@@ -846,8 +833,8 @@
};
-static switch_status_t wanpipe_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
- switch_core_session_t **new_session, switch_memory_pool_t *pool)
+static switch_call_cause_t wanpipe_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
+ switch_core_session_t **new_session, switch_memory_pool_t *pool)
{
char *bchan = NULL;
char name[128] = "";
@@ -862,12 +849,12 @@
if (bchan) {
bchan++;
if (!bchan) {
- return SWITCH_STATUS_FALSE;
+ return SWITCH_CAUSE_BEARERCAPABILITY_NOTAVAIL;
}
outbound_profile->destination_number++;
} else if (!globals.configured_spans) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error No Spans Configured.\n");
- return SWITCH_STATUS_FALSE;
+ SWITCH_CAUSE_NETWORK_OUT_OF_ORDER;
}
@@ -885,7 +872,7 @@
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Hey where is my memory pool?\n");
switch_core_session_destroy(new_session);
- return SWITCH_STATUS_GENERR;
+ SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
}
@@ -902,17 +889,21 @@
num = caller_profile->destination_number;
if ((p = strchr(num, '/'))) {
*p++ = '\0';
- if (*num != 'a') {
+
+ if (*num == 'a') {
+ span = 1;
+ autospan = 1;
+ } else if (*num = 'A') {
+ span = MAX_SPANS - 1;
+ autospan = -1;
+ } else {
if (num && *num > 47 && *num < 58) {
span = atoi(num);
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invlid Syntax\n");
switch_core_session_destroy(new_session);
- return SWITCH_STATUS_GENERR;
+ return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
}
- } else {
- span = 0;
- autospan = 1;
}
num = p;
if ((p = strchr(num, '/'))) {
@@ -926,13 +917,13 @@
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invlid Syntax\n");
switch_core_session_destroy(new_session);
- return SWITCH_STATUS_GENERR;
+ return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
}
caller_profile->destination_number = p;
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invlid Syntax\n");
switch_core_session_destroy(new_session);
- return SWITCH_STATUS_GENERR;
+ return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
}
}
}
@@ -946,64 +937,70 @@
if (!wp_open(tech_pvt, span, chan)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't open fd for s%dc%d! [%s]\n", span, chan, strerror(errno));
switch_core_session_destroy(new_session);
- return SWITCH_STATUS_GENERR;
+ return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
}
switch_set_flag_locked(tech_pvt, TFLAG_NOSIG);
- snprintf(name, sizeof(name), "WanPipe/%s/nosig-%04x", bchan, rand() & 0xffff);
+ snprintf(name, sizeof(name), "WanPipe/%s/nosig", bchan);
switch_channel_set_name(channel, name);
switch_channel_set_caller_profile(channel, caller_profile);
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid address\n");
switch_core_session_destroy(new_session);
- return SWITCH_STATUS_GENERR;
+ return SWITCH_CAUSE_REQUESTED_CHAN_UNAVAIL;
}
} else {
switch_mutex_lock(globals.channel_mutex);
- do {
- if (autospan) {
- span++;
+ channo = 0;
+ while (!channo) {
+ if (autospan > 0 && span == MAX_SPANS - 1) {
+ break;
+ }
+
+ if (autospan < 0 && span == 0) {
+ break;
}
- if ((spri = &SPANS[span]->spri) && switch_test_flag(spri, SANGOMA_PRI_READY)) {
+
+ if (SPANS[span] && (spri = &SPANS[span]->spri) && switch_test_flag(spri, SANGOMA_PRI_READY)) {
chanmap = spri->private_info;
- if (channo == 0) {
- if (autochan > 0) {
- for(channo = 1; channo < SANGOMA_MAX_CHAN_PER_SPAN; channo++) {
- if ((SPANS[span]->bchans & (1 << channo)) && !chanmap->map[channo][0]) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Choosing channel %d\n", channo);
- break;
- }
- }
- } else if (autochan < 0) {
- for(channo = SANGOMA_MAX_CHAN_PER_SPAN; channo > 0; channo--) {
- if ((SPANS[span]->bchans & (1 << channo)) && !chanmap->map[channo][0]) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Choosing channel %d\n", channo);
- break;
- }
+
+ if (autochan > 0) {
+ for(channo = 1; channo < SANGOMA_MAX_CHAN_PER_SPAN; channo++) {
+ if ((SPANS[span]->bchans & (1 << channo)) && !chanmap->map[channo][0]) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Choosing channel s%dc%d\n", span, channo);
+ goto done;
}
}
-
- if (channo <= 0 || channo == (SANGOMA_MAX_CHAN_PER_SPAN)) {
- channo = 0;
- break;
+ channo = 0;
+ } else if (autochan < 0) {
+ for(channo = SANGOMA_MAX_CHAN_PER_SPAN; channo > 0; channo--) {
+ if ((SPANS[span]->bchans & (1 << channo)) && !chanmap->map[channo][0]) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Choosing channel s%dc%d\n", span, channo);
+ goto done;
+ }
}
+ channo = 0;
}
- if (channo) {
- break;
- }
}
- } while(autospan && span < MAX_SPANS && !spri && !channo);
+
+ if (autospan > 0) {
+ span++;
+ } else if (autospan < 0) {
+ span--;
+ }
+ }
+ done:
switch_mutex_unlock(globals.channel_mutex);
-
+
if (!spri || channo == 0 || channo == (SANGOMA_MAX_CHAN_PER_SPAN)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "No Free Channels!\n");
switch_core_session_destroy(new_session);
- return SWITCH_STATUS_GENERR;
+ return SWITCH_CAUSE_SWITCH_CONGESTION;
}
if (spri && (tech_pvt->call = pri_new_call(spri->pri))) {
struct pri_sr *sr;
- snprintf(name, sizeof(name), "WanPipe/s%dc%d/%s-%04x", spri->span, channo, caller_profile->destination_number, rand() & 0xffff);
+ snprintf(name, sizeof(name), "WanPipe/s%dc%d/%s", spri->span, channo, caller_profile->destination_number);
switch_channel_set_name(channel, name);
switch_channel_set_caller_profile(channel, caller_profile);
sr = pri_sr_new();
@@ -1024,14 +1021,14 @@
if (pri_setup(spri->pri, tech_pvt->call , sr)) {
switch_core_session_destroy(new_session);
pri_sr_free(sr);
- return SWITCH_STATUS_GENERR;
+ return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
}
if (!wp_open(tech_pvt, spri->span, channo)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't open fd!\n");
switch_core_session_destroy(new_session);
pri_sr_free(sr);
- return SWITCH_STATUS_GENERR;
+ return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
}
pri_sr_free(sr);
switch_copy_string(chanmap->map[channo],
@@ -1043,16 +1040,16 @@
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Doh! no caller profile\n");
switch_core_session_destroy(new_session);
- return SWITCH_STATUS_GENERR;
+ return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
}
switch_channel_set_flag(channel, CF_OUTBOUND);
switch_set_flag_locked(tech_pvt, TFLAG_OUTBOUND);
switch_channel_set_state(channel, CS_INIT);
- return SWITCH_STATUS_SUCCESS;
+ return SWITCH_CAUSE_SUCCESS;
}
- return SWITCH_STATUS_GENERR;
+ return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
}
@@ -1144,9 +1141,12 @@
tech_pvt->cause = pevent->hangup.cause;
- switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING);
+ switch_channel_hangup(channel, tech_pvt->cause);
+ switch_mutex_lock(globals.channel_mutex);
chanmap->map[pevent->hangup.channel][0] = '\0';
+ switch_mutex_unlock(globals.channel_mutex);
+
switch_core_session_rwunlock(session);
}
@@ -1190,6 +1190,7 @@
switch_core_session_message_t *msg;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "-- Proceeding on channel s%dc%d\n", spri->span, pevent->proceeding.channel);
+
channel = switch_core_session_get_channel(session);
assert(channel != NULL);
@@ -1203,7 +1204,7 @@
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Memory Error!\n");
}
-
+
switch_core_session_rwunlock(session);
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "-- Proceeding on channel s%dc%d but it's not in use?\n",
@@ -1463,7 +1464,7 @@
int current_span = 0, min_span = 0, max_span = 0;
switch_xml_t cfg, xml, settings, param, span;
- globals.mtu = DEFAULT_MTU;
+ globals.samples_per_frame = DEFAULT_SAMPLES_PER_FRAME;
globals.dtmf_on = 150;
globals.dtmf_off = 50;
@@ -1482,8 +1483,8 @@
if (!strcmp(var, "debug")) {
globals.debug = atoi(val);
- } else if (!strcmp(var, "mtu")) {
- globals.mtu = atoi(val);
+ } else if (!strcmp(var, "ms-per-frame")) {
+ globals.samples_per_frame = atoi(val) * 8;
} else if (!strcmp(var, "dtmf-on")) {
globals.dtmf_on = atoi(val);
} else if (!strcmp(var, "dtmf-off")) {
@@ -1578,14 +1579,6 @@
SPANS[current_span]->l1 = str2l1(val);
} else if (!strcmp(var, "dialplan")) {
set_global_dialplan(val);
- } else if (!strcmp(var, "mtu")) {
- int mtu = atoi(val);
-
- if (mtu >= 10 && mtu < 960) {
- SPANS[current_span]->mtu = mtu;
- } else {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Invalid MTU (%s)!\n", val);
- }
}
}
}
Modified: freeswitch/trunk/src/mod/endpoints/mod_woomera/mod_woomera.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_woomera/mod_woomera.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_woomera/mod_woomera.c Fri Feb 9 15:03:07 2007
@@ -169,7 +169,7 @@
static switch_status_t woomera_on_ring(switch_core_session_t *session);
static switch_status_t woomera_on_loopback(switch_core_session_t *session);
static switch_status_t woomera_on_transmit(switch_core_session_t *session);
-static switch_status_t woomera_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
+static switch_call_cause_t woomera_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
switch_core_session_t **new_session, switch_memory_pool_t *pool);
static switch_status_t woomera_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
switch_io_flag_t flags, int stream_id);
@@ -481,8 +481,8 @@
/* Make sure when you have 2 sessions in the same scope that you pass the appropriate one to the routines
that allocate memory or you will have 1 channel with memory allocated from another channel's pool!
*/
-static switch_status_t woomera_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
- switch_core_session_t **new_session, switch_memory_pool_t *pool)
+static switch_call_cause_t woomera_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
+ switch_core_session_t **new_session, switch_memory_pool_t *pool)
{
if ((*new_session = switch_core_session_request(&woomera_endpoint_interface, pool)) != 0) {
struct private_object *tech_pvt;
@@ -500,7 +500,7 @@
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Hey where is my memory pool?\n");
switch_core_session_destroy(new_session);
- return SWITCH_STATUS_GENERR;
+ return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
}
if (outbound_profile) {
@@ -516,16 +516,16 @@
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Doh! no caller profile\n");
switch_core_session_destroy(new_session);
- return SWITCH_STATUS_GENERR;
+ return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
}
switch_channel_set_flag(channel, CF_OUTBOUND);
switch_set_flag_locked(tech_pvt, TFLAG_OUTBOUND);
switch_channel_set_state(channel, CS_INIT);
- return SWITCH_STATUS_SUCCESS;
+ return SWITCH_CAUSE_SUCCESS;
}
- return SWITCH_STATUS_GENERR;
+ return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
}
Modified: freeswitch/trunk/src/switch_core.c
==============================================================================
--- freeswitch/trunk/src/switch_core.c (original)
+++ freeswitch/trunk/src/switch_core.c Fri Feb 9 15:03:07 2007
@@ -1542,21 +1542,22 @@
return session->stream_count;
}
-SWITCH_DECLARE(switch_status_t) switch_core_session_outgoing_channel(switch_core_session_t *session,
- char *endpoint_name,
- switch_caller_profile_t *caller_profile,
- switch_core_session_t **new_session,
- switch_memory_pool_t *pool)
+SWITCH_DECLARE(switch_call_cause_t) switch_core_session_outgoing_channel(switch_core_session_t *session,
+ char *endpoint_name,
+ switch_caller_profile_t *caller_profile,
+ switch_core_session_t **new_session,
+ switch_memory_pool_t *pool)
{
switch_io_event_hook_outgoing_channel_t *ptr;
switch_status_t status = SWITCH_STATUS_FALSE;
const switch_endpoint_interface_t *endpoint_interface;
switch_channel_t *channel = NULL;
switch_caller_profile_t *outgoing_profile = caller_profile;
+ switch_call_cause_t cause = SWITCH_CAUSE_REQUESTED_CHAN_UNAVAIL;
if ((endpoint_interface = switch_loadable_module_get_endpoint_interface(endpoint_name)) == 0) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Could not locate channel type %s\n", endpoint_name);
- return SWITCH_STATUS_FALSE;
+ return SWITCH_CAUSE_CHAN_NOT_IMPLEMENTED;
}
if (endpoint_interface->io_routines->outgoing_channel) {
@@ -1595,10 +1596,10 @@
}
}
- if ((status = endpoint_interface->io_routines->outgoing_channel(session,
- outgoing_profile,
- new_session,
- pool)) == SWITCH_STATUS_SUCCESS) {
+ if ((cause = endpoint_interface->io_routines->outgoing_channel(session,
+ outgoing_profile,
+ new_session,
+ pool)) == SWITCH_CAUSE_SUCCESS) {
if (session) {
for (ptr = session->event_hooks.outgoing_channel; ptr; ptr = ptr->next) {
if ((status = ptr->outgoing_channel(session, caller_profile, *new_session)) != SWITCH_STATUS_SUCCESS) {
@@ -1607,11 +1608,11 @@
}
}
} else {
- return status;
+ return cause;
}
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Could not locate outgoing channel interface for %s\n", endpoint_name);
- return SWITCH_STATUS_FALSE;
+ return SWITCH_CAUSE_CHAN_NOT_IMPLEMENTED;
}
if (*new_session) {
@@ -1688,7 +1689,7 @@
}
}
- return status;
+ return cause;
}
SWITCH_DECLARE(switch_status_t) switch_core_session_answer_channel(switch_core_session_t *session)
Modified: freeswitch/trunk/src/switch_ivr.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr.c (original)
+++ freeswitch/trunk/src/switch_ivr.c Fri Feb 9 15:03:07 2007
@@ -2678,8 +2678,8 @@
}
}
- if (switch_core_session_outgoing_channel(session, chan_type, caller_profiles[i], &peer_sessions[i], pool) != SWITCH_STATUS_SUCCESS) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot Create Outgoing Channel!\n");
+ if ((reason = switch_core_session_outgoing_channel(session, chan_type, caller_profiles[i], &peer_sessions[i], pool)) != SWITCH_CAUSE_SUCCESS) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot Create Outgoing Channel! cause: %s\n", switch_channel_cause2str(reason));
if (pool) {
switch_core_destroy_memory_pool(&pool);
}
1
0
[commit] r4180 - in freeswitch/trunk: libs/sofia-sip/libsofia-sip-ua/nua libs/win32/sofia src/mod/endpoints/mod_sofia
by Freeswitch SVN 09 Feb '07
by Freeswitch SVN 09 Feb '07
09 Feb '07
Author: mikej
Date: Fri Feb 9 14:14:20 2007
New Revision: 4180
Modified:
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_session.c
freeswitch/trunk/libs/win32/sofia/libsofia_sip_ua_static.vcproj
freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.vcproj
Log:
merge sofia windows build, add ifdefed out code to avoid assert if it comes back.
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_session.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_session.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_session.c Fri Feb 9 14:14:20 2007
@@ -2043,8 +2043,20 @@
}
assert(ss);
+#if 1
assert(ss->ss_state != nua_callstate_calling);
assert(ss->ss_state != nua_callstate_proceeding);
+#else
+// assert(ss->ss_state != nua_callstate_calling);
+// assert(ss->ss_state != nua_callstate_proceeding);
+ if(ss->ss_state == nua_callstate_calling || ss->ss_state != nua_callstate_proceeding) {
+ /* somthing is badly wrong here. Lets kill it gracefully for now */
+ sr_status(sr, SIP_500_INTERNAL_SERVER_ERROR);
+ signal_call_state_change(nh, NULL, status, phrase,
+ nua_callstate_terminated);
+ return retval;
+ }
+#endif
/* Update session state */
if (status < 300 || application != 0)
Modified: freeswitch/trunk/libs/win32/sofia/libsofia_sip_ua_static.vcproj
==============================================================================
--- freeswitch/trunk/libs/win32/sofia/libsofia_sip_ua_static.vcproj (original)
+++ freeswitch/trunk/libs/win32/sofia/libsofia_sip_ua_static.vcproj Fri Feb 9 14:14:20 2007
@@ -257,6 +257,10 @@
>
</File>
<File
+ RelativePath="..\..\sofia-sip\libsofia-sip-ua\su\su_socket_port.c"
+ >
+ </File>
+ <File
RelativePath="..\..\sofia-sip\libsofia-sip-ua\su\su_sprintf.c"
>
</File>
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.vcproj
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.vcproj (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.vcproj Fri Feb 9 14:14:20 2007
@@ -65,7 +65,7 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib"
+ AdditionalDependencies="ws2_32.lib advapi32.lib iphlpapi.lib"
OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
LinkIncremental="1"
AdditionalLibraryDirectories=""..\..\..\..\w32\vsnet\$(OutDir)";"$(InputDir)..\..\..\..\libs\sofia-sip\win32\pthread""
@@ -147,7 +147,7 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib"
+ AdditionalDependencies="ws2_32.lib advapi32.lib iphlpapi.lib"
OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
LinkIncremental="1"
AdditionalLibraryDirectories=""..\..\..\..\w32\vsnet\$(OutDir)";"$(InputDir)..\..\..\..\libs\sofia-sip\win32\pthread""
1
0
Author: mikej
Date: Fri Feb 9 13:15:36 2007
New Revision: 4179
Added:
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_socket_port.c
freeswitch/trunk/libs/sofia-sip/packages/sofia-sip-1.12.5.spec
Modified:
freeswitch/trunk/libs/sofia-sip/.update
freeswitch/trunk/libs/sofia-sip/config.guess
freeswitch/trunk/libs/sofia-sip/config.sub
freeswitch/trunk/libs/sofia-sip/configure
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/su-glib/Makefile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/Makefile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Makefile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/features/Makefile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/Makefile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/Makefile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/Makefile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/Makefile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/Makefile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/Makefile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/Makefile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/Makefile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/Makefile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/Makefile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/Makefile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/Makefile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/Makefile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/ (props changed)
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/Makefile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/Makefile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/Makefile.in
Log:
updated makefiles and a missing source file from the last sofia merge
Modified: freeswitch/trunk/libs/sofia-sip/.update
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/.update (original)
+++ freeswitch/trunk/libs/sofia-sip/.update Fri Feb 9 13:15:36 2007
@@ -1 +1 @@
-Fri Feb 9 12:57:20 EST 2007
+Fri Feb 9 13:12:04 EST 2007
Modified: freeswitch/trunk/libs/sofia-sip/config.guess
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/config.guess (original)
+++ freeswitch/trunk/libs/sofia-sip/config.guess Fri Feb 9 13:15:36 2007
@@ -1,9 +1,9 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-timestamp='2005-12-13'
+timestamp='2004-09-07'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -17,15 +17,13 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
-
# Originally written by Per Bothner <per(a)bothner.com>.
# Please send patches to <config-patches(a)gnu.org>. Submit a context
# diff and a properly formatted ChangeLog entry.
@@ -55,7 +53,7 @@
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
@@ -68,11 +66,11 @@
while test $# -gt 0 ; do
case $1 in
--time-stamp | --time* | -t )
- echo "$timestamp" ; exit ;;
+ echo "$timestamp" ; exit 0 ;;
--version | -v )
- echo "$version" ; exit ;;
+ echo "$version" ; exit 0 ;;
--help | --h* | -h )
- echo "$usage"; exit ;;
+ echo "$usage"; exit 0 ;;
-- ) # Stop option processing
shift; break ;;
- ) # Use stdin as input.
@@ -125,7 +123,7 @@
;;
,,*) CC_FOR_BUILD=$CC ;;
,*,*) CC_FOR_BUILD=$HOST_CC ;;
-esac ; set_cc_for_build= ;'
+esac ;'
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi(a)noc.rutgers.edu 1994-08-24)
@@ -198,20 +196,55 @@
# contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}"
- exit ;;
+ exit 0 ;;
+ amd64:OpenBSD:*:*)
+ echo x86_64-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ amiga:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ cats:OpenBSD:*:*)
+ echo arm-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ hp300:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ luna88k:OpenBSD:*:*)
+ echo m88k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mac68k:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ macppc:OpenBSD:*:*)
+ echo powerpc-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvme68k:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvme88k:OpenBSD:*:*)
+ echo m88k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvmeppc:OpenBSD:*:*)
+ echo powerpc-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sgi:OpenBSD:*:*)
+ echo mips64-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sun3:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
*:OpenBSD:*:*)
- UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
- echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
- exit ;;
+ echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
*:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
macppc:MirBSD:*:*)
echo powerppc-unknown-mirbsd${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
*:MirBSD:*:*)
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
alpha:OSF1:*:*)
case $UNAME_RELEASE in
*4.0)
@@ -264,43 +297,37 @@
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- exit ;;
+ exit 0 ;;
Alpha\ *:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# Should we change UNAME_MACHINE based on the output of uname instead
# of the specific Alpha model?
echo alpha-pc-interix
- exit ;;
+ exit 0 ;;
21064:Windows_NT:50:3)
echo alpha-dec-winnt3.5
- exit ;;
+ exit 0 ;;
Amiga*:UNIX_System_V:4.0:*)
echo m68k-unknown-sysv4
- exit ;;
+ exit 0;;
*:[Aa]miga[Oo][Ss]:*:*)
echo ${UNAME_MACHINE}-unknown-amigaos
- exit ;;
+ exit 0 ;;
*:[Mm]orph[Oo][Ss]:*:*)
echo ${UNAME_MACHINE}-unknown-morphos
- exit ;;
+ exit 0 ;;
*:OS/390:*:*)
echo i370-ibm-openedition
- exit ;;
- *:z/VM:*:*)
- echo s390-ibm-zvmoe
- exit ;;
+ exit 0 ;;
*:OS400:*:*)
echo powerpc-ibm-os400
- exit ;;
+ exit 0 ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
- exit ;;
- arm:riscos:*:*|arm:RISCOS:*:*)
- echo arm-unknown-riscos
- exit ;;
+ exit 0;;
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
echo hppa1.1-hitachi-hiuxmpp
- exit ;;
+ exit 0;;
Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
# akee(a)wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
if test "`(/bin/universe) 2>/dev/null`" = att ; then
@@ -308,32 +335,32 @@
else
echo pyramid-pyramid-bsd
fi
- exit ;;
+ exit 0 ;;
NILE*:*:*:dcosx)
echo pyramid-pyramid-svr4
- exit ;;
+ exit 0 ;;
DRS?6000:unix:4.0:6*)
echo sparc-icl-nx6
- exit ;;
- DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ exit 0 ;;
+ DRS?6000:UNIX_SV:4.2*:7*)
case `/usr/bin/uname -p` in
- sparc) echo sparc-icl-nx7; exit ;;
+ sparc) echo sparc-icl-nx7 && exit 0 ;;
esac ;;
sun4H:SunOS:5.*:*)
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
+ exit 0 ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
+ exit 0 ;;
i86pc:SunOS:5.*:*)
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
+ exit 0 ;;
sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize
# SunOS6. Hard to guess exactly what SunOS6 will be like, but
# it's likely to be more like Solaris than SunOS4.
echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
+ exit 0 ;;
sun4*:SunOS:*:*)
case "`/usr/bin/arch -k`" in
Series*|S4*)
@@ -342,10 +369,10 @@
esac
# Japanese Language versions have a version number like `4.1.3-JL'.
echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
- exit ;;
+ exit 0 ;;
sun3*:SunOS:*:*)
echo m68k-sun-sunos${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
sun*:*:4.2BSD:*)
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
@@ -357,10 +384,10 @@
echo sparc-sun-sunos${UNAME_RELEASE}
;;
esac
- exit ;;
+ exit 0 ;;
aushp:SunOS:*:*)
echo sparc-auspex-sunos${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
# The situation for MiNT is a little confusing. The machine name
# can be virtually everything (everything which is not
# "atarist" or "atariste" at least should have a processor
@@ -371,40 +398,40 @@
# be no problem.
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
echo m68k-milan-mint${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
echo m68k-hades-mint${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
echo m68k-unknown-mint${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
m68k:machten:*:*)
echo m68k-apple-machten${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
powerpc:machten:*:*)
echo powerpc-apple-machten${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
RISC*:Mach:*:*)
echo mips-dec-mach_bsd4.3
- exit ;;
+ exit 0 ;;
RISC*:ULTRIX:*:*)
echo mips-dec-ultrix${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
VAX*:ULTRIX*:*:*)
echo vax-dec-ultrix${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
2020:CLIX:*:* | 2430:CLIX:*:*)
echo clipper-intergraph-clix${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
@@ -428,33 +455,32 @@
exit (-1);
}
EOF
- $CC_FOR_BUILD -o $dummy $dummy.c &&
- dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
- SYSTEM_NAME=`$dummy $dummyarg` &&
- { echo "$SYSTEM_NAME"; exit; }
+ $CC_FOR_BUILD -o $dummy $dummy.c \
+ && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+ && exit 0
echo mips-mips-riscos${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
Motorola:PowerMAX_OS:*:*)
echo powerpc-motorola-powermax
- exit ;;
+ exit 0 ;;
Motorola:*:4.3:PL8-*)
echo powerpc-harris-powermax
- exit ;;
+ exit 0 ;;
Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
echo powerpc-harris-powermax
- exit ;;
+ exit 0 ;;
Night_Hawk:Power_UNIX:*:*)
echo powerpc-harris-powerunix
- exit ;;
+ exit 0 ;;
m88k:CX/UX:7*:*)
echo m88k-harris-cxux7
- exit ;;
+ exit 0 ;;
m88k:*:4*:R4*)
echo m88k-motorola-sysv4
- exit ;;
+ exit 0 ;;
m88k:*:3*:R3*)
echo m88k-motorola-sysv3
- exit ;;
+ exit 0 ;;
AViiON:dgux:*:*)
# DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`/usr/bin/uname -p`
@@ -470,29 +496,29 @@
else
echo i586-dg-dgux${UNAME_RELEASE}
fi
- exit ;;
+ exit 0 ;;
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
echo m88k-dolphin-sysv3
- exit ;;
+ exit 0 ;;
M88*:*:R3*:*)
# Delta 88k system running SVR3
echo m88k-motorola-sysv3
- exit ;;
+ exit 0 ;;
XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
echo m88k-tektronix-sysv3
- exit ;;
+ exit 0 ;;
Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
echo m68k-tektronix-bsd
- exit ;;
+ exit 0 ;;
*:IRIX*:*:*)
echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
- exit ;;
+ exit 0 ;;
????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
- exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
i*86:AIX:*:*)
echo i386-ibm-aix
- exit ;;
+ exit 0 ;;
ia64:AIX:*:*)
if [ -x /usr/bin/oslevel ] ; then
IBM_REV=`/usr/bin/oslevel`
@@ -500,7 +526,7 @@
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
fi
echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
- exit ;;
+ exit 0 ;;
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
eval $set_cc_for_build
@@ -515,18 +541,14 @@
exit(0);
}
EOF
- if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
- then
- echo "$SYSTEM_NAME"
- else
- echo rs6000-ibm-aix3.2.5
- fi
+ $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
+ echo rs6000-ibm-aix3.2.5
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
echo rs6000-ibm-aix3.2.4
else
echo rs6000-ibm-aix3.2
fi
- exit ;;
+ exit 0 ;;
*:AIX:*:[45])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
@@ -540,28 +562,28 @@
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
fi
echo ${IBM_ARCH}-ibm-aix${IBM_REV}
- exit ;;
+ exit 0 ;;
*:AIX:*:*)
echo rs6000-ibm-aix
- exit ;;
+ exit 0 ;;
ibmrt:4.4BSD:*|romp-ibm:BSD:*)
echo romp-ibm-bsd4.4
- exit ;;
+ exit 0 ;;
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
- exit ;; # report: romp-ibm BSD 4.3
+ exit 0 ;; # report: romp-ibm BSD 4.3
*:BOSX:*:*)
echo rs6000-bull-bosx
- exit ;;
+ exit 0 ;;
DPX/2?00:B.O.S.:*:*)
echo m68k-bull-sysv3
- exit ;;
+ exit 0 ;;
9000/[34]??:4.3bsd:1.*:*)
echo m68k-hp-bsd
- exit ;;
+ exit 0 ;;
hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
echo m68k-hp-bsd4.4
- exit ;;
+ exit 0 ;;
9000/[34678]??:HP-UX:*:*)
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
case "${UNAME_MACHINE}" in
@@ -623,19 +645,9 @@
esac
if [ ${HP_ARCH} = "hppa2.0w" ]
then
- eval $set_cc_for_build
-
- # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
- # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
- # generating 64-bit code. GNU and HP use different nomenclature:
- #
- # $ CC_FOR_BUILD=cc ./config.guess
- # => hppa2.0w-hp-hpux11.23
- # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
- # => hppa64-hp-hpux11.23
-
- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
- grep __LP64__ >/dev/null
+ # avoid double evaluation of $set_cc_for_build
+ test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
then
HP_ARCH="hppa2.0w"
else
@@ -643,11 +655,11 @@
fi
fi
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
- exit ;;
+ exit 0 ;;
ia64:HP-UX:*:*)
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
echo ia64-hp-hpux${HPUX_REV}
- exit ;;
+ exit 0 ;;
3050*:HI-UX:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
@@ -675,166 +687,158 @@
exit (0);
}
EOF
- $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
- { echo "$SYSTEM_NAME"; exit; }
+ $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
echo unknown-hitachi-hiuxwe2
- exit ;;
+ exit 0 ;;
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
echo hppa1.1-hp-bsd
- exit ;;
+ exit 0 ;;
9000/8??:4.3bsd:*:*)
echo hppa1.0-hp-bsd
- exit ;;
+ exit 0 ;;
*9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
echo hppa1.0-hp-mpeix
- exit ;;
+ exit 0 ;;
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
echo hppa1.1-hp-osf
- exit ;;
+ exit 0 ;;
hp8??:OSF1:*:*)
echo hppa1.0-hp-osf
- exit ;;
+ exit 0 ;;
i*86:OSF1:*:*)
if [ -x /usr/sbin/sysversion ] ; then
echo ${UNAME_MACHINE}-unknown-osf1mk
else
echo ${UNAME_MACHINE}-unknown-osf1
fi
- exit ;;
+ exit 0 ;;
parisc*:Lites*:*:*)
echo hppa1.1-hp-lites
- exit ;;
+ exit 0 ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd
- exit ;;
+ exit 0 ;;
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
- exit ;;
+ exit 0 ;;
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
echo c34-convex-bsd
- exit ;;
+ exit 0 ;;
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
echo c38-convex-bsd
- exit ;;
+ exit 0 ;;
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
echo c4-convex-bsd
- exit ;;
+ exit 0 ;;
CRAY*Y-MP:*:*:*)
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
+ exit 0 ;;
CRAY*[A-Z]90:*:*:*)
echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
-e 's/\.[^.]*$/.X/'
- exit ;;
+ exit 0 ;;
CRAY*TS:*:*:*)
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
+ exit 0 ;;
CRAY*T3E:*:*:*)
echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
+ exit 0 ;;
CRAY*SV1:*:*:*)
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
+ exit 0 ;;
*:UNICOS/mp:*:*)
echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
+ exit 0 ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit ;;
+ exit 0 ;;
5000:UNIX_System_V:4.*:*)
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit ;;
+ exit 0 ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
sparc*:BSD/OS:*:*)
echo sparc-unknown-bsdi${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
*:BSD/OS:*:*)
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
*:FreeBSD:*:*)
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
- exit ;;
+ exit 0 ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
- exit ;;
+ exit 0 ;;
i*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
- exit ;;
- i*:windows32*:*)
- # uname -m includes "-pc" on this system.
- echo ${UNAME_MACHINE}-mingw32
- exit ;;
+ exit 0 ;;
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
- exit ;;
- x86:Interix*:[345]*)
+ exit 0 ;;
+ x86:Interix*:[34]*)
echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
- exit ;;
+ exit 0 ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
- exit ;;
+ exit 0 ;;
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
# UNAME_MACHINE based on the output of uname instead of i386?
echo i586-pc-interix
- exit ;;
+ exit 0 ;;
i*:UWIN*:*)
echo ${UNAME_MACHINE}-pc-uwin
- exit ;;
- amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
- echo x86_64-unknown-cygwin
- exit ;;
+ exit 0 ;;
p*:CYGWIN*:*)
echo powerpcle-unknown-cygwin
- exit ;;
+ exit 0 ;;
prep*:SunOS:5.*:*)
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
+ exit 0 ;;
*:GNU:*:*)
# the GNU system
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
- exit ;;
+ exit 0 ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
- exit ;;
+ exit 0 ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
- exit ;;
+ exit 0 ;;
arm*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
+ exit 0 ;;
cris:Linux:*:*)
echo cris-axis-linux-gnu
- exit ;;
+ exit 0 ;;
crisv32:Linux:*:*)
echo crisv32-axis-linux-gnu
- exit ;;
+ exit 0 ;;
frv:Linux:*:*)
echo frv-unknown-linux-gnu
- exit ;;
+ exit 0 ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
+ exit 0 ;;
m32r*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
+ exit 0 ;;
m68*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
+ exit 0 ;;
mips:Linux:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
@@ -851,8 +855,8 @@
#endif
#endif
EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`"
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+ test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
;;
mips64:Linux:*:*)
eval $set_cc_for_build
@@ -870,18 +874,15 @@
#endif
#endif
EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`"
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+ test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
;;
- or32:Linux:*:*)
- echo or32-unknown-linux-gnu
- exit ;;
ppc:Linux:*:*)
echo powerpc-unknown-linux-gnu
- exit ;;
+ exit 0 ;;
ppc64:Linux:*:*)
echo powerpc64-unknown-linux-gnu
- exit ;;
+ exit 0 ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
EV5) UNAME_MACHINE=alphaev5 ;;
@@ -895,7 +896,7 @@
objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
- exit ;;
+ exit 0 ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
@@ -903,28 +904,25 @@
PA8*) echo hppa2.0-unknown-linux-gnu ;;
*) echo hppa-unknown-linux-gnu ;;
esac
- exit ;;
+ exit 0 ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
echo hppa64-unknown-linux-gnu
- exit ;;
+ exit 0 ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux
- exit ;;
+ exit 0 ;;
sh64*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
+ exit 0 ;;
sh*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
+ exit 0 ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- vax:Linux:*:*)
- echo ${UNAME_MACHINE}-dec-linux-gnu
- exit ;;
+ exit 0 ;;
x86_64:Linux:*:*)
echo x86_64-unknown-linux-gnu
- exit ;;
+ exit 0 ;;
i*86:Linux:*:*)
# The BFD linker knows what the default object file format is, so
# first see if it will tell us. cd to the root directory to prevent
@@ -942,15 +940,15 @@
;;
a.out-i386-linux)
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
- exit ;;
+ exit 0 ;;
coff-i386)
echo "${UNAME_MACHINE}-pc-linux-gnucoff"
- exit ;;
+ exit 0 ;;
"")
# Either a pre-BFD a.out linker (linux-gnuoldld) or
# one that does not give us useful --help.
echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
- exit ;;
+ exit 0 ;;
esac
# Determine whether the default compiler is a.out or elf
eval $set_cc_for_build
@@ -967,7 +965,7 @@
LIBC=gnulibc1
# endif
#else
- #if defined(__INTEL_COMPILER) || defined(__PGI)
+ #ifdef __INTEL_COMPILER
LIBC=gnu
#else
LIBC=gnuaout
@@ -977,19 +975,16 @@
LIBC=dietlibc
#endif
EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^LIBC/{s: ::g;p;}'`"
- test x"${LIBC}" != x && {
- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
- exit
- }
- test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+ test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
+ test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
# earlier versions are messed up and put the nodename in both
# sysname and nodename.
echo i386-sequent-sysv4
- exit ;;
+ exit 0 ;;
i*86:UNIX_SV:4.2MP:2.*)
# Unixware is an offshoot of SVR4, but it has its own version
# number series starting with 2...
@@ -997,27 +992,27 @@
# I just have to hope. -- rms.
# Use sysv4.2uw... so that sysv4* matches it.
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
- exit ;;
+ exit 0 ;;
i*86:OS/2:*:*)
# If we were able to find `uname', then EMX Unix compatibility
# is probably installed.
echo ${UNAME_MACHINE}-pc-os2-emx
- exit ;;
+ exit 0 ;;
i*86:XTS-300:*:STOP)
echo ${UNAME_MACHINE}-unknown-stop
- exit ;;
+ exit 0 ;;
i*86:atheos:*:*)
echo ${UNAME_MACHINE}-unknown-atheos
- exit ;;
- i*86:syllable:*:*)
+ exit 0 ;;
+ i*86:syllable:*:*)
echo ${UNAME_MACHINE}-pc-syllable
- exit ;;
+ exit 0 ;;
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
i*86:*DOS:*:*)
echo ${UNAME_MACHINE}-pc-msdosdjgpp
- exit ;;
+ exit 0 ;;
i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
@@ -1025,16 +1020,15 @@
else
echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
fi
- exit ;;
- i*86:*:5:[678]*)
- # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ exit 0 ;;
+ i*86:*:5:[78]*)
case `/bin/uname -X | grep "^Machine"` in
*486*) UNAME_MACHINE=i486 ;;
*Pentium) UNAME_MACHINE=i586 ;;
*Pent*|*Celeron) UNAME_MACHINE=i686 ;;
esac
echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
- exit ;;
+ exit 0 ;;
i*86:*:3.2:*)
if test -f /usr/options/cb.name; then
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
@@ -1052,73 +1046,73 @@
else
echo ${UNAME_MACHINE}-pc-sysv32
fi
- exit ;;
+ exit 0 ;;
pc:*:*:*)
# Left here for compatibility:
# uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i386.
echo i386-pc-msdosdjgpp
- exit ;;
+ exit 0 ;;
Intel:Mach:3*:*)
echo i386-pc-mach3
- exit ;;
+ exit 0 ;;
paragon:*:*:*)
echo i860-intel-osf1
- exit ;;
+ exit 0 ;;
i860:*:4.*:*) # i860-SVR4
if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
else # Add other i860-SVR4 vendors below as they are discovered.
echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
fi
- exit ;;
+ exit 0 ;;
mini*:CTIX:SYS*5:*)
# "miniframe"
echo m68010-convergent-sysv
- exit ;;
+ exit 0 ;;
mc68k:UNIX:SYSTEM5:3.51m)
echo m68k-convergent-sysv
- exit ;;
+ exit 0 ;;
M680?0:D-NIX:5.3:*)
echo m68k-diab-dnix
- exit ;;
+ exit 0 ;;
M68*:*:R3V[5678]*:*)
- test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
OS_REL=''
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ && echo i486-ncr-sysv4.3${OS_REL} && exit 0
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4; exit; } ;;
+ && echo i486-ncr-sysv4 && exit 0 ;;
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
echo m68k-unknown-lynxos${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4
- exit ;;
+ exit 0 ;;
TSUNAMI:LynxOS:2.*:*)
echo sparc-unknown-lynxos${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
rs6000:LynxOS:2.*:*)
echo rs6000-unknown-lynxos${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
echo powerpc-unknown-lynxos${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
SM[BE]S:UNIX_SV:*:*)
echo mips-dde-sysv${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
RM*:ReliantUNIX-*:*:*)
echo mips-sni-sysv4
- exit ;;
+ exit 0 ;;
RM*:SINIX-*:*:*)
echo mips-sni-sysv4
- exit ;;
+ exit 0 ;;
*:SINIX-*:*:*)
if uname -p 2>/dev/null >/dev/null ; then
UNAME_MACHINE=`(uname -p) 2>/dev/null`
@@ -1126,72 +1120,69 @@
else
echo ns32k-sni-sysv
fi
- exit ;;
+ exit 0 ;;
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
# says <Richard.M.Bartel(a)ccMail.Census.GOV>
echo i586-unisys-sysv4
- exit ;;
+ exit 0 ;;
*:UNIX_System_V:4*:FTX*)
# From Gerald Hewes <hewes(a)openmarket.com>.
# How about differentiating between stratus architectures? -djm
echo hppa1.1-stratus-sysv4
- exit ;;
+ exit 0 ;;
*:*:*:FTX*)
# From seanf(a)swdc.stratus.com.
echo i860-stratus-sysv4
- exit ;;
- i*86:VOS:*:*)
- # From Paul.Green(a)stratus.com.
- echo ${UNAME_MACHINE}-stratus-vos
- exit ;;
+ exit 0 ;;
*:VOS:*:*)
# From Paul.Green(a)stratus.com.
echo hppa1.1-stratus-vos
- exit ;;
+ exit 0 ;;
mc68*:A/UX:*:*)
echo m68k-apple-aux${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
news*:NEWS-OS:6*:*)
echo mips-sony-newsos6
- exit ;;
+ exit 0 ;;
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
if [ -d /usr/nec ]; then
echo mips-nec-sysv${UNAME_RELEASE}
else
echo mips-unknown-sysv${UNAME_RELEASE}
fi
- exit ;;
+ exit 0 ;;
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
echo powerpc-be-beos
- exit ;;
+ exit 0 ;;
BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
echo powerpc-apple-beos
- exit ;;
+ exit 0 ;;
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
echo i586-pc-beos
- exit ;;
+ exit 0 ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
SX-5:SUPER-UX:*:*)
echo sx5-nec-superux${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
SX-6:SUPER-UX:*:*)
echo sx6-nec-superux${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
*:Rhapsody:*:*)
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
case $UNAME_PROCESSOR in
+ *86) UNAME_PROCESSOR=i686 ;;
unknown) UNAME_PROCESSOR=powerpc ;;
esac
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
UNAME_PROCESSOR=`uname -p`
if test "$UNAME_PROCESSOR" = "x86"; then
@@ -1199,25 +1190,22 @@
UNAME_MACHINE=pc
fi
echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
*:QNX:*:4*)
echo i386-pc-qnx
- exit ;;
- NSE-?:NONSTOP_KERNEL:*:*)
- echo nse-tandem-nsk${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
NSR-?:NONSTOP_KERNEL:*:*)
echo nsr-tandem-nsk${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
*:NonStop-UX:*:*)
echo mips-compaq-nonstopux
- exit ;;
+ exit 0 ;;
BS2000:POSIX*:*:*)
echo bs2000-siemens-sysv
- exit ;;
+ exit 0 ;;
DS/*:UNIX_System_V:*:*)
echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
*:Plan9:*:*)
# "uname -m" is not consistent, so use $cputype instead. 386
# is converted to i386 for consistency with other x86
@@ -1228,47 +1216,38 @@
UNAME_MACHINE="$cputype"
fi
echo ${UNAME_MACHINE}-unknown-plan9
- exit ;;
+ exit 0 ;;
*:TOPS-10:*:*)
echo pdp10-unknown-tops10
- exit ;;
+ exit 0 ;;
*:TENEX:*:*)
echo pdp10-unknown-tenex
- exit ;;
+ exit 0 ;;
KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
echo pdp10-dec-tops20
- exit ;;
+ exit 0 ;;
XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
echo pdp10-xkl-tops20
- exit ;;
+ exit 0 ;;
*:TOPS-20:*:*)
echo pdp10-unknown-tops20
- exit ;;
+ exit 0 ;;
*:ITS:*:*)
echo pdp10-unknown-its
- exit ;;
+ exit 0 ;;
SEI:*:*:SEIUX)
echo mips-sei-seiux${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
*:DragonFly:*:*)
echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
- exit ;;
+ exit 0 ;;
*:*VMS:*:*)
UNAME_MACHINE=`(uname -p) 2>/dev/null`
case "${UNAME_MACHINE}" in
- A*) echo alpha-dec-vms ; exit ;;
- I*) echo ia64-dec-vms ; exit ;;
- V*) echo vax-dec-vms ; exit ;;
- esac ;;
- *:XENIX:*:SysV)
- echo i386-pc-xenix
- exit ;;
- i*86:skyos:*:*)
- echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
- exit ;;
- i*86:rdos:*:*)
- echo ${UNAME_MACHINE}-pc-rdos
- exit ;;
+ A*) echo alpha-dec-vms && exit 0 ;;
+ I*) echo ia64-dec-vms && exit 0 ;;
+ V*) echo vax-dec-vms && exit 0 ;;
+ esac
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
@@ -1300,7 +1279,7 @@
#endif
#if defined (__arm) && defined (__acorn) && defined (__unix)
- printf ("arm-acorn-riscix\n"); exit (0);
+ printf ("arm-acorn-riscix"); exit (0);
#endif
#if defined (hp300) && !defined (hpux)
@@ -1389,12 +1368,11 @@
}
EOF
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
- { echo "$SYSTEM_NAME"; exit; }
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
# Apollos put the system type in the environment.
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
# Convex versions that predate uname can use getsysinfo(1)
@@ -1403,22 +1381,22 @@
case `getsysinfo -f cpu_type` in
c1*)
echo c1-convex-bsd
- exit ;;
+ exit 0 ;;
c2*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
- exit ;;
+ exit 0 ;;
c34*)
echo c34-convex-bsd
- exit ;;
+ exit 0 ;;
c38*)
echo c38-convex-bsd
- exit ;;
+ exit 0 ;;
c4*)
echo c4-convex-bsd
- exit ;;
+ exit 0 ;;
esac
fi
@@ -1429,9 +1407,7 @@
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from
- http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.gue…
-and
- http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
+ ftp://ftp.gnu.org/pub/gnu/config/
If the version you run ($0) is already up to date, please
send the following data and any information you think might be
Modified: freeswitch/trunk/libs/sofia-sip/config.sub
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/config.sub (original)
+++ freeswitch/trunk/libs/sofia-sip/config.sub Fri Feb 9 13:15:36 2007
@@ -1,9 +1,9 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-timestamp='2005-12-11'
+timestamp='2004-08-29'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -21,15 +21,14 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
-#
+# Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
-
# Please send patches to <config-patches(a)gnu.org>. Submit a context
# diff and a properly formatted ChangeLog entry.
#
@@ -71,7 +70,7 @@
version="\
GNU config.sub ($timestamp)
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
@@ -84,11 +83,11 @@
while test $# -gt 0 ; do
case $1 in
--time-stamp | --time* | -t )
- echo "$timestamp" ; exit ;;
+ echo "$timestamp" ; exit 0 ;;
--version | -v )
- echo "$version" ; exit ;;
+ echo "$version" ; exit 0 ;;
--help | --h* | -h )
- echo "$usage"; exit ;;
+ echo "$usage"; exit 0 ;;
-- ) # Stop option processing
shift; break ;;
- ) # Use stdin as input.
@@ -100,7 +99,7 @@
*local*)
# First pass through any local machine types.
echo $1
- exit ;;
+ exit 0;;
* )
break ;;
@@ -119,9 +118,8 @@
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
- nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
- uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
- storm-chaos* | os2-emx* | rtmk-nova*)
+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
+ kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@@ -172,10 +170,6 @@
-hiux*)
os=-hiuxwe2
;;
- -sco6)
- os=-sco5v6
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
-sco5)
os=-sco3.2v5
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -192,10 +186,6 @@
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
- -sco5v6*)
- # Don't forget version if it is 3.2v4 or newer.
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
-sco*)
os=-sco3.2v2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -241,14 +231,13 @@
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
- | bfin \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
| fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
- | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
+ | m32r | m32rle | m68000 | m68k | m88k | mcore \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@@ -257,7 +246,6 @@
| mips64vr4100 | mips64vr4100el \
| mips64vr4300 | mips64vr4300el \
| mips64vr5000 | mips64vr5000el \
- | mips64vr5900 | mips64vr5900el \
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
| mipsisa64 | mipsisa64el \
@@ -266,28 +254,23 @@
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
- | mt \
| msp430 \
| ns16k | ns32k \
- | or32 \
+ | openrisc | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
- | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+ | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
- | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
- | sparcv8 | sparcv9 | sparcv9b \
+ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
| strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \
| we32k \
- | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
+ | x86 | xscale | xstormy16 | xtensa \
| z8k)
basic_machine=$basic_machine-unknown
;;
- m32c)
- basic_machine=$basic_machine-unknown
- ;;
m6811 | m68hc11 | m6812 | m68hc12)
# Motorola 68HC11/12.
basic_machine=$basic_machine-unknown
@@ -295,9 +278,6 @@
;;
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
;;
- ms1)
- basic_machine=mt-unknown
- ;;
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
@@ -318,7 +298,7 @@
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* \
- | bfin-* | bs2000-* \
+ | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
@@ -330,7 +310,7 @@
| ip2k-* | iq2000-* \
| m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | maxq-* | mcore-* \
+ | m88110-* | m88k-* | mcore-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
@@ -339,7 +319,6 @@
| mips64vr4100-* | mips64vr4100el-* \
| mips64vr4300-* | mips64vr4300el-* \
| mips64vr5000-* | mips64vr5000el-* \
- | mips64vr5900-* | mips64vr5900el-* \
| mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \
| mipsisa64-* | mipsisa64el-* \
@@ -348,7 +327,6 @@
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
- | mt-* \
| msp430-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \
@@ -356,23 +334,20 @@
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* \
- | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+ | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
- | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
- | sparclite-* \
+ | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tron-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
- | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
- | xstormy16-* | xtensa-* \
+ | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
+ | xtensa-* \
| ymp-* \
| z8k-*)
;;
- m32c-*)
- ;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
386bsd)
@@ -514,10 +489,6 @@
basic_machine=m88k-motorola
os=-sysv3
;;
- djgpp)
- basic_machine=i586-pc
- os=-msdosdjgpp
- ;;
dpx20 | dpx20-*)
basic_machine=rs6000-bull
os=-bosx
@@ -708,9 +679,6 @@
basic_machine=i386-pc
os=-msdos
;;
- ms1-*)
- basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
- ;;
mvs)
basic_machine=i370-ibm
os=-mvs
@@ -786,8 +754,9 @@
basic_machine=hppa1.1-oki
os=-proelf
;;
- openrisc | openrisc-*)
+ or32 | or32-*)
basic_machine=or32-unknown
+ os=-coff
;;
os400)
basic_machine=powerpc-ibm
@@ -874,10 +843,6 @@
basic_machine=i586-unknown
os=-pw32
;;
- rdos)
- basic_machine=i386-pc
- os=-rdos
- ;;
rom68k)
basic_machine=m68k-rom68k
os=-coff
@@ -1064,10 +1029,6 @@
basic_machine=hppa1.1-winbond
os=-proelf
;;
- xbox)
- basic_machine=i686-pc
- os=-mingw32
- ;;
xps | xps100)
basic_machine=xps100-honeywell
;;
@@ -1117,9 +1078,12 @@
we32k)
basic_machine=we32k-att
;;
- sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
+ sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
sparc | sparcv8 | sparcv9 | sparcv9b)
basic_machine=sparc-sun
;;
@@ -1200,15 +1164,13 @@
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
- | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos*)
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1226,7 +1188,7 @@
os=`echo $os | sed -e 's|nto|nto-qnx|'`
;;
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
- | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
;;
-mac*)
@@ -1335,9 +1297,6 @@
-kaos*)
os=-kaos
;;
- -zvmoe)
- os=-zvmoe
- ;;
-none)
;;
*)
@@ -1415,9 +1374,6 @@
*-be)
os=-beos
;;
- *-haiku)
- os=-haiku
- ;;
*-ibm)
os=-aix
;;
@@ -1589,7 +1545,7 @@
esac
echo $basic_machine$os
-exit
+exit 0
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
Modified: freeswitch/trunk/libs/sofia-sip/configure
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/configure (original)
+++ freeswitch/trunk/libs/sofia-sip/configure Fri Feb 9 13:15:36 2007
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for sofia-sip 1.12.4work.
+# Generated by GNU Autoconf 2.59 for sofia-sip 1.12.5.
#
# Copyright (C) 2003 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
@@ -421,8 +421,8 @@
# Identity of this package.
PACKAGE_NAME='sofia-sip'
PACKAGE_TARNAME='sofia-sip'
-PACKAGE_VERSION='1.12.4work'
-PACKAGE_STRING='sofia-sip 1.12.4work'
+PACKAGE_VERSION='1.12.5'
+PACKAGE_STRING='sofia-sip 1.12.5'
PACKAGE_BUGREPORT=''
ac_unique_file="libsofia-sip-ua/sip/sofia-sip/sip.h"
@@ -956,7 +956,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures sofia-sip 1.12.4work to adapt to many kinds of systems.
+\`configure' configures sofia-sip 1.12.5 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1023,7 +1023,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of sofia-sip 1.12.4work:";;
+ short | recursive ) echo "Configuration of sofia-sip 1.12.5:";;
esac
cat <<\_ACEOF
@@ -1183,7 +1183,7 @@
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
-sofia-sip configure 1.12.4work
+sofia-sip configure 1.12.5
generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc.
@@ -1197,7 +1197,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by sofia-sip $as_me 1.12.4work, which was
+It was created by sofia-sip $as_me 1.12.5, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
@@ -1538,11 +1538,11 @@
include_sofiadir='${includedir}/sofia-sip-1.12'
-LIBVER_SOFIA_SIP_UA_CUR=3
+LIBVER_SOFIA_SIP_UA_CUR=4
LIBVER_SOFIA_SIP_UA_REV=0
-LIBVER_SOFIA_SIP_UA_AGE=3
+LIBVER_SOFIA_SIP_UA_AGE=4
LIBVER_SOFIA_SIP_UA_SOVER=0
# CUR-AGE
@@ -1977,7 +1977,7 @@
# Define the identity of the package.
PACKAGE='sofia-sip'
- VERSION='1.12.4work'
+ VERSION='1.12.5'
cat >>confdefs.h <<_ACEOF
@@ -21521,11 +21521,6 @@
### Test if we have stack suitable for handling tags directly
###
-test -z "$ac_cv_tagstack" &&
-case "$target" in
-i?86-*-* ) ac_cv_tagstack=yes ;;
-esac
-
echo "$as_me:$LINENO: checking for stack suitable for tags" >&5
echo $ECHO_N "checking for stack suitable for tags... $ECHO_C" >&6
if test "${ac_cv_tagstack+set}" = set; then
@@ -21535,9 +21530,19 @@
ac_cv_tagstack=no
if test "$cross_compiling" = yes; then
- ac_cv_tagstack=no
+
+case "$target" in
+i?86-*-* ) ac_cv_tagstack=yes ;;
+* ) ac_cv_tagstack=no ;;
+esac
+
else
cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#if HAVE_INTTYPES_H
#include <inttypes.h>
@@ -21545,6 +21550,7 @@
#if HAVE_STDINT_H
#include <stdint.h>
#endif
+
#include <stdarg.h>
typedef void *tp;
@@ -27852,7 +27858,7 @@
} >&5
cat >&5 <<_CSEOF
-This file was extended by sofia-sip $as_me 1.12.4work, which was
+This file was extended by sofia-sip $as_me 1.12.5, which was
generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -27915,7 +27921,7 @@
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-sofia-sip config.status 1.12.4work
+sofia-sip config.status 1.12.5
configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/su-glib/Makefile.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/su-glib/Makefile.in (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/su-glib/Makefile.in Fri Feb 9 13:15:36 2007
@@ -330,7 +330,8 @@
# ----------------------------------------------------------------------
# Automake options
AUTOMAKE_OPTIONS = foreign
-AM_CFLAGS = $(CWFLAG) $(SOFIA_COVERAGE) $(am__append_2)
+AM_CFLAGS = $(CWFLAG) $(SOFIA_COVERAGE) $(SOFIA_CFLAGS) \
+ $(am__append_2)
DISTCLEANFILES = $(BUILT_SOURCES)
# rules for building tag files
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/Makefile.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/Makefile.in (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/Makefile.in Fri Feb 9 13:15:36 2007
@@ -303,7 +303,8 @@
# ----------------------------------------------------------------------
# Tests
TESTS = torture_bnf
-AM_CFLAGS = $(CWFLAG) $(SOFIA_COVERAGE) $(am__append_1)
+AM_CFLAGS = $(CWFLAG) $(SOFIA_COVERAGE) $(SOFIA_CFLAGS) \
+ $(am__append_1)
DISTCLEANFILES = $(BUILT_SOURCES)
# rules for building tag files
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Makefile.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Makefile.in (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Makefile.in Fri Feb 9 13:15:36 2007
@@ -270,7 +270,8 @@
BUILT_SOURCES = Doxyfile.rfc
CLEANFILES = Doxyfile.rfc
-AM_CFLAGS = $(CWFLAG) $(SOFIA_COVERAGE) $(am__append_1)
+AM_CFLAGS = $(CWFLAG) $(SOFIA_COVERAGE) $(SOFIA_CFLAGS) \
+ $(am__append_1)
DISTCLEANFILES = $(BUILT_SOURCES)
# rules for building tag files
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/features/Makefile.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/features/Makefile.in (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/features/Makefile.in Fri Feb 9 13:15:36 2007
@@ -293,7 +293,8 @@
# ----------------------------------------------------------------------
# Install and distribution rules
EXTRA_DIST = Doxyfile features.docs
-AM_CFLAGS = $(CWFLAG) $(SOFIA_COVERAGE) $(am__append_1)
+AM_CFLAGS = $(CWFLAG) $(SOFIA_COVERAGE) $(SOFIA_CFLAGS) \
+ $(am__append_1)
DISTCLEANFILES = $(BUILT_SOURCES)
# rules for building tag files
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/Makefile.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/Makefile.in (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/Makefile.in Fri Feb 9 13:15:36 2007
@@ -330,7 +330,8 @@
http_parser_table.c.in \
http_tag.c.in
-AM_CFLAGS = $(CWFLAG) $(SOFIA_COVERAGE) $(am__append_1)
+AM_CFLAGS = $(CWFLAG) $(SOFIA_COVERAGE) $(SOFIA_CFLAGS) \
+ $(am__append_1)
DISTCLEANFILES = $(BUILT_SOURCES)
# rules for building tag files
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/Makefile.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/Makefile.in (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/Makefile.in Fri Feb 9 13:15:36 2007
@@ -310,7 +310,8 @@
../su/libsu.la
torture_base64_LDFLAGS = -static
-AM_CFLAGS = $(CWFLAG) $(SOFIA_COVERAGE) $(am__append_1)
+AM_CFLAGS = $(CWFLAG) $(SOFIA_COVERAGE) $(SOFIA_CFLAGS) \
+ $(am__append_1)
DISTCLEANFILES = $(BUILT_SOURCES)
# rules for building tag files
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/Makefile.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/Makefile.in (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/Makefile.in Fri Feb 9 13:15:36 2007
@@ -356,7 +356,8 @@
EXTRA_DIST = Doxyfile iptsec.docs testpasswd \
auth_module_sip.c $(HTTP_SRC) $(BUILT_SOURCES)
-AM_CFLAGS = $(CWFLAG) $(SOFIA_COVERAGE) $(am__append_1)
+AM_CFLAGS = $(CWFLAG) $(SOFIA_COVERAGE) $(SOFIA_CFLAGS) \
+ $(am__append_1)
DISTCLEANFILES = $(BUILT_SOURCES)
# rules for building tag files
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/Makefile.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/Makefile.in (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/Makefile.in Fri Feb 9 13:15:36 2007
@@ -362,7 +362,8 @@
# ----------------------------------------------------------------------
# Tests
TESTS = test_msg
-AM_CFLAGS = $(CWFLAG) $(SOFIA_COVERAGE) $(am__append_1)
+AM_CFLAGS = $(CWFLAG) $(SOFIA_COVERAGE) $(SOFIA_CFLAGS) \
+ $(am__append_1)
DISTCLEANFILES = $(BUILT_SOURCES)
# rules for building tag files
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/Makefile.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/Makefile.in (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/Makefile.in Fri Feb 9 13:15:36 2007
@@ -321,7 +321,8 @@
# ----------------------------------------------------------------------
# Install and distribution rules
EXTRA_DIST = Doxyfile nea.docs $(BUILT_SOURCES)
-AM_CFLAGS = $(CWFLAG) $(SOFIA_COVERAGE) $(am__append_1)
+AM_CFLAGS = $(CWFLAG) $(SOFIA_COVERAGE) $(SOFIA_CFLAGS) \
+ $(am__append_1)
DISTCLEANFILES = $(BUILT_SOURCES)
# rules for building tag files
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/Makefile.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/Makefile.in (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/Makefile.in Fri Feb 9 13:15:36 2007
@@ -360,7 +360,8 @@
agent.pem cafile.pem \
invite.msc $(BUILT_SOURCES)
-AM_CFLAGS = $(CWFLAG) $(SOFIA_COVERAGE) $(am__append_1)
+AM_CFLAGS = $(CWFLAG) $(SOFIA_COVERAGE) $(SOFIA_CFLAGS) \
+ $(am__append_1)
DISTCLEANFILES = $(BUILT_SOURCES)
# rules for building tag files
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/Makefile.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/Makefile.in (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/Makefile.in Fri Feb 9 13:15:36 2007
@@ -349,7 +349,8 @@
EXTRA_DIST = Doxyfile nth.docs $(BUILT_SOURCES) \
agent.pem cafile.pem
-AM_CFLAGS = $(CWFLAG) $(SOFIA_COVERAGE) $(am__append_1)
+AM_CFLAGS = $(CWFLAG) $(SOFIA_COVERAGE) $(SOFIA_CFLAGS) \
+ $(am__append_1)
DISTCLEANFILES = $(BUILT_SOURCES)
# rules for building tag files
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/Makefile.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/Makefile.in (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/Makefile.in Fri Feb 9 13:15:36 2007
@@ -376,7 +376,8 @@
# ----------------------------------------------------------------------
# Install and distribution rules
EXTRA_DIST = Doxyfile nua.docs $(BUILT_SOURCES)
-AM_CFLAGS = $(CWFLAG) $(SOFIA_COVERAGE) $(am__append_1)
+AM_CFLAGS = $(CWFLAG) $(SOFIA_COVERAGE) $(SOFIA_CFLAGS) \
+ $(am__append_1)
DISTCLEANFILES = $(BUILT_SOURCES)
# rules for building tag files
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/Makefile.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/Makefile.in (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/Makefile.in Fri Feb 9 13:15:36 2007
@@ -328,7 +328,8 @@
tests/message-9.sdp \
tests/message-10.sdp
-AM_CFLAGS = $(CWFLAG) $(SOFIA_COVERAGE) $(am__append_1)
+AM_CFLAGS = $(CWFLAG) $(SOFIA_COVERAGE) $(SOFIA_CFLAGS) \
+ $(am__append_1)
DISTCLEANFILES = $(BUILT_SOURCES)
# rules for building tag files
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/Makefile.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/Makefile.in (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/Makefile.in Fri Feb 9 13:15:36 2007
@@ -380,7 +380,8 @@
tests/test35.txt tests/test36.txt tests/test37.txt tests/test38.txt \
tests/test39.txt tests/test40.txt tests/test41.txt tests/test42.txt
-AM_CFLAGS = $(CWFLAG) $(SOFIA_COVERAGE) $(am__append_1)
+AM_CFLAGS = $(CWFLAG) $(SOFIA_COVERAGE) $(SOFIA_CFLAGS) \
+ $(am__append_1)
DISTCLEANFILES = $(BUILT_SOURCES)
# rules for building tag files
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/Makefile.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/Makefile.in (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/Makefile.in Fri Feb 9 13:15:36 2007
@@ -323,7 +323,8 @@
# ----------------------------------------------------------------------
# Install and distribution rules
EXTRA_DIST = Doxyfile soa.docs $(BUILT_SOURCES)
-AM_CFLAGS = $(CWFLAG) $(SOFIA_COVERAGE) $(am__append_1)
+AM_CFLAGS = $(CWFLAG) $(SOFIA_COVERAGE) $(SOFIA_CFLAGS) \
+ $(am__append_1)
DISTCLEANFILES = $(BUILT_SOURCES)
# rules for building tag files
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/Makefile.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/Makefile.in (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/Makefile.in Fri Feb 9 13:15:36 2007
@@ -327,7 +327,8 @@
127.zone 194.2.188 3.f.f.e.1.2.0.0.3.0.1.2.c.0.0.0 example.com \
3.f.f.e.1.2.0.0.3.0.1.2.c.0.0.0.arpa
-AM_CFLAGS = $(CWFLAG) $(SOFIA_COVERAGE) $(am__append_1)
+AM_CFLAGS = $(CWFLAG) $(SOFIA_COVERAGE) $(SOFIA_CFLAGS) \
+ $(am__append_1)
DISTCLEANFILES = $(BUILT_SOURCES)
# rules for building tag files
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/Makefile.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/Makefile.in (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/Makefile.in Fri Feb 9 13:15:36 2007
@@ -326,7 +326,8 @@
# ----------------------------------------------------------------------
# Install and distribution rules
EXTRA_DIST = Doxyfile stun.docs cert.pem key.pem
-AM_CFLAGS = $(CWFLAG) $(SOFIA_COVERAGE) $(am__append_1)
+AM_CFLAGS = $(CWFLAG) $(SOFIA_COVERAGE) $(SOFIA_CFLAGS) \
+ $(am__append_1)
DISTCLEANFILES = $(BUILT_SOURCES)
# rules for building tag files
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/Makefile.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/Makefile.in (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/Makefile.in Fri Feb 9 13:15:36 2007
@@ -117,20 +117,27 @@
su_alloc_lock.c su_strdup.c su_sprintf.c su_strlst.c \
su_vector.c su_time.c su_time0.c su_wait.c su_root.c \
su_timer.c su_port.c su_port.h su_base_port.c \
- su_pthread_port.c su_poll_port.c su_epoll_port.c \
- su_select_port.c su_localinfo.c su_os_nw.c su_taglist.c \
- su_tag.c su_tag_io.c su_log.c su_global_log.c su_default_log.c \
- su_module_debug.h su_md5.c su_uniqueid.c su_bm.c \
- su_osx_runloop.c
-@COREFOUNDATION_TRUE@am__objects_1 = su_osx_runloop.lo
-am_libsu_la_OBJECTS = su.lo su_errno.lo su_addrinfo.lo su_alloc.lo \
- su_alloc_lock.lo su_strdup.lo su_sprintf.lo su_strlst.lo \
- su_vector.lo su_time.lo su_time0.lo su_wait.lo su_root.lo \
- su_timer.lo su_port.lo su_base_port.lo su_pthread_port.lo \
- su_poll_port.lo su_epoll_port.lo su_select_port.lo \
- su_localinfo.lo su_os_nw.lo su_taglist.lo su_tag.lo \
- su_tag_io.lo su_log.lo su_global_log.lo su_default_log.lo \
- su_md5.lo su_uniqueid.lo su_bm.lo $(am__objects_1)
+ su_pthread_port.c su_socket_port.c su_poll_port.c \
+ su_epoll_port.c su_select_port.c su_localinfo.c su_os_nw.c \
+ su_taglist.c su_tag.c su_tag_io.c su_log.c su_global_log.c \
+ su_default_log.c su_module_debug.h su_md5.c su_uniqueid.c \
+ su_bm.c su_osx_runloop.c
+@COREFOUNDATION_TRUE@am__objects_1 = libsu_la-su_osx_runloop.lo
+am_libsu_la_OBJECTS = libsu_la-su.lo libsu_la-su_errno.lo \
+ libsu_la-su_addrinfo.lo libsu_la-su_alloc.lo \
+ libsu_la-su_alloc_lock.lo libsu_la-su_strdup.lo \
+ libsu_la-su_sprintf.lo libsu_la-su_strlst.lo \
+ libsu_la-su_vector.lo libsu_la-su_time.lo libsu_la-su_time0.lo \
+ libsu_la-su_wait.lo libsu_la-su_root.lo libsu_la-su_timer.lo \
+ libsu_la-su_port.lo libsu_la-su_base_port.lo \
+ libsu_la-su_pthread_port.lo libsu_la-su_socket_port.lo \
+ libsu_la-su_poll_port.lo libsu_la-su_epoll_port.lo \
+ libsu_la-su_select_port.lo libsu_la-su_localinfo.lo \
+ libsu_la-su_os_nw.lo libsu_la-su_taglist.lo libsu_la-su_tag.lo \
+ libsu_la-su_tag_io.lo libsu_la-su_log.lo \
+ libsu_la-su_global_log.lo libsu_la-su_default_log.lo \
+ libsu_la-su_md5.lo libsu_la-su_uniqueid.lo libsu_la-su_bm.lo \
+ $(am__objects_1)
libsu_la_OBJECTS = $(am_libsu_la_OBJECTS)
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgdatadir)" \
"$(DESTDIR)$(include_sofiadir)" \
@@ -469,7 +476,7 @@
su_time.c su_time0.c \
su_wait.c su_root.c su_timer.c \
su_port.c su_port.h \
- su_base_port.c su_pthread_port.c \
+ su_base_port.c su_pthread_port.c su_socket_port.c \
su_poll_port.c su_epoll_port.c su_select_port.c \
su_localinfo.c \
su_os_nw.c \
@@ -483,6 +490,7 @@
inet_ntop.c inet_pton.c poll.c getopt.c \
su_tag_ref.c su_win32_port.c
+libsu_la_CFLAGS = $(AM_CFLAGS) $(SOFIA_CFLAGS)
libsu_la_LIBADD = $(REPLACE_LIBADD)
libsu_la_DEPENDENCIES = $(REPLACE_LIBADD)
COVERAGE_INPUT = $(libsu_la_SOURCES) $(include_sofia_HEADERS)
@@ -498,7 +506,8 @@
# ----------------------------------------------------------------------
# Automake options
AUTOMAKE_OPTIONS = foreign
-AM_CFLAGS = $(CWFLAG) $(SOFIA_COVERAGE) $(am__append_1)
+AM_CFLAGS = $(CWFLAG) $(SOFIA_COVERAGE) $(SOFIA_CFLAGS) \
+ $(am__append_1)
DISTCLEANFILES = $(BUILT_SOURCES)
# rules for building tag files
@@ -687,52 +696,53 @@
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/addrinfo.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inet_ntop.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inet_pton.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsu_la-getopt.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsu_la-inet_ntop.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsu_la-inet_pton.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsu_la-memccpy.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsu_la-memcspn.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsu_la-memmem.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsu_la-memspn.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsu_la-poll.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsu_la-strcasestr.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsu_la-strtoull.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsu_la-su.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsu_la-su_addrinfo.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsu_la-su_alloc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsu_la-su_alloc_lock.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsu_la-su_base_port.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsu_la-su_bm.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsu_la-su_default_log.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsu_la-su_epoll_port.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsu_la-su_errno.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsu_la-su_global_log.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsu_la-su_localinfo.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsu_la-su_log.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsu_la-su_md5.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsu_la-su_os_nw.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsu_la-su_osx_runloop.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsu_la-su_poll_port.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsu_la-su_port.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsu_la-su_pthread_port.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsu_la-su_root.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsu_la-su_select_port.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsu_la-su_socket_port.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsu_la-su_sprintf.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsu_la-su_strdup.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsu_la-su_strlst.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsu_la-su_tag.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsu_la-su_tag_io.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsu_la-su_tag_ref.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsu_la-su_taglist.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsu_la-su_time.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsu_la-su_time0.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsu_la-su_timer.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsu_la-su_uniqueid.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsu_la-su_vector.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsu_la-su_wait.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsu_la-su_win32_port.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localinfo.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memccpy.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memcspn.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memmem.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memspn.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poll.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strcasestr.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoull.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su_addrinfo.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su_alloc.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su_alloc_lock.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su_base_port.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su_bm.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su_default_log.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su_epoll_port.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su_errno.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su_global_log.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su_localinfo.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su_log.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su_md5.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su_os_nw.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su_osx_runloop.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su_poll_port.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su_port.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su_proxy.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su_pthread_port.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su_root.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su_select_port.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su_sprintf.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su_strdup.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su_strlst.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su_tag.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su_tag_io.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su_tag_ref.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su_taglist.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su_time.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su_time0.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su_timer.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su_uniqueid.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su_vector.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su_wait.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su_win32_port.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_htable.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_memmem.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_poll.Po@am__quote@
@@ -770,6 +780,321 @@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+libsu_la-su.lo: su.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -MT libsu_la-su.lo -MD -MP -MF "$(DEPDIR)/libsu_la-su.Tpo" -c -o libsu_la-su.lo `test -f 'su.c' || echo '$(srcdir)/'`su.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsu_la-su.Tpo" "$(DEPDIR)/libsu_la-su.Plo"; else rm -f "$(DEPDIR)/libsu_la-su.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='su.c' object='libsu_la-su.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -c -o libsu_la-su.lo `test -f 'su.c' || echo '$(srcdir)/'`su.c
+
+libsu_la-su_errno.lo: su_errno.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -MT libsu_la-su_errno.lo -MD -MP -MF "$(DEPDIR)/libsu_la-su_errno.Tpo" -c -o libsu_la-su_errno.lo `test -f 'su_errno.c' || echo '$(srcdir)/'`su_errno.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsu_la-su_errno.Tpo" "$(DEPDIR)/libsu_la-su_errno.Plo"; else rm -f "$(DEPDIR)/libsu_la-su_errno.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='su_errno.c' object='libsu_la-su_errno.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -c -o libsu_la-su_errno.lo `test -f 'su_errno.c' || echo '$(srcdir)/'`su_errno.c
+
+libsu_la-su_addrinfo.lo: su_addrinfo.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -MT libsu_la-su_addrinfo.lo -MD -MP -MF "$(DEPDIR)/libsu_la-su_addrinfo.Tpo" -c -o libsu_la-su_addrinfo.lo `test -f 'su_addrinfo.c' || echo '$(srcdir)/'`su_addrinfo.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsu_la-su_addrinfo.Tpo" "$(DEPDIR)/libsu_la-su_addrinfo.Plo"; else rm -f "$(DEPDIR)/libsu_la-su_addrinfo.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='su_addrinfo.c' object='libsu_la-su_addrinfo.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -c -o libsu_la-su_addrinfo.lo `test -f 'su_addrinfo.c' || echo '$(srcdir)/'`su_addrinfo.c
+
+libsu_la-su_alloc.lo: su_alloc.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -MT libsu_la-su_alloc.lo -MD -MP -MF "$(DEPDIR)/libsu_la-su_alloc.Tpo" -c -o libsu_la-su_alloc.lo `test -f 'su_alloc.c' || echo '$(srcdir)/'`su_alloc.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsu_la-su_alloc.Tpo" "$(DEPDIR)/libsu_la-su_alloc.Plo"; else rm -f "$(DEPDIR)/libsu_la-su_alloc.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='su_alloc.c' object='libsu_la-su_alloc.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -c -o libsu_la-su_alloc.lo `test -f 'su_alloc.c' || echo '$(srcdir)/'`su_alloc.c
+
+libsu_la-su_alloc_lock.lo: su_alloc_lock.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -MT libsu_la-su_alloc_lock.lo -MD -MP -MF "$(DEPDIR)/libsu_la-su_alloc_lock.Tpo" -c -o libsu_la-su_alloc_lock.lo `test -f 'su_alloc_lock.c' || echo '$(srcdir)/'`su_alloc_lock.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsu_la-su_alloc_lock.Tpo" "$(DEPDIR)/libsu_la-su_alloc_lock.Plo"; else rm -f "$(DEPDIR)/libsu_la-su_alloc_lock.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='su_alloc_lock.c' object='libsu_la-su_alloc_lock.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -c -o libsu_la-su_alloc_lock.lo `test -f 'su_alloc_lock.c' || echo '$(srcdir)/'`su_alloc_lock.c
+
+libsu_la-su_strdup.lo: su_strdup.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -MT libsu_la-su_strdup.lo -MD -MP -MF "$(DEPDIR)/libsu_la-su_strdup.Tpo" -c -o libsu_la-su_strdup.lo `test -f 'su_strdup.c' || echo '$(srcdir)/'`su_strdup.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsu_la-su_strdup.Tpo" "$(DEPDIR)/libsu_la-su_strdup.Plo"; else rm -f "$(DEPDIR)/libsu_la-su_strdup.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='su_strdup.c' object='libsu_la-su_strdup.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -c -o libsu_la-su_strdup.lo `test -f 'su_strdup.c' || echo '$(srcdir)/'`su_strdup.c
+
+libsu_la-su_sprintf.lo: su_sprintf.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -MT libsu_la-su_sprintf.lo -MD -MP -MF "$(DEPDIR)/libsu_la-su_sprintf.Tpo" -c -o libsu_la-su_sprintf.lo `test -f 'su_sprintf.c' || echo '$(srcdir)/'`su_sprintf.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsu_la-su_sprintf.Tpo" "$(DEPDIR)/libsu_la-su_sprintf.Plo"; else rm -f "$(DEPDIR)/libsu_la-su_sprintf.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='su_sprintf.c' object='libsu_la-su_sprintf.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -c -o libsu_la-su_sprintf.lo `test -f 'su_sprintf.c' || echo '$(srcdir)/'`su_sprintf.c
+
+libsu_la-su_strlst.lo: su_strlst.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -MT libsu_la-su_strlst.lo -MD -MP -MF "$(DEPDIR)/libsu_la-su_strlst.Tpo" -c -o libsu_la-su_strlst.lo `test -f 'su_strlst.c' || echo '$(srcdir)/'`su_strlst.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsu_la-su_strlst.Tpo" "$(DEPDIR)/libsu_la-su_strlst.Plo"; else rm -f "$(DEPDIR)/libsu_la-su_strlst.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='su_strlst.c' object='libsu_la-su_strlst.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -c -o libsu_la-su_strlst.lo `test -f 'su_strlst.c' || echo '$(srcdir)/'`su_strlst.c
+
+libsu_la-su_vector.lo: su_vector.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -MT libsu_la-su_vector.lo -MD -MP -MF "$(DEPDIR)/libsu_la-su_vector.Tpo" -c -o libsu_la-su_vector.lo `test -f 'su_vector.c' || echo '$(srcdir)/'`su_vector.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsu_la-su_vector.Tpo" "$(DEPDIR)/libsu_la-su_vector.Plo"; else rm -f "$(DEPDIR)/libsu_la-su_vector.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='su_vector.c' object='libsu_la-su_vector.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -c -o libsu_la-su_vector.lo `test -f 'su_vector.c' || echo '$(srcdir)/'`su_vector.c
+
+libsu_la-su_time.lo: su_time.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -MT libsu_la-su_time.lo -MD -MP -MF "$(DEPDIR)/libsu_la-su_time.Tpo" -c -o libsu_la-su_time.lo `test -f 'su_time.c' || echo '$(srcdir)/'`su_time.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsu_la-su_time.Tpo" "$(DEPDIR)/libsu_la-su_time.Plo"; else rm -f "$(DEPDIR)/libsu_la-su_time.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='su_time.c' object='libsu_la-su_time.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -c -o libsu_la-su_time.lo `test -f 'su_time.c' || echo '$(srcdir)/'`su_time.c
+
+libsu_la-su_time0.lo: su_time0.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -MT libsu_la-su_time0.lo -MD -MP -MF "$(DEPDIR)/libsu_la-su_time0.Tpo" -c -o libsu_la-su_time0.lo `test -f 'su_time0.c' || echo '$(srcdir)/'`su_time0.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsu_la-su_time0.Tpo" "$(DEPDIR)/libsu_la-su_time0.Plo"; else rm -f "$(DEPDIR)/libsu_la-su_time0.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='su_time0.c' object='libsu_la-su_time0.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -c -o libsu_la-su_time0.lo `test -f 'su_time0.c' || echo '$(srcdir)/'`su_time0.c
+
+libsu_la-su_wait.lo: su_wait.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -MT libsu_la-su_wait.lo -MD -MP -MF "$(DEPDIR)/libsu_la-su_wait.Tpo" -c -o libsu_la-su_wait.lo `test -f 'su_wait.c' || echo '$(srcdir)/'`su_wait.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsu_la-su_wait.Tpo" "$(DEPDIR)/libsu_la-su_wait.Plo"; else rm -f "$(DEPDIR)/libsu_la-su_wait.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='su_wait.c' object='libsu_la-su_wait.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -c -o libsu_la-su_wait.lo `test -f 'su_wait.c' || echo '$(srcdir)/'`su_wait.c
+
+libsu_la-su_root.lo: su_root.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -MT libsu_la-su_root.lo -MD -MP -MF "$(DEPDIR)/libsu_la-su_root.Tpo" -c -o libsu_la-su_root.lo `test -f 'su_root.c' || echo '$(srcdir)/'`su_root.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsu_la-su_root.Tpo" "$(DEPDIR)/libsu_la-su_root.Plo"; else rm -f "$(DEPDIR)/libsu_la-su_root.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='su_root.c' object='libsu_la-su_root.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -c -o libsu_la-su_root.lo `test -f 'su_root.c' || echo '$(srcdir)/'`su_root.c
+
+libsu_la-su_timer.lo: su_timer.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -MT libsu_la-su_timer.lo -MD -MP -MF "$(DEPDIR)/libsu_la-su_timer.Tpo" -c -o libsu_la-su_timer.lo `test -f 'su_timer.c' || echo '$(srcdir)/'`su_timer.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsu_la-su_timer.Tpo" "$(DEPDIR)/libsu_la-su_timer.Plo"; else rm -f "$(DEPDIR)/libsu_la-su_timer.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='su_timer.c' object='libsu_la-su_timer.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -c -o libsu_la-su_timer.lo `test -f 'su_timer.c' || echo '$(srcdir)/'`su_timer.c
+
+libsu_la-su_port.lo: su_port.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -MT libsu_la-su_port.lo -MD -MP -MF "$(DEPDIR)/libsu_la-su_port.Tpo" -c -o libsu_la-su_port.lo `test -f 'su_port.c' || echo '$(srcdir)/'`su_port.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsu_la-su_port.Tpo" "$(DEPDIR)/libsu_la-su_port.Plo"; else rm -f "$(DEPDIR)/libsu_la-su_port.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='su_port.c' object='libsu_la-su_port.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -c -o libsu_la-su_port.lo `test -f 'su_port.c' || echo '$(srcdir)/'`su_port.c
+
+libsu_la-su_base_port.lo: su_base_port.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -MT libsu_la-su_base_port.lo -MD -MP -MF "$(DEPDIR)/libsu_la-su_base_port.Tpo" -c -o libsu_la-su_base_port.lo `test -f 'su_base_port.c' || echo '$(srcdir)/'`su_base_port.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsu_la-su_base_port.Tpo" "$(DEPDIR)/libsu_la-su_base_port.Plo"; else rm -f "$(DEPDIR)/libsu_la-su_base_port.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='su_base_port.c' object='libsu_la-su_base_port.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -c -o libsu_la-su_base_port.lo `test -f 'su_base_port.c' || echo '$(srcdir)/'`su_base_port.c
+
+libsu_la-su_pthread_port.lo: su_pthread_port.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -MT libsu_la-su_pthread_port.lo -MD -MP -MF "$(DEPDIR)/libsu_la-su_pthread_port.Tpo" -c -o libsu_la-su_pthread_port.lo `test -f 'su_pthread_port.c' || echo '$(srcdir)/'`su_pthread_port.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsu_la-su_pthread_port.Tpo" "$(DEPDIR)/libsu_la-su_pthread_port.Plo"; else rm -f "$(DEPDIR)/libsu_la-su_pthread_port.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='su_pthread_port.c' object='libsu_la-su_pthread_port.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -c -o libsu_la-su_pthread_port.lo `test -f 'su_pthread_port.c' || echo '$(srcdir)/'`su_pthread_port.c
+
+libsu_la-su_socket_port.lo: su_socket_port.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -MT libsu_la-su_socket_port.lo -MD -MP -MF "$(DEPDIR)/libsu_la-su_socket_port.Tpo" -c -o libsu_la-su_socket_port.lo `test -f 'su_socket_port.c' || echo '$(srcdir)/'`su_socket_port.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsu_la-su_socket_port.Tpo" "$(DEPDIR)/libsu_la-su_socket_port.Plo"; else rm -f "$(DEPDIR)/libsu_la-su_socket_port.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='su_socket_port.c' object='libsu_la-su_socket_port.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -c -o libsu_la-su_socket_port.lo `test -f 'su_socket_port.c' || echo '$(srcdir)/'`su_socket_port.c
+
+libsu_la-su_poll_port.lo: su_poll_port.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -MT libsu_la-su_poll_port.lo -MD -MP -MF "$(DEPDIR)/libsu_la-su_poll_port.Tpo" -c -o libsu_la-su_poll_port.lo `test -f 'su_poll_port.c' || echo '$(srcdir)/'`su_poll_port.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsu_la-su_poll_port.Tpo" "$(DEPDIR)/libsu_la-su_poll_port.Plo"; else rm -f "$(DEPDIR)/libsu_la-su_poll_port.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='su_poll_port.c' object='libsu_la-su_poll_port.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -c -o libsu_la-su_poll_port.lo `test -f 'su_poll_port.c' || echo '$(srcdir)/'`su_poll_port.c
+
+libsu_la-su_epoll_port.lo: su_epoll_port.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -MT libsu_la-su_epoll_port.lo -MD -MP -MF "$(DEPDIR)/libsu_la-su_epoll_port.Tpo" -c -o libsu_la-su_epoll_port.lo `test -f 'su_epoll_port.c' || echo '$(srcdir)/'`su_epoll_port.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsu_la-su_epoll_port.Tpo" "$(DEPDIR)/libsu_la-su_epoll_port.Plo"; else rm -f "$(DEPDIR)/libsu_la-su_epoll_port.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='su_epoll_port.c' object='libsu_la-su_epoll_port.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -c -o libsu_la-su_epoll_port.lo `test -f 'su_epoll_port.c' || echo '$(srcdir)/'`su_epoll_port.c
+
+libsu_la-su_select_port.lo: su_select_port.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -MT libsu_la-su_select_port.lo -MD -MP -MF "$(DEPDIR)/libsu_la-su_select_port.Tpo" -c -o libsu_la-su_select_port.lo `test -f 'su_select_port.c' || echo '$(srcdir)/'`su_select_port.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsu_la-su_select_port.Tpo" "$(DEPDIR)/libsu_la-su_select_port.Plo"; else rm -f "$(DEPDIR)/libsu_la-su_select_port.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='su_select_port.c' object='libsu_la-su_select_port.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -c -o libsu_la-su_select_port.lo `test -f 'su_select_port.c' || echo '$(srcdir)/'`su_select_port.c
+
+libsu_la-su_localinfo.lo: su_localinfo.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -MT libsu_la-su_localinfo.lo -MD -MP -MF "$(DEPDIR)/libsu_la-su_localinfo.Tpo" -c -o libsu_la-su_localinfo.lo `test -f 'su_localinfo.c' || echo '$(srcdir)/'`su_localinfo.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsu_la-su_localinfo.Tpo" "$(DEPDIR)/libsu_la-su_localinfo.Plo"; else rm -f "$(DEPDIR)/libsu_la-su_localinfo.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='su_localinfo.c' object='libsu_la-su_localinfo.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -c -o libsu_la-su_localinfo.lo `test -f 'su_localinfo.c' || echo '$(srcdir)/'`su_localinfo.c
+
+libsu_la-su_os_nw.lo: su_os_nw.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -MT libsu_la-su_os_nw.lo -MD -MP -MF "$(DEPDIR)/libsu_la-su_os_nw.Tpo" -c -o libsu_la-su_os_nw.lo `test -f 'su_os_nw.c' || echo '$(srcdir)/'`su_os_nw.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsu_la-su_os_nw.Tpo" "$(DEPDIR)/libsu_la-su_os_nw.Plo"; else rm -f "$(DEPDIR)/libsu_la-su_os_nw.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='su_os_nw.c' object='libsu_la-su_os_nw.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -c -o libsu_la-su_os_nw.lo `test -f 'su_os_nw.c' || echo '$(srcdir)/'`su_os_nw.c
+
+libsu_la-su_taglist.lo: su_taglist.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -MT libsu_la-su_taglist.lo -MD -MP -MF "$(DEPDIR)/libsu_la-su_taglist.Tpo" -c -o libsu_la-su_taglist.lo `test -f 'su_taglist.c' || echo '$(srcdir)/'`su_taglist.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsu_la-su_taglist.Tpo" "$(DEPDIR)/libsu_la-su_taglist.Plo"; else rm -f "$(DEPDIR)/libsu_la-su_taglist.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='su_taglist.c' object='libsu_la-su_taglist.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -c -o libsu_la-su_taglist.lo `test -f 'su_taglist.c' || echo '$(srcdir)/'`su_taglist.c
+
+libsu_la-su_tag.lo: su_tag.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -MT libsu_la-su_tag.lo -MD -MP -MF "$(DEPDIR)/libsu_la-su_tag.Tpo" -c -o libsu_la-su_tag.lo `test -f 'su_tag.c' || echo '$(srcdir)/'`su_tag.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsu_la-su_tag.Tpo" "$(DEPDIR)/libsu_la-su_tag.Plo"; else rm -f "$(DEPDIR)/libsu_la-su_tag.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='su_tag.c' object='libsu_la-su_tag.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -c -o libsu_la-su_tag.lo `test -f 'su_tag.c' || echo '$(srcdir)/'`su_tag.c
+
+libsu_la-su_tag_io.lo: su_tag_io.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -MT libsu_la-su_tag_io.lo -MD -MP -MF "$(DEPDIR)/libsu_la-su_tag_io.Tpo" -c -o libsu_la-su_tag_io.lo `test -f 'su_tag_io.c' || echo '$(srcdir)/'`su_tag_io.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsu_la-su_tag_io.Tpo" "$(DEPDIR)/libsu_la-su_tag_io.Plo"; else rm -f "$(DEPDIR)/libsu_la-su_tag_io.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='su_tag_io.c' object='libsu_la-su_tag_io.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -c -o libsu_la-su_tag_io.lo `test -f 'su_tag_io.c' || echo '$(srcdir)/'`su_tag_io.c
+
+libsu_la-su_log.lo: su_log.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -MT libsu_la-su_log.lo -MD -MP -MF "$(DEPDIR)/libsu_la-su_log.Tpo" -c -o libsu_la-su_log.lo `test -f 'su_log.c' || echo '$(srcdir)/'`su_log.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsu_la-su_log.Tpo" "$(DEPDIR)/libsu_la-su_log.Plo"; else rm -f "$(DEPDIR)/libsu_la-su_log.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='su_log.c' object='libsu_la-su_log.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -c -o libsu_la-su_log.lo `test -f 'su_log.c' || echo '$(srcdir)/'`su_log.c
+
+libsu_la-su_global_log.lo: su_global_log.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -MT libsu_la-su_global_log.lo -MD -MP -MF "$(DEPDIR)/libsu_la-su_global_log.Tpo" -c -o libsu_la-su_global_log.lo `test -f 'su_global_log.c' || echo '$(srcdir)/'`su_global_log.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsu_la-su_global_log.Tpo" "$(DEPDIR)/libsu_la-su_global_log.Plo"; else rm -f "$(DEPDIR)/libsu_la-su_global_log.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='su_global_log.c' object='libsu_la-su_global_log.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -c -o libsu_la-su_global_log.lo `test -f 'su_global_log.c' || echo '$(srcdir)/'`su_global_log.c
+
+libsu_la-su_default_log.lo: su_default_log.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -MT libsu_la-su_default_log.lo -MD -MP -MF "$(DEPDIR)/libsu_la-su_default_log.Tpo" -c -o libsu_la-su_default_log.lo `test -f 'su_default_log.c' || echo '$(srcdir)/'`su_default_log.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsu_la-su_default_log.Tpo" "$(DEPDIR)/libsu_la-su_default_log.Plo"; else rm -f "$(DEPDIR)/libsu_la-su_default_log.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='su_default_log.c' object='libsu_la-su_default_log.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -c -o libsu_la-su_default_log.lo `test -f 'su_default_log.c' || echo '$(srcdir)/'`su_default_log.c
+
+libsu_la-su_md5.lo: su_md5.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -MT libsu_la-su_md5.lo -MD -MP -MF "$(DEPDIR)/libsu_la-su_md5.Tpo" -c -o libsu_la-su_md5.lo `test -f 'su_md5.c' || echo '$(srcdir)/'`su_md5.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsu_la-su_md5.Tpo" "$(DEPDIR)/libsu_la-su_md5.Plo"; else rm -f "$(DEPDIR)/libsu_la-su_md5.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='su_md5.c' object='libsu_la-su_md5.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -c -o libsu_la-su_md5.lo `test -f 'su_md5.c' || echo '$(srcdir)/'`su_md5.c
+
+libsu_la-su_uniqueid.lo: su_uniqueid.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -MT libsu_la-su_uniqueid.lo -MD -MP -MF "$(DEPDIR)/libsu_la-su_uniqueid.Tpo" -c -o libsu_la-su_uniqueid.lo `test -f 'su_uniqueid.c' || echo '$(srcdir)/'`su_uniqueid.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsu_la-su_uniqueid.Tpo" "$(DEPDIR)/libsu_la-su_uniqueid.Plo"; else rm -f "$(DEPDIR)/libsu_la-su_uniqueid.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='su_uniqueid.c' object='libsu_la-su_uniqueid.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -c -o libsu_la-su_uniqueid.lo `test -f 'su_uniqueid.c' || echo '$(srcdir)/'`su_uniqueid.c
+
+libsu_la-su_bm.lo: su_bm.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -MT libsu_la-su_bm.lo -MD -MP -MF "$(DEPDIR)/libsu_la-su_bm.Tpo" -c -o libsu_la-su_bm.lo `test -f 'su_bm.c' || echo '$(srcdir)/'`su_bm.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsu_la-su_bm.Tpo" "$(DEPDIR)/libsu_la-su_bm.Plo"; else rm -f "$(DEPDIR)/libsu_la-su_bm.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='su_bm.c' object='libsu_la-su_bm.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -c -o libsu_la-su_bm.lo `test -f 'su_bm.c' || echo '$(srcdir)/'`su_bm.c
+
+libsu_la-su_osx_runloop.lo: su_osx_runloop.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -MT libsu_la-su_osx_runloop.lo -MD -MP -MF "$(DEPDIR)/libsu_la-su_osx_runloop.Tpo" -c -o libsu_la-su_osx_runloop.lo `test -f 'su_osx_runloop.c' || echo '$(srcdir)/'`su_osx_runloop.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsu_la-su_osx_runloop.Tpo" "$(DEPDIR)/libsu_la-su_osx_runloop.Plo"; else rm -f "$(DEPDIR)/libsu_la-su_osx_runloop.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='su_osx_runloop.c' object='libsu_la-su_osx_runloop.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -c -o libsu_la-su_osx_runloop.lo `test -f 'su_osx_runloop.c' || echo '$(srcdir)/'`su_osx_runloop.c
+
+libsu_la-memmem.lo: memmem.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -MT libsu_la-memmem.lo -MD -MP -MF "$(DEPDIR)/libsu_la-memmem.Tpo" -c -o libsu_la-memmem.lo `test -f 'memmem.c' || echo '$(srcdir)/'`memmem.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsu_la-memmem.Tpo" "$(DEPDIR)/libsu_la-memmem.Plo"; else rm -f "$(DEPDIR)/libsu_la-memmem.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='memmem.c' object='libsu_la-memmem.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -c -o libsu_la-memmem.lo `test -f 'memmem.c' || echo '$(srcdir)/'`memmem.c
+
+libsu_la-strtoull.lo: strtoull.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -MT libsu_la-strtoull.lo -MD -MP -MF "$(DEPDIR)/libsu_la-strtoull.Tpo" -c -o libsu_la-strtoull.lo `test -f 'strtoull.c' || echo '$(srcdir)/'`strtoull.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsu_la-strtoull.Tpo" "$(DEPDIR)/libsu_la-strtoull.Plo"; else rm -f "$(DEPDIR)/libsu_la-strtoull.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='strtoull.c' object='libsu_la-strtoull.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -c -o libsu_la-strtoull.lo `test -f 'strtoull.c' || echo '$(srcdir)/'`strtoull.c
+
+libsu_la-strcasestr.lo: strcasestr.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -MT libsu_la-strcasestr.lo -MD -MP -MF "$(DEPDIR)/libsu_la-strcasestr.Tpo" -c -o libsu_la-strcasestr.lo `test -f 'strcasestr.c' || echo '$(srcdir)/'`strcasestr.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsu_la-strcasestr.Tpo" "$(DEPDIR)/libsu_la-strcasestr.Plo"; else rm -f "$(DEPDIR)/libsu_la-strcasestr.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='strcasestr.c' object='libsu_la-strcasestr.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -c -o libsu_la-strcasestr.lo `test -f 'strcasestr.c' || echo '$(srcdir)/'`strcasestr.c
+
+libsu_la-memspn.lo: memspn.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -MT libsu_la-memspn.lo -MD -MP -MF "$(DEPDIR)/libsu_la-memspn.Tpo" -c -o libsu_la-memspn.lo `test -f 'memspn.c' || echo '$(srcdir)/'`memspn.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsu_la-memspn.Tpo" "$(DEPDIR)/libsu_la-memspn.Plo"; else rm -f "$(DEPDIR)/libsu_la-memspn.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='memspn.c' object='libsu_la-memspn.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -c -o libsu_la-memspn.lo `test -f 'memspn.c' || echo '$(srcdir)/'`memspn.c
+
+libsu_la-memcspn.lo: memcspn.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -MT libsu_la-memcspn.lo -MD -MP -MF "$(DEPDIR)/libsu_la-memcspn.Tpo" -c -o libsu_la-memcspn.lo `test -f 'memcspn.c' || echo '$(srcdir)/'`memcspn.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsu_la-memcspn.Tpo" "$(DEPDIR)/libsu_la-memcspn.Plo"; else rm -f "$(DEPDIR)/libsu_la-memcspn.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='memcspn.c' object='libsu_la-memcspn.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -c -o libsu_la-memcspn.lo `test -f 'memcspn.c' || echo '$(srcdir)/'`memcspn.c
+
+libsu_la-memccpy.lo: memccpy.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -MT libsu_la-memccpy.lo -MD -MP -MF "$(DEPDIR)/libsu_la-memccpy.Tpo" -c -o libsu_la-memccpy.lo `test -f 'memccpy.c' || echo '$(srcdir)/'`memccpy.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsu_la-memccpy.Tpo" "$(DEPDIR)/libsu_la-memccpy.Plo"; else rm -f "$(DEPDIR)/libsu_la-memccpy.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='memccpy.c' object='libsu_la-memccpy.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -c -o libsu_la-memccpy.lo `test -f 'memccpy.c' || echo '$(srcdir)/'`memccpy.c
+
+libsu_la-inet_ntop.lo: inet_ntop.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -MT libsu_la-inet_ntop.lo -MD -MP -MF "$(DEPDIR)/libsu_la-inet_ntop.Tpo" -c -o libsu_la-inet_ntop.lo `test -f 'inet_ntop.c' || echo '$(srcdir)/'`inet_ntop.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsu_la-inet_ntop.Tpo" "$(DEPDIR)/libsu_la-inet_ntop.Plo"; else rm -f "$(DEPDIR)/libsu_la-inet_ntop.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='inet_ntop.c' object='libsu_la-inet_ntop.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -c -o libsu_la-inet_ntop.lo `test -f 'inet_ntop.c' || echo '$(srcdir)/'`inet_ntop.c
+
+libsu_la-inet_pton.lo: inet_pton.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -MT libsu_la-inet_pton.lo -MD -MP -MF "$(DEPDIR)/libsu_la-inet_pton.Tpo" -c -o libsu_la-inet_pton.lo `test -f 'inet_pton.c' || echo '$(srcdir)/'`inet_pton.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsu_la-inet_pton.Tpo" "$(DEPDIR)/libsu_la-inet_pton.Plo"; else rm -f "$(DEPDIR)/libsu_la-inet_pton.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='inet_pton.c' object='libsu_la-inet_pton.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -c -o libsu_la-inet_pton.lo `test -f 'inet_pton.c' || echo '$(srcdir)/'`inet_pton.c
+
+libsu_la-poll.lo: poll.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -MT libsu_la-poll.lo -MD -MP -MF "$(DEPDIR)/libsu_la-poll.Tpo" -c -o libsu_la-poll.lo `test -f 'poll.c' || echo '$(srcdir)/'`poll.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsu_la-poll.Tpo" "$(DEPDIR)/libsu_la-poll.Plo"; else rm -f "$(DEPDIR)/libsu_la-poll.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='poll.c' object='libsu_la-poll.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -c -o libsu_la-poll.lo `test -f 'poll.c' || echo '$(srcdir)/'`poll.c
+
+libsu_la-getopt.lo: getopt.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -MT libsu_la-getopt.lo -MD -MP -MF "$(DEPDIR)/libsu_la-getopt.Tpo" -c -o libsu_la-getopt.lo `test -f 'getopt.c' || echo '$(srcdir)/'`getopt.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsu_la-getopt.Tpo" "$(DEPDIR)/libsu_la-getopt.Plo"; else rm -f "$(DEPDIR)/libsu_la-getopt.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getopt.c' object='libsu_la-getopt.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -c -o libsu_la-getopt.lo `test -f 'getopt.c' || echo '$(srcdir)/'`getopt.c
+
+libsu_la-su_tag_ref.lo: su_tag_ref.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -MT libsu_la-su_tag_ref.lo -MD -MP -MF "$(DEPDIR)/libsu_la-su_tag_ref.Tpo" -c -o libsu_la-su_tag_ref.lo `test -f 'su_tag_ref.c' || echo '$(srcdir)/'`su_tag_ref.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsu_la-su_tag_ref.Tpo" "$(DEPDIR)/libsu_la-su_tag_ref.Plo"; else rm -f "$(DEPDIR)/libsu_la-su_tag_ref.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='su_tag_ref.c' object='libsu_la-su_tag_ref.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -c -o libsu_la-su_tag_ref.lo `test -f 'su_tag_ref.c' || echo '$(srcdir)/'`su_tag_ref.c
+
+libsu_la-su_win32_port.lo: su_win32_port.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -MT libsu_la-su_win32_port.lo -MD -MP -MF "$(DEPDIR)/libsu_la-su_win32_port.Tpo" -c -o libsu_la-su_win32_port.lo `test -f 'su_win32_port.c' || echo '$(srcdir)/'`su_win32_port.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsu_la-su_win32_port.Tpo" "$(DEPDIR)/libsu_la-su_win32_port.Plo"; else rm -f "$(DEPDIR)/libsu_la-su_win32_port.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='su_win32_port.c' object='libsu_la-su_win32_port.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsu_la_CFLAGS) $(CFLAGS) -c -o libsu_la-su_win32_port.lo `test -f 'su_win32_port.c' || echo '$(srcdir)/'`su_win32_port.c
+
mostlyclean-libtool:
-rm -f *.lo
Added: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_socket_port.c
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_socket_port.c Fri Feb 9 13:15:36 2007
@@ -0,0 +1,202 @@
+/*
+ * This file is part of the Sofia-SIP package
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Pekka Pessi <pekka.pessi(a)nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+/**@ingroup su_wait
+ * @CFILE su_socket_port.c
+ *
+ * OS-Independent Syncronization Interface with socket mailbox
+ *
+ * This implements wakeup using sockets by su_port_send().
+ *
+ * @author Pekka Pessi <Pekka.Pessi(a)nokia.com>
+ * @author Kai Vehmanen <kai.vehmanen(a)nokia.com>
+ *
+ * @date Created: Tue Sep 14 15:51:04 1999 ppessi
+ */
+
+#include "config.h"
+
+#include <stdlib.h>
+#include <assert.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <string.h>
+#include <limits.h>
+#include <errno.h>
+
+#define su_socket_port_s su_port_s
+#define SU_CLONE_T su_msg_t
+
+#include "sofia-sip/su.h"
+#include "su_port.h"
+#include "sofia-sip/su_alloc.h"
+
+#if HAVE_SOCKETPAIR
+#define SU_MBOX_SEND 1
+#else
+#define SU_MBOX_SEND 0
+#endif
+
+/** @internal Message box wakeup function. */
+static int su_mbox_port_wakeup(su_root_magic_t *magic, /* NULL */
+ su_wait_t *w,
+ su_wakeup_arg_t *arg)
+{
+ char buf[32];
+ su_socket_t socket = *(su_socket_t*)arg;
+ su_wait_events(w, socket);
+ recv(socket, buf, sizeof(buf), 0);
+ return 0;
+}
+
+/**@internal
+ *
+ * Initializes a message port. It creates a mailbox used to wake up the
+ * thread waiting on the port if needed. Currently, the mailbox is a
+ * socketpair or an UDP socket connected to itself.
+ */
+int su_socket_port_init(su_port_t *self, su_port_vtable_t const *vtable)
+{
+ int retval = -1;
+ int af;
+ su_socket_t mb = INVALID_SOCKET;
+ su_wait_t wait[1] = { SU_WAIT_INIT };
+ char const *why;
+
+ SU_DEBUG_9(("su_socket_port_init(%p, %p) called\n",
+ (void *)self, (void *)vtable));
+
+ if (su_pthread_port_init(self, vtable) != 0)
+ return -1;
+
+#if HAVE_SOCKETPAIR
+#if defined(AF_LOCAL)
+ af = AF_LOCAL;
+#else
+ af = AF_UNIX;
+#endif
+
+ if (socketpair(af, SOCK_STREAM, 0, self->sup_mbox) == -1) {
+ why = "socketpair"; goto error;
+ }
+
+ mb = self->sup_mbox[0];
+ su_setblocking(self->sup_mbox[1], 0);
+
+#else
+ {
+ struct sockaddr_in sin = { sizeof(struct sockaddr_in), 0 };
+ socklen_t sinsize = sizeof sin;
+ struct sockaddr *sa = (struct sockaddr *)&sin;
+
+ af = PF_INET;
+
+ self->sup_mbox[0] = mb = su_socket(af, SOCK_DGRAM, IPPROTO_UDP);
+ if (mb == INVALID_SOCKET) {
+ why = "socket"; goto error;
+ }
+
+ sin.sin_family = AF_INET;
+ sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK); /* 127.1 */
+
+ /* Get a port for us */
+ if (bind(mb, sa, sizeof sin) == -1) {
+ why = "bind"; goto error;
+ }
+
+ if (getsockname(mb, sa, &sinsize) == -1) {
+ why = "getsockname"; goto error;
+ }
+
+ if (connect(mb, sa, sinsize) == -1) {
+ why = "connect"; goto error;
+ }
+ }
+#endif
+
+ if (su_wait_create(wait, mb, SU_WAIT_IN) == -1) {
+ why = "su_wait_create";
+ goto error;
+ }
+
+ self->sup_mbox_index = su_port_register(self, NULL, wait,
+ su_mbox_port_wakeup,
+ (void *)self->sup_mbox, 0);
+
+ if (self->sup_mbox_index <= 0) {
+ why = "su_port_register";
+ su_wait_destroy(wait);
+ goto error;
+ }
+
+ return 0;
+
+ error:
+ su_log("%s: %s: %s\n", "su_socket_port_init",
+ why, su_strerror(su_errno()));
+
+ return retval;
+}
+
+
+/** @internal Deinit a base implementation of port. */
+void su_socket_port_deinit(su_port_t *self)
+{
+ assert(self);
+
+ if (self->sup_mbox_index > 0)
+ su_port_deregister(self, self->sup_mbox_index);
+ self->sup_mbox_index = 0;
+
+ if (self->sup_mbox[0] && self->sup_mbox[0] != INVALID_SOCKET)
+ su_close(self->sup_mbox[0]); self->sup_mbox[0] = INVALID_SOCKET;
+#if HAVE_SOCKETPAIR
+ if (self->sup_mbox[1] && self->sup_mbox[1] != INVALID_SOCKET)
+ su_close(self->sup_mbox[1]); self->sup_mbox[1] = INVALID_SOCKET;
+#endif
+
+ su_pthread_port_deinit(self);
+}
+
+/** @internal Send a message to the port. */
+int su_socket_port_send(su_port_t *self, su_msg_r rmsg)
+{
+ int wakeup = su_base_port_send(self, rmsg);
+
+ if (wakeup < 0)
+ return -1;
+
+ if (wakeup) {
+ assert(self->sup_mbox[SU_MBOX_SEND] != INVALID_SOCKET);
+
+ if (send(self->sup_mbox[SU_MBOX_SEND], "X", 1, 0) == -1) {
+#if HAVE_SOCKETPAIR
+ if (su_errno() != EWOULDBLOCK)
+#endif
+ su_perror("su_msg_send: send()");
+ }
+ }
+
+ return 0;
+}
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/Makefile.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/Makefile.in (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/Makefile.in Fri Feb 9 13:15:36 2007
@@ -363,7 +363,8 @@
EXTRA_DIST = Doxyfile tport.docs \
certificates.html agent.pem cafile.pem
-AM_CFLAGS = $(CWFLAG) $(SOFIA_COVERAGE) $(am__append_1)
+AM_CFLAGS = $(CWFLAG) $(SOFIA_COVERAGE) $(SOFIA_CFLAGS) \
+ $(am__append_1)
DISTCLEANFILES = $(BUILT_SOURCES)
# rules for building tag files
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/Makefile.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/Makefile.in (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/Makefile.in Fri Feb 9 13:15:36 2007
@@ -319,7 +319,8 @@
# ----------------------------------------------------------------------
# Tests
TESTS = torture_url test_urlmap
-AM_CFLAGS = $(CWFLAG) $(SOFIA_COVERAGE) $(am__append_1)
+AM_CFLAGS = $(CWFLAG) $(SOFIA_COVERAGE) $(SOFIA_CFLAGS) \
+ $(am__append_1)
DISTCLEANFILES = $(BUILT_SOURCES)
# rules for building tag files
Added: freeswitch/trunk/libs/sofia-sip/packages/sofia-sip-1.12.5.spec
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/packages/sofia-sip-1.12.5.spec Fri Feb 9 13:15:36 2007
@@ -0,0 +1,247 @@
+# Sofia SIP UA Library
+
+Summary: Sofia SIP User-Agent library
+Name: sofia-sip
+Version: 1.12.5
+Release: 1%{?dist}
+License: LGPL
+Group: System Environment/Libraries
+URL: http://sf.net/projects/sofia-sip
+Source0: %{name}-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+
+BuildRequires: pkgconfig
+
+%{!?bcond_with:%define bcond_with() %{expand:%%{?_with_%{1}:%%global with_%{1} 1}}}
+%{!?bcond_without:%define bcond_without() %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}}}
+
+# Options:
+%bcond_with doxygen - Generate documents using doxygen and dot
+%bcond_with check - Run tests
+%bcond_with openssl - Always use OpenSSL (TLS)
+%bcond_with glib - Always use glib-2.0 (>= 2.2)
+%bcond_with sctp - Include SCTP transport
+
+%define have_doxygen %{?_with_doxygen:1}%{!?_with_doxygen:0}
+%define have_openssl %(%{?!_with_openssl:pkg-config 'openssl >= 0.9.7'&&}echo 1||echo 0)
+%define have_glib %(%{?!_with_glib:pkg-config 'glib-2.0 >= 2.2'&&}echo 1||echo 0)
+
+%if %{have_doxygen}
+BuildRequires: doxygen >= 1.3, graphviz
+%endif
+%if %{have_openssl}
+BuildRequires: openssl-devel >= 0.9.7
+%endif
+%if %{have_glib}
+BuildRequires: glib2-devel >= 2.2
+%endif
+
+%description
+Sofia SIP is a RFC-3261-compliant library for SIP user agents and other
+network elements.
+
+%prep
+%setup -q
+
+%build
+options="--disable-dependency-tracking"
+options="$options --with-pic --enable-shared --disable-static"
+%if !%{have_glib}
+options="$options --without-glib"
+%endif
+%if %{with sctp}
+options="$options --enable-sctp"
+%endif
+
+%configure $options
+
+make %{_smp_mflags}
+%if %{have_doxygen}
+make doxygen
+%endif
+
+# XXX comment next line to build with non-check aware rpmbuild.
+%check
+%if %{with check}
+make check
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make install DESTDIR=$RPM_BUILD_ROOT
+
+# Remove extra files
+find $RPM_BUILD_ROOT -type f -name *.la -print0 | xargs -0 rm
+
+%if %{have_doxygen}
+# Manually install development docs into manual
+cp -p -r libsofia-sip-ua/docs/html manual
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(-,root,root,-)
+%{_libdir}/libsofia-sip-ua.so.*
+%doc AUTHORS COPYING COPYRIGHTS README
+
+%if %{have_glib}
+# note: soname in pkgname allows install of multiple library versions
+# The glib interface is still a bit unstable
+%package glib3
+Summary: GLIB bindings for Sofia-SIP
+Group: System Environment/Libraries
+Requires: sofia-sip
+Obsoletes: sofia-sip-glib < %{version}-%{release}
+Provides: sofia-sip-glib = %{version}-%{release}
+
+%description glib3
+GLib interface to Sofia SIP User Agent library.
+
+%files glib3
+%defattr(-,root,root,-)
+%{_libdir}/libsofia-sip-ua-glib.so.*
+%doc AUTHORS COPYING COPYRIGHTS README libsofia-sip-ua-glib/ChangeLog
+
+%post glib3 -p /sbin/ldconfig
+%postun glib3 -p /sbin/ldconfig
+
+%endif
+
+%package devel
+Summary: Sofia-SIP Development Package
+Group: Development/Libraries
+Requires: sofia-sip = %{version}-%{release}
+Obsoletes: sofia-devel < %{version}-%{release}
+Provides: sofia-devel = %{version}-%{release}
+
+Requires: pkgconfig
+
+%description devel
+Development package for Sofia SIP UA library. This package includes
+static libraries and include files.
+
+%if %{without doxygen}
+The reference documentation for Sofia SIP UA library is available at
+<http://sofia-sip.sourceforge.net/development.html>
+%endif
+
+%files devel
+%defattr(-,root,root,-)
+%dir %{_includedir}/sofia-sip*
+%dir %{_includedir}/sofia-sip*/sofia-sip
+%{_includedir}/sofia-sip*/sofia-sip/*.h
+%{_includedir}/sofia-sip*/sofia-sip/*.h.in
+%dir %{_includedir}/sofia-sip*/sofia-resolv
+%{_includedir}/sofia-sip*/sofia-resolv/*.h
+%dir %{_datadir}/sofia-sip
+%{_datadir}/sofia-sip/tag_dll.awk
+%{_datadir}/sofia-sip/msg_parser.awk
+%{_libdir}/libsofia-sip-ua.so
+%{_libdir}/pkgconfig/sofia-sip-ua.pc
+%doc TODO README.developers
+
+%if %{have_glib}
+# note: no soname here as no multiple glib-devel packages can co-exist in peace
+%package glib-devel
+Summary: GLIB bindings for Sofia SIP development files
+Group: Development/Libraries
+Requires: sofia-sip-glib3 = %{version}-%{release}
+Requires: sofia-sip-devel >= 1.12
+BuildRequires: glib2-devel >= 2.2
+
+%description glib-devel
+Development package for Sofia SIP UA Glib library. This package includes
+static libraries and include files for developing glib programs using Sofia
+SIP.
+
+%files glib-devel
+%defattr(-,root,root,-)
+%{_includedir}/sofia-sip*/sofia-sip/su_source.h
+%{_libdir}/libsofia-sip-ua-glib.so
+%{_libdir}/pkgconfig/sofia-sip-ua-glib.pc
+%endif
+
+%package docs
+Summary: Sofia-SIP Development Manual Package
+Group: Documentation
+%description docs
+HTML reference documentation for Sofia SIP UA library.
+
+%if %{have_doxygen}
+%files docs
+%defattr(-,root,root,-)
+%doc manual
+%endif
+
+%package utils
+Summary: Sofia-SIP Command Line Utilities
+Group: Applications/Internet
+Requires: sofia-sip = %{version}-%{release}
+Obsoletes: sofia-utils < %{version}-%{release}
+Provides: sofia-utils = %{version}-%{release}
+%description utils
+Command line utilities for Sofia SIP UA library.
+
+%files utils
+%defattr(-,root,root,-)
+%{_bindir}/localinfo
+%{_bindir}/addrinfo
+%{_bindir}/sip-options
+%{_bindir}/sip-date
+%{_bindir}/sip-dig
+%{_bindir}/stunc
+%{_mandir}/man?/*
+
+%changelog
+* Thu Dec 7 2006 Pekka Pessi <ppessi at gmail.com> - 1.12.4-1
+- Silenced all rpmlint warnings on FC6.
+
+* Wed Dec 6 2006 Pekka Pessi <ppessi at gmail.com> - 1.12.4-0
+- Fixing optional values on Fedora. rpmlinted. No doxygen docs.
+
+* Tue Dec 5 2006 Pekka Pessi <ppessi at gmail.com> - 1.12.4
+- Bumped version. rpmlinted.
+
+* Tue Dec 5 2006 Kai Vehmanen <first.lastname at nokia.com>
+- The 'nua-glib' module, and the related dependency to gobject, has been
+ removed from the sofia-sip package
+
+* Fri Oct 6 2006 Pekka Pessi <ppessi at gmail.com> - 1.12.3
+- Autodetecting openssl, glib and gobject support with pkg-config
+ (use --with openssl --with glib and --with gobject to force them)
+
+* Mon Sep 18 2006 Kai Vehmanen <first.lastname at nokia.com>
+- Removed *.m4 files from the distribution package.
+
+* Fri Aug 11 2006 Kai Vehmanen <first.lastname at nokia.com>
+- Modified the install location of the awk scripts.
+
+* Thu Jun 15 2006 Kai Vehmanen <first.lastname at nokia.com>
+- Added library soname to sofia-sip-glib package name.
+- Modified dependencies - the glib subpackages do not depend
+ on a specific version of sofia-sip anymore.
+
+* Wed Mar 08 2006 Kai Vehmanen <first.lastname at nokia.com>
+- Added libsofia-sip-ua-glib to the package.
+
+* Tue Nov 15 2005 Kai Vehmanen <first.lastname at nokia.com>
+- Removed the --includedir parameter. The public headers are
+ now installed under includedir/sofia-sip-MAJOR.MINOR/
+
+* Thu Oct 20 2005 Pekka Pessi <first.lastname at nokia.com>
+- Using %%{_lib} instead of lib
+
+* Thu Oct 6 2005 Pekka Pessi <first.lastname at nokia.com>
+- Added sub-package utils
+
+* Thu Oct 6 2005 Pekka Pessi <first.lastname at nokia.com> - 1.11.0
+- Added %%{?dist} to release
+
+* Sat Jul 23 2005 Pekka Pessi <first.lastname at nokia.com> - 1.10.1
+- Initial build.
1
0
Author: mikej
Date: Fri Feb 9 12:57:51 2007
New Revision: 4178
Modified:
freeswitch/trunk/libs/sofia-sip/.update
Log:
touch the .update so the lib is totally rebuilt
Modified: freeswitch/trunk/libs/sofia-sip/.update
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/.update (original)
+++ freeswitch/trunk/libs/sofia-sip/.update Fri Feb 9 12:57:51 2007
@@ -1 +1 @@
-Wed Feb 7 16:58:19 EST 2007
+Fri Feb 9 12:57:20 EST 2007
1
0
Author: mikej
Date: Fri Feb 9 12:32:17 2007
New Revision: 4177
Modified:
freeswitch/trunk/libs/sofia-sip/AUTHORS
freeswitch/trunk/libs/sofia-sip/COPYRIGHTS
freeswitch/trunk/libs/sofia-sip/RELEASE
freeswitch/trunk/libs/sofia-sip/RELEASE.template
freeswitch/trunk/libs/sofia-sip/configure.ac
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ChangeLog
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/http_parser.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/sofia-sip/http_header.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/test_http.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta_internal.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta_tag.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sofia-sip/nta_tag.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/test_nta_api.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/nth_server.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_dialog.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_register.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/outbound.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/outbound.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/sofia-sip/nua_tag.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_basic_call.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_nua.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_nua.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_register.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_basic.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_parser.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sofia-sip/sip_header.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/test_sip_msg.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/torture_sip.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/validator.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/run_test_sresolv
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/test_sresolv.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/poll.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/run_test_su
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_wait.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_epoll_port.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_localinfo.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_osx_runloop.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_poll_port.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_port.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_port.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_pthread_port.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_select_port.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_timer.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_win32_port.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_su.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_su_root.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport.c
freeswitch/trunk/libs/sofia-sip/win32/config.h.in
freeswitch/trunk/libs/sofia-sip/win32/libsofia-sip-ua-static/libsofia_sip_ua_static.vcproj
freeswitch/trunk/libs/sofia-sip/win32/libsofia-sip-ua/libsofia_sip_ua.vcproj
freeswitch/trunk/libs/sofia-sip/win32/utils/localinfo/localinfo.vcproj
freeswitch/trunk/libs/sofia-sip/win32/utils/sip_options_static/sip_options_static.vcproj
Log:
sync back up again with sofia tree prior to their release
Modified: freeswitch/trunk/libs/sofia-sip/AUTHORS
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/AUTHORS (original)
+++ freeswitch/trunk/libs/sofia-sip/AUTHORS Fri Feb 9 12:32:17 2007
@@ -10,6 +10,8 @@
Chan, Tat <first.surname(a)nokia.com>
Ciarkowski, Andrzej <wp-voigtkampff -at users -dot sourceforge -dot net>
+Denis-Courmont, Remi <first.surname(a)nokia.com>
+Filonenko Roman <shkoder -at ua -dot fm>
Haataja, Mikko <first.surname(a)nokia.com>
Jacobs, Remeres <first.surname(a)nokia.com>
Jalava, Teemu <first.surname(a)nokia.com>
@@ -26,9 +28,7 @@
Whittaker, Colin <colinw -at occamnetworks -dot com>
Zabaluev, Mikhail <first.surname(a)nokia.com>
-
Note: for details on who did what, see the version control
system change history, and release notes for past releases at
http://sofia-sip.sourceforge.net/relnotes/
-
-
\ No newline at end of file
+
\ No newline at end of file
Modified: freeswitch/trunk/libs/sofia-sip/COPYRIGHTS
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/COPYRIGHTS (original)
+++ freeswitch/trunk/libs/sofia-sip/COPYRIGHTS Fri Feb 9 12:32:17 2007
@@ -221,3 +221,31 @@
been advised of the possibility of such damages.
----------------------------------------------------------------------------
+
+libsofia-sip-ua/su/poll.c
+
+The package also contains files from GNU C Library by Free Software
+Foundation.
+
+These files are distributed with the following copyright notice:
+
+Copyright (C) 1994,1996,1997,1998,1999,2001,2002
+Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with the GNU C Library; if not, write to the Free
+Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+----------------------------------------------------------------------------
Modified: freeswitch/trunk/libs/sofia-sip/RELEASE
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/RELEASE (original)
+++ freeswitch/trunk/libs/sofia-sip/RELEASE Fri Feb 9 12:32:17 2007
@@ -5,21 +5,17 @@
Changes since last release
--------------------------
-<changes since last written in freshmeat.net "Changes:" style;
- and in less than 10 lines />
-
-Bugs in blaa and foo have been fixed. The stack now supports
-use of foobar...
+Support for request queuing has been added to the high-level user-agent
+API. Various portability improvements have been made related to Linux,
+Mac OS X, Windows and Solaris ports. SIP registrations have been
+modified to utilize persistent transport connections. The GObject
+interface to 'nua' (nua-glib) has been dropped from the package and is
+now distributed separately. Severe bugs in 'su', 'nua', 'nta', 'stun' and
+'su-glib' modules have been fixed.
API/ABI changes and versioning
------------------------------
-<see previous release notes at
- http://sofia-sip.sourceforge.net/relnotes/ for examples ;
- - should include all changes to public headers, and
- other important information to developers;
- - and should be updated _continuously_! />
-
New features in API are marked with Doxytag macro @NEW_1_12_5.
Experimental features are marked with Doxytag macro @EXP_1_12_5.
@@ -38,8 +34,9 @@
- Added sip_is_allowed() function and k_bitmap field to the
sip_allow_t structure
- Added sl_header_log implementation, updated its prototype
-- Added experimental SIP headers and related functions,
- enabled with ./configure option --enable-experimental
+- Added experimental SIP headers Suppress-Notify-If-Match and
+ Suppress-Body-If-Match and functions related to them,
+ enabled with ./configure option --enable-experimental
- Added SIP header Refer-Sub and related functions
- Added <sofia-sip/sip_extra.h> include file
- Added auc_info() function (sofia-sip/auth_client.h)
@@ -61,34 +58,32 @@
is now considered stable and will be API/ABI compatible with later
releases in the 1.12.x series.
- ABI has been modified and applications built against 1.12.4 and earlier
- releases need to be rebuilt.
+ releases, need to be rebuilt.
- Added su_glib_prefer_gsource() which makes glib-based su_port_t
implementation the default choice when su_root_create() is called
Contributors to this release
----------------------------
-<list of people who contributed to _this_ release
- - update as people's patches are added, or when you commit stuff
- - current development team members (see AUTHORS) may be omitted
- - name of the contributor should be enough (email addresses in AUTHORS),
- plus a brief description of what was contributed
- - roughly sorted by number of patches accepted
-/>
-
-- **template**: First Surname (patch to nua/soa/msg)
- Petteri Puolakka (patch to stun)
-- Mikhail Zabluev (patch to su-glib mainloop integration)
+- Mikhail Zabaluev (patch to su-glib mainloop integration)
- Michael Jerris (patch to url parsing # in sip/sips userpart)
- Colin Whittaker (TPTAG_TOS())
- Roman Filonenko (TPTAG_LOG(), TPTAG_DUMP(),
patch to query DNS-servers with IP-Helper on win32)
+- Remi Denis-Courmont (patch to network change API)
+- Martti Mela (poll() emulation with select(), IPv6 and OS X fixes)
+- Kai Vehmanen (persistent registrations, release management)
+- Pekka Pessi (all the rest)
See the AUTHORS file in the distribution package.
Notes on new features
---------------------
+- The su_root_t reactor uses different implementation (epoll, poll or select
+ on Linux), depending on SU_PORT environment variable.
+
- nua now supports request queuing, for instance, an application can send
overlapping BYE and NOTIFY requests. The stack engine takes care of
sending the new request only after the previous one has been responded.
@@ -115,22 +110,12 @@
STUN and HTTP support. See 'docs/devel_platform_notes.txt' for some
additional notes to distributors.
-<information about major new features
- - new/changed/removed functionality
- - links to further documentation
- - section may be omitted for minor releases
-/>
-
Bugs fixed in this release
--------------------------
-< notable bugs fixed in this release
- - check the sf.net bug tracker; see closed bugs,
- sorted by closing date
- - other bugs as fixed in CVS/darcs
-/>
-
-- **template**: #9499652 sf.net bug item title
+- Fixed su_from_create() returning a sip_to_t instance. Problem reported by
+ Ludovico Cavedon.
+- Partially fixed problem #1633969 with too frequent timer
- Fixed problem in dialog matching. Problem reported by Fabio Margarido.
- Fixed #1624446 - su_wait_clone() (and nua_destroy()) blocking for ever if
the root object was created using su_glib
Modified: freeswitch/trunk/libs/sofia-sip/RELEASE.template
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/RELEASE.template (original)
+++ freeswitch/trunk/libs/sofia-sip/RELEASE.template Fri Feb 9 12:32:17 2007
@@ -6,7 +6,8 @@
--------------------------
<changes since last written in freshmeat.net "Changes:" style;
- and in less than 10 lines />
+ and in less than 10 lines, written in 3rd person English, with
+ complete sentences />
Bugs in blaa and foo have been fixed. The stack now supports
use of foobar...
@@ -39,9 +40,11 @@
<list of people who contributed to _this_ release
- update as people's patches are added, or when you commit stuff
- - current development team members (see AUTHORS) may be omitted
+ - current development team members (see AUTHORS) may be omitted,
+ or listed at the end of the contribur list (depending on the scope
+ of the work done since the last release)
- name of the contributor should be enough (email addresses in AUTHORS),
- plus a brief description of what was contributed
+ plus a _brief_ description of what was contributed
- roughly sorted by number of patches accepted
/>
Modified: freeswitch/trunk/libs/sofia-sip/configure.ac
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/configure.ac (original)
+++ freeswitch/trunk/libs/sofia-sip/configure.ac Fri Feb 9 12:32:17 2007
@@ -11,14 +11,14 @@
dnl ---------------------------
dnl update both the version for AC_INIT and the LIBSOFIA_SIP_UA_MAJOR_MINOR
-AC_INIT([sofia-sip], [1.12.4work])
+AC_INIT([sofia-sip], [1.12.5])
AC_CONFIG_SRCDIR([libsofia-sip-ua/sip/sofia-sip/sip.h])
AC_SUBST(VER_LIBSOFIA_SIP_UA_MAJOR_MINOR, [1.12])
dnl Includedir specific to this sofia version
AC_SUBST(include_sofiadir, '${includedir}/sofia-sip-1.12')
-AC_SUBST(LIBVER_SOFIA_SIP_UA_CUR, [3])
+AC_SUBST(LIBVER_SOFIA_SIP_UA_CUR, [4])
AC_SUBST(LIBVER_SOFIA_SIP_UA_REV, [0])
-AC_SUBST(LIBVER_SOFIA_SIP_UA_AGE, [3])
+AC_SUBST(LIBVER_SOFIA_SIP_UA_AGE, [4])
AC_SUBST(LIBVER_SOFIA_SIP_UA_SOVER, [0]) # CUR-AGE
AC_SUBST(LIBVER_SOFIA_SIP_UA_GLIB_CUR, [3])
AC_SUBST(LIBVER_SOFIA_SIP_UA_GLIB_REV, [0])
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ChangeLog
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ChangeLog (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ChangeLog Fri Feb 9 12:32:17 2007
@@ -1,3 +1,11 @@
+2007-02-09 Kai Vehmanen <kai.vehmanen(a)nokia.com>
+
+ * libsofia-sip-ua interface v4 frozen (4:0:4) for the 1.12.5 release
+
+2006-10-12 Kai Vehmanen <kai.vehmanen(a)nokia.com>
+
+ * libsofia-sip-ua interface v3 frozen (3:0:3) for the 1.12.3 release
+
2006-09-26 Kai Vehmanen <kai.vehmanen(a)nokia.com>
* libsofia-sip-ua interface v2 frozen (2:0:2) for the 1.12.2 release
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/http_parser.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/http_parser.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/http_parser.c Fri Feb 9 12:32:17 2007
@@ -61,9 +61,9 @@
/** HTTP version 0.9 is an empty string. */
char const http_version_0_9[] = "";
-msg_mclass_t *http_default_mclass(void)
+msg_mclass_t const *http_default_mclass(void)
{
- extern msg_mclass_t http_mclass[];
+ extern msg_mclass_t const http_mclass[];
return http_mclass;
}
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/sofia-sip/http_header.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/sofia-sip/http_header.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/sofia-sip/http_header.h Fri Feb 9 12:32:17 2007
@@ -95,7 +95,7 @@
*/
/** HTTP parser description. */
-SOFIAPUBFUN msg_mclass_t *http_default_mclass(void);
+SOFIAPUBFUN msg_mclass_t const *http_default_mclass(void);
/** Complete a HTTP request. */
SOFIAPUBFUN int http_request_complete(msg_t *msg);
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/test_http.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/test_http.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/test_http.c Fri Feb 9 12:32:17 2007
@@ -76,7 +76,7 @@
static int test_query_parser(void);
static msg_t *read_message(char const string[]);
-msg_mclass_t *test_mclass = NULL;
+msg_mclass_t const *test_mclass = NULL;
void usage(void)
{
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c Fri Feb 9 12:32:17 2007
@@ -890,7 +890,7 @@
unsigned threadpool = agent->sa_tport_threadpool;
char const *sigcomp = agent->sa_sigcomp_options;
char const *algorithm = NONE;
- msg_mclass_t *mclass = NONE;
+ msg_mclass_t const *mclass = NONE;
sip_contact_t const *aliases = NONE;
url_string_t const *proxy = NONE;
tport_t *tport;
@@ -4983,15 +4983,16 @@
nta_incoming_t *incoming_find(nta_agent_t const *agent,
sip_t const *sip,
sip_via_t const *v,
- nta_incoming_t **merge,
- nta_incoming_t **ack)
+ nta_incoming_t **return_merge,
+ nta_incoming_t **return_ack)
{
sip_cseq_t const *cseq = sip->sip_cseq;
sip_call_id_t const *i = sip->sip_call_id;
sip_to_t const *to = sip->sip_to;
sip_from_t const *from = sip->sip_from;
sip_request_t *rq = sip->sip_request;
- int is_uas_ack = ack && agent->sa_is_a_uas && rq->rq_method == sip_method_ack;
+ int is_uas_ack = return_ack &&
+ agent->sa_is_a_uas && rq->rq_method == sip_method_ack;
incoming_htable_t const *iht = agent->sa_incoming;
hash_value_t hash = NTA_HASH(i, cseq->cs_seq);
@@ -5008,6 +5009,30 @@
continue;
if (str0casecmp(irq->irq_from->a_tag, from->a_tag))
continue;
+
+ if (str0casecmp(irq->irq_via->v_branch, v->v_branch) != 0 ||
+ strcasecmp(irq->irq_via->v_host, v->v_host) != 0) {
+ if (!agent->sa_is_a_uas)
+ continue;
+
+ if (is_uas_ack &&
+ irq->irq_method == sip_method_invite &&
+ 200 <= irq->irq_status && irq->irq_status < 300 &&
+ addr_match(irq->irq_to, to))
+ *return_ack = irq;
+ /* RFC3261 - section 8.2.2.2 Merged Requests */
+ else if (return_merge && agent->sa_merge_482 &&
+ irq->irq_cseq->cs_method == cseq->cs_method &&
+ (irq->irq_cseq->cs_method != sip_method_unknown ||
+ strcmp(irq->irq_cseq->cs_method_name,
+ cseq->cs_method_name) == 0)) {
+ *return_merge = irq;
+ continue;
+ }
+ else
+ continue;
+ }
+
if (is_uas_ack) {
if (!addr_match(irq->irq_to, to))
continue;
@@ -5020,16 +5045,6 @@
else if (str0casecmp(irq->irq_to->a_tag, to->a_tag))
continue;
- if (str0casecmp(irq->irq_via->v_branch, v->v_branch) != 0) {
- if (!agent->sa_is_a_uas)
- continue;
- if (is_uas_ack && irq->irq_status >= 200 && irq->irq_status < 300)
- *ack = irq;
- /* RFC3261 - section 8.2.2.2 Merged Requests */
- else if (merge && !to->a_tag && agent->sa_merge_482)
- *merge = irq;
- continue;
- }
if (!is_uas_ack && url_cmp(irq->irq_rq->rq_url, rq->rq_url))
continue;
@@ -5041,18 +5056,18 @@
if (irq->irq_method == rq->rq_method)
break; /* found */
- if (ack && rq->rq_method == sip_method_cancel)
- *ack = irq;
- else if (ack && rq->rq_method == sip_method_ack &&
+ if (return_ack && rq->rq_method == sip_method_cancel)
+ *return_ack = irq;
+ else if (return_ack && rq->rq_method == sip_method_ack &&
irq->irq_method == sip_method_invite)
- *ack = irq;
+ *return_ack = irq;
}
if (irq)
return irq;
/* Check PRACKed requests */
- if (ack && rq->rq_method == sip_method_prack && sip->sip_rack) {
+ if (return_ack && rq->rq_method == sip_method_prack && sip->sip_rack) {
sip_rack_t const *rack = sip->sip_rack;
hash = NTA_HASH(i, rack->ra_cseq);
@@ -5072,7 +5087,7 @@
continue;
if (!irq->irq_from->a_tag != !from->a_tag)
continue;
- *ack = irq;
+ *return_ack = irq;
return NULL;
}
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta_internal.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta_internal.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta_internal.h Fri Feb 9 12:32:17 2007
@@ -108,7 +108,7 @@
uint32_t sa_nw_updates; /* Shall we enable network detector? */
uint32_t sa_flags; /**< Message flags */
- msg_mclass_t *sa_mclass;
+ msg_mclass_t const *sa_mclass;
sip_contact_t *sa_contact;
sip_via_t *sa_vias; /**< @Via headers for all transports */
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta_tag.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta_tag.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta_tag.c Fri Feb 9 12:32:17 2007
@@ -110,38 +110,38 @@
/* Status */
-tag_typedef_t ntatag_s_irq_hash = UINTTAG_TYPEDEF(s_irq_hash);
-tag_typedef_t ntatag_s_orq_hash = UINTTAG_TYPEDEF(s_orq_hash);
-tag_typedef_t ntatag_s_leg_hash = UINTTAG_TYPEDEF(s_leg_hash);
-tag_typedef_t ntatag_s_irq_hash_used = UINTTAG_TYPEDEF(s_irq_hash_used);
-tag_typedef_t ntatag_s_orq_hash_used = UINTTAG_TYPEDEF(s_orq_hash_used);
-tag_typedef_t ntatag_s_leg_hash_used = UINTTAG_TYPEDEF(s_leg_hash_used);
-tag_typedef_t ntatag_s_recv_msg = UINTTAG_TYPEDEF(s_recv_msg);
-tag_typedef_t ntatag_s_recv_request = UINTTAG_TYPEDEF(s_recv_request);
-tag_typedef_t ntatag_s_recv_response = UINTTAG_TYPEDEF(s_recv_response);
-tag_typedef_t ntatag_s_bad_message = UINTTAG_TYPEDEF(s_bad_message);
-tag_typedef_t ntatag_s_bad_request = UINTTAG_TYPEDEF(s_bad_request);
-tag_typedef_t ntatag_s_bad_response = UINTTAG_TYPEDEF(s_bad_response);
-tag_typedef_t ntatag_s_drop_request = UINTTAG_TYPEDEF(s_drop_request);
-tag_typedef_t ntatag_s_drop_response = UINTTAG_TYPEDEF(s_drop_response);
-tag_typedef_t ntatag_s_client_tr = UINTTAG_TYPEDEF(s_client_tr);
-tag_typedef_t ntatag_s_server_tr = UINTTAG_TYPEDEF(s_server_tr);
-tag_typedef_t ntatag_s_dialog_tr = UINTTAG_TYPEDEF(s_dialog_tr);
-tag_typedef_t ntatag_s_acked_tr = UINTTAG_TYPEDEF(s_acked_tr);
-tag_typedef_t ntatag_s_canceled_tr = UINTTAG_TYPEDEF(s_canceled_tr);
-tag_typedef_t ntatag_s_trless_request = UINTTAG_TYPEDEF(s_trless_request);
-tag_typedef_t ntatag_s_trless_to_tr = UINTTAG_TYPEDEF(s_trless_to_tr);
-tag_typedef_t ntatag_s_trless_response = UINTTAG_TYPEDEF(s_trless_response);
-tag_typedef_t ntatag_s_trless_200 = UINTTAG_TYPEDEF(s_trless_200);
-tag_typedef_t ntatag_s_merged_request = UINTTAG_TYPEDEF(s_merged_request);
-tag_typedef_t ntatag_s_sent_msg = UINTTAG_TYPEDEF(s_sent_msg);
-tag_typedef_t ntatag_s_sent_request = UINTTAG_TYPEDEF(s_sent_request);
-tag_typedef_t ntatag_s_sent_response = UINTTAG_TYPEDEF(s_sent_response);
-tag_typedef_t ntatag_s_retry_request = UINTTAG_TYPEDEF(s_retry_request);
-tag_typedef_t ntatag_s_retry_response = UINTTAG_TYPEDEF(s_retry_response);
-tag_typedef_t ntatag_s_recv_retry = UINTTAG_TYPEDEF(s_recv_retry);
-tag_typedef_t ntatag_s_tout_request = UINTTAG_TYPEDEF(s_tout_request);
-tag_typedef_t ntatag_s_tout_response = UINTTAG_TYPEDEF(s_tout_response);
+tag_typedef_t ntatag_s_irq_hash = USIZETAG_TYPEDEF(s_irq_hash);
+tag_typedef_t ntatag_s_orq_hash = USIZETAG_TYPEDEF(s_orq_hash);
+tag_typedef_t ntatag_s_leg_hash = USIZETAG_TYPEDEF(s_leg_hash);
+tag_typedef_t ntatag_s_irq_hash_used = USIZETAG_TYPEDEF(s_irq_hash_used);
+tag_typedef_t ntatag_s_orq_hash_used = USIZETAG_TYPEDEF(s_orq_hash_used);
+tag_typedef_t ntatag_s_leg_hash_used = USIZETAG_TYPEDEF(s_leg_hash_used);
+tag_typedef_t ntatag_s_recv_msg = USIZETAG_TYPEDEF(s_recv_msg);
+tag_typedef_t ntatag_s_recv_request = USIZETAG_TYPEDEF(s_recv_request);
+tag_typedef_t ntatag_s_recv_response = USIZETAG_TYPEDEF(s_recv_response);
+tag_typedef_t ntatag_s_bad_message = USIZETAG_TYPEDEF(s_bad_message);
+tag_typedef_t ntatag_s_bad_request = USIZETAG_TYPEDEF(s_bad_request);
+tag_typedef_t ntatag_s_bad_response = USIZETAG_TYPEDEF(s_bad_response);
+tag_typedef_t ntatag_s_drop_request = USIZETAG_TYPEDEF(s_drop_request);
+tag_typedef_t ntatag_s_drop_response = USIZETAG_TYPEDEF(s_drop_response);
+tag_typedef_t ntatag_s_client_tr = USIZETAG_TYPEDEF(s_client_tr);
+tag_typedef_t ntatag_s_server_tr = USIZETAG_TYPEDEF(s_server_tr);
+tag_typedef_t ntatag_s_dialog_tr = USIZETAG_TYPEDEF(s_dialog_tr);
+tag_typedef_t ntatag_s_acked_tr = USIZETAG_TYPEDEF(s_acked_tr);
+tag_typedef_t ntatag_s_canceled_tr = USIZETAG_TYPEDEF(s_canceled_tr);
+tag_typedef_t ntatag_s_trless_request = USIZETAG_TYPEDEF(s_trless_request);
+tag_typedef_t ntatag_s_trless_to_tr = USIZETAG_TYPEDEF(s_trless_to_tr);
+tag_typedef_t ntatag_s_trless_response = USIZETAG_TYPEDEF(s_trless_response);
+tag_typedef_t ntatag_s_trless_200 = USIZETAG_TYPEDEF(s_trless_200);
+tag_typedef_t ntatag_s_merged_request = USIZETAG_TYPEDEF(s_merged_request);
+tag_typedef_t ntatag_s_sent_msg = USIZETAG_TYPEDEF(s_sent_msg);
+tag_typedef_t ntatag_s_sent_request = USIZETAG_TYPEDEF(s_sent_request);
+tag_typedef_t ntatag_s_sent_response = USIZETAG_TYPEDEF(s_sent_response);
+tag_typedef_t ntatag_s_retry_request = USIZETAG_TYPEDEF(s_retry_request);
+tag_typedef_t ntatag_s_retry_response = USIZETAG_TYPEDEF(s_retry_response);
+tag_typedef_t ntatag_s_recv_retry = USIZETAG_TYPEDEF(s_recv_retry);
+tag_typedef_t ntatag_s_tout_request = USIZETAG_TYPEDEF(s_tout_request);
+tag_typedef_t ntatag_s_tout_response = USIZETAG_TYPEDEF(s_tout_response);
/* Internal */
tag_typedef_t ntatag_delay_sending = BOOLTAG_TYPEDEF(delay_sending);
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sofia-sip/nta_tag.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sofia-sip/nta_tag.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sofia-sip/nta_tag.h Fri Feb 9 12:32:17 2007
@@ -59,10 +59,10 @@
NTA_DLL extern tag_typedef_t ntatag_mclass;
/** Message class used by NTA. @HI */
-#define NTATAG_MCLASS(x) ntatag_mclass, tag_ptr_v((x))
+#define NTATAG_MCLASS(x) ntatag_mclass, tag_cptr_v((x))
NTA_DLL extern tag_typedef_t ntatag_mclass_ref;
-#define NTATAG_MCLASS_REF(x) ntatag_mclass_ref, tag_ptr_vr(&(x), (x))
+#define NTATAG_MCLASS_REF(x) ntatag_mclass_ref, tag_cptr_vr(&(x), (x))
NTA_DLL extern tag_typedef_t ntatag_bad_req_mask;
/** Mask for bad request messages.
@@ -503,184 +503,184 @@
ntatag_s_leg_hash_used_ref, tag_usize_vr(&(x))
NTA_DLL extern tag_typedef_t ntatag_s_recv_msg;
-#define NTATAG_S_RECV_MSG(x) ntatag_s_recv_msg, tag_uint_v(x)
+#define NTATAG_S_RECV_MSG(x) ntatag_s_recv_msg, tag_usize_v(x)
NTA_DLL extern tag_typedef_t ntatag_s_recv_msg_ref;
-#define NTATAG_S_RECV_MSG_REF(x) ntatag_s_recv_msg_ref, tag_uint_vr(&(x))
+#define NTATAG_S_RECV_MSG_REF(x) ntatag_s_recv_msg_ref, tag_usize_vr(&(x))
NTA_DLL extern tag_typedef_t ntatag_s_recv_request;
-#define NTATAG_S_RECV_REQUEST(x) ntatag_s_recv_request, tag_uint_v(x)
+#define NTATAG_S_RECV_REQUEST(x) ntatag_s_recv_request, tag_usize_v(x)
NTA_DLL extern tag_typedef_t ntatag_s_recv_request_ref;
#define NTATAG_S_RECV_REQUEST_REF(x)\
- ntatag_s_recv_request_ref, tag_uint_vr(&(x))
+ ntatag_s_recv_request_ref, tag_usize_vr(&(x))
NTA_DLL extern tag_typedef_t ntatag_s_recv_response;
-#define NTATAG_S_RECV_RESPONSE(x) ntatag_s_recv_response, tag_uint_v(x)
+#define NTATAG_S_RECV_RESPONSE(x) ntatag_s_recv_response, tag_usize_v(x)
NTA_DLL extern tag_typedef_t ntatag_s_recv_response_ref;
#define NTATAG_S_RECV_RESPONSE_REF(x)\
- ntatag_s_recv_response_ref, tag_uint_vr(&(x))
+ ntatag_s_recv_response_ref, tag_usize_vr(&(x))
NTA_DLL extern tag_typedef_t ntatag_s_bad_message;
-#define NTATAG_S_BAD_MESSAGE(x) ntatag_s_bad_message, tag_uint_v(x)
+#define NTATAG_S_BAD_MESSAGE(x) ntatag_s_bad_message, tag_usize_v(x)
NTA_DLL extern tag_typedef_t ntatag_s_bad_message_ref;
#define NTATAG_S_BAD_MESSAGE_REF(x)\
- ntatag_s_bad_message_ref, tag_uint_vr(&(x))
+ ntatag_s_bad_message_ref, tag_usize_vr(&(x))
NTA_DLL extern tag_typedef_t ntatag_s_bad_request;
-#define NTATAG_S_BAD_REQUEST(x) ntatag_s_bad_request, tag_uint_v(x)
+#define NTATAG_S_BAD_REQUEST(x) ntatag_s_bad_request, tag_usize_v(x)
NTA_DLL extern tag_typedef_t ntatag_s_bad_request_ref;
#define NTATAG_S_BAD_REQUEST_REF(x)\
- ntatag_s_bad_request_ref, tag_uint_vr(&(x))
+ ntatag_s_bad_request_ref, tag_usize_vr(&(x))
NTA_DLL extern tag_typedef_t ntatag_s_bad_response;
-#define NTATAG_S_BAD_RESPONSE(x) ntatag_s_bad_response, tag_uint_v(x)
+#define NTATAG_S_BAD_RESPONSE(x) ntatag_s_bad_response, tag_usize_v(x)
NTA_DLL extern tag_typedef_t ntatag_s_bad_response_ref;
#define NTATAG_S_BAD_RESPONSE_REF(x)\
- ntatag_s_bad_response_ref, tag_uint_vr(&(x))
+ ntatag_s_bad_response_ref, tag_usize_vr(&(x))
NTA_DLL extern tag_typedef_t ntatag_s_drop_request;
-#define NTATAG_S_DROP_REQUEST(x) ntatag_s_drop_request, tag_uint_v(x)
+#define NTATAG_S_DROP_REQUEST(x) ntatag_s_drop_request, tag_usize_v(x)
NTA_DLL extern tag_typedef_t ntatag_s_drop_request_ref;
#define NTATAG_S_DROP_REQUEST_REF(x)\
- ntatag_s_drop_request_ref, tag_uint_vr(&(x))
+ ntatag_s_drop_request_ref, tag_usize_vr(&(x))
NTA_DLL extern tag_typedef_t ntatag_s_drop_response;
-#define NTATAG_S_DROP_RESPONSE(x) ntatag_s_drop_response, tag_uint_v(x)
+#define NTATAG_S_DROP_RESPONSE(x) ntatag_s_drop_response, tag_usize_v(x)
NTA_DLL extern tag_typedef_t ntatag_s_drop_response_ref;
#define NTATAG_S_DROP_RESPONSE_REF(x)\
- ntatag_s_drop_response_ref, tag_uint_vr(&(x))
+ ntatag_s_drop_response_ref, tag_usize_vr(&(x))
NTA_DLL extern tag_typedef_t ntatag_s_client_tr;
-#define NTATAG_S_CLIENT_TR(x) ntatag_s_client_tr, tag_uint_v(x)
+#define NTATAG_S_CLIENT_TR(x) ntatag_s_client_tr, tag_usize_v(x)
NTA_DLL extern tag_typedef_t ntatag_s_client_tr_ref;
#define NTATAG_S_CLIENT_TR_REF(x)\
- ntatag_s_client_tr_ref, tag_uint_vr(&(x))
+ ntatag_s_client_tr_ref, tag_usize_vr(&(x))
NTA_DLL extern tag_typedef_t ntatag_s_server_tr;
-#define NTATAG_S_SERVER_TR(x) ntatag_s_server_tr, tag_uint_v(x)
+#define NTATAG_S_SERVER_TR(x) ntatag_s_server_tr, tag_usize_v(x)
NTA_DLL extern tag_typedef_t ntatag_s_server_tr_ref;
#define NTATAG_S_SERVER_TR_REF(x)\
- ntatag_s_server_tr_ref, tag_uint_vr(&(x))
+ ntatag_s_server_tr_ref, tag_usize_vr(&(x))
NTA_DLL extern tag_typedef_t ntatag_s_dialog_tr;
-#define NTATAG_S_DIALOG_TR(x) ntatag_s_dialog_tr, tag_uint_v(x)
+#define NTATAG_S_DIALOG_TR(x) ntatag_s_dialog_tr, tag_usize_v(x)
NTA_DLL extern tag_typedef_t ntatag_s_dialog_tr_ref;
#define NTATAG_S_DIALOG_TR_REF(x)\
- ntatag_s_dialog_tr_ref, tag_uint_vr(&(x))
+ ntatag_s_dialog_tr_ref, tag_usize_vr(&(x))
NTA_DLL extern tag_typedef_t ntatag_s_acked_tr;
-#define NTATAG_S_ACKED_TR(x) ntatag_s_acked_tr, tag_uint_v(x)
+#define NTATAG_S_ACKED_TR(x) ntatag_s_acked_tr, tag_usize_v(x)
NTA_DLL extern tag_typedef_t ntatag_s_acked_tr_ref;
-#define NTATAG_S_ACKED_TR_REF(x) ntatag_s_acked_tr_ref, tag_uint_vr(&(x))
+#define NTATAG_S_ACKED_TR_REF(x) ntatag_s_acked_tr_ref, tag_usize_vr(&(x))
NTA_DLL extern tag_typedef_t ntatag_s_canceled_tr;
-#define NTATAG_S_CANCELED_TR(x) ntatag_s_canceled_tr, tag_uint_v(x)
+#define NTATAG_S_CANCELED_TR(x) ntatag_s_canceled_tr, tag_usize_v(x)
NTA_DLL extern tag_typedef_t ntatag_s_canceled_tr_ref;
#define NTATAG_S_CANCELED_TR_REF(x) \
- ntatag_s_canceled_tr_ref, tag_uint_vr(&(x))
+ ntatag_s_canceled_tr_ref, tag_usize_vr(&(x))
NTA_DLL extern tag_typedef_t ntatag_s_trless_request;
-#define NTATAG_S_TRLESS_REQUEST(x) ntatag_s_trless_request, tag_uint_v(x)
+#define NTATAG_S_TRLESS_REQUEST(x) ntatag_s_trless_request, tag_usize_v(x)
NTA_DLL extern tag_typedef_t ntatag_s_trless_request_ref;
#define NTATAG_S_TRLESS_REQUEST_REF(x)\
- ntatag_s_trless_request_ref, tag_uint_vr(&(x))
+ ntatag_s_trless_request_ref, tag_usize_vr(&(x))
NTA_DLL extern tag_typedef_t ntatag_s_trless_to_tr;
-#define NTATAG_S_TRLESS_TO_TR(x) ntatag_s_trless_to_tr, tag_uint_v(x)
+#define NTATAG_S_TRLESS_TO_TR(x) ntatag_s_trless_to_tr, tag_usize_v(x)
NTA_DLL extern tag_typedef_t ntatag_s_trless_to_tr_ref;
#define NTATAG_S_TRLESS_TO_TR_REF(x)\
- ntatag_s_trless_to_tr_ref, tag_uint_vr(&(x))
+ ntatag_s_trless_to_tr_ref, tag_usize_vr(&(x))
NTA_DLL extern tag_typedef_t ntatag_s_trless_response;
-#define NTATAG_S_TRLESS_RESPONSE(x) ntatag_s_trless_response, tag_uint_v(x)
+#define NTATAG_S_TRLESS_RESPONSE(x) ntatag_s_trless_response, tag_usize_v(x)
NTA_DLL extern tag_typedef_t ntatag_s_trless_response_ref;
#define NTATAG_S_TRLESS_RESPONSE_REF(x)\
- ntatag_s_trless_response_ref, tag_uint_vr(&(x))
+ ntatag_s_trless_response_ref, tag_usize_vr(&(x))
NTA_DLL extern tag_typedef_t ntatag_s_trless_200;
-#define NTATAG_S_TRLESS_200(x) ntatag_s_trless_200, tag_uint_v(x)
+#define NTATAG_S_TRLESS_200(x) ntatag_s_trless_200, tag_usize_v(x)
NTA_DLL extern tag_typedef_t ntatag_s_trless_200_ref;
#define NTATAG_S_TRLESS_200_REF(x)\
- ntatag_s_trless_200_ref, tag_uint_vr(&(x))
+ ntatag_s_trless_200_ref, tag_usize_vr(&(x))
NTA_DLL extern tag_typedef_t ntatag_s_merged_request;
-#define NTATAG_S_MERGED_REQUEST(x) ntatag_s_merged_request, tag_uint_v(x)
+#define NTATAG_S_MERGED_REQUEST(x) ntatag_s_merged_request, tag_usize_v(x)
NTA_DLL extern tag_typedef_t ntatag_s_merged_request_ref;
#define NTATAG_S_MERGED_REQUEST_REF(x)\
- ntatag_s_merged_request_ref, tag_uint_vr(&(x))
+ ntatag_s_merged_request_ref, tag_usize_vr(&(x))
NTA_DLL extern tag_typedef_t ntatag_s_sent_msg;
-#define NTATAG_S_SENT_MSG(x) ntatag_s_sent_msg, tag_uint_v(x)
+#define NTATAG_S_SENT_MSG(x) ntatag_s_sent_msg, tag_usize_v(x)
NTA_DLL extern tag_typedef_t ntatag_s_sent_msg_ref;
#define NTATAG_S_SENT_MSG_REF(x)\
- ntatag_s_sent_msg_ref, tag_uint_vr(&(x))
+ ntatag_s_sent_msg_ref, tag_usize_vr(&(x))
NTA_DLL extern tag_typedef_t ntatag_s_sent_request;
-#define NTATAG_S_SENT_REQUEST(x) ntatag_s_sent_request, tag_uint_v(x)
+#define NTATAG_S_SENT_REQUEST(x) ntatag_s_sent_request, tag_usize_v(x)
NTA_DLL extern tag_typedef_t ntatag_s_sent_request_ref;
#define NTATAG_S_SENT_REQUEST_REF(x)\
- ntatag_s_sent_request_ref, tag_uint_vr(&(x))
+ ntatag_s_sent_request_ref, tag_usize_vr(&(x))
NTA_DLL extern tag_typedef_t ntatag_s_sent_response;
-#define NTATAG_S_SENT_RESPONSE(x) ntatag_s_sent_response, tag_uint_v(x)
+#define NTATAG_S_SENT_RESPONSE(x) ntatag_s_sent_response, tag_usize_v(x)
NTA_DLL extern tag_typedef_t ntatag_s_sent_response_ref;
#define NTATAG_S_SENT_RESPONSE_REF(x)\
- ntatag_s_sent_response_ref, tag_uint_vr(&(x))
+ ntatag_s_sent_response_ref, tag_usize_vr(&(x))
NTA_DLL extern tag_typedef_t ntatag_s_retry_request;
-#define NTATAG_S_RETRY_REQUEST(x) ntatag_s_retry_request, tag_uint_v(x)
+#define NTATAG_S_RETRY_REQUEST(x) ntatag_s_retry_request, tag_usize_v(x)
NTA_DLL extern tag_typedef_t ntatag_s_retry_request_ref;
#define NTATAG_S_RETRY_REQUEST_REF(x)\
- ntatag_s_retry_request_ref, tag_uint_vr(&(x))
+ ntatag_s_retry_request_ref, tag_usize_vr(&(x))
NTA_DLL extern tag_typedef_t ntatag_s_retry_response;
-#define NTATAG_S_RETRY_RESPONSE(x) ntatag_s_retry_response, tag_uint_v(x)
+#define NTATAG_S_RETRY_RESPONSE(x) ntatag_s_retry_response, tag_usize_v(x)
NTA_DLL extern tag_typedef_t ntatag_s_retry_response_ref;
#define NTATAG_S_RETRY_RESPONSE_REF(x)\
- ntatag_s_retry_response_ref, tag_uint_vr(&(x))
+ ntatag_s_retry_response_ref, tag_usize_vr(&(x))
NTA_DLL extern tag_typedef_t ntatag_s_recv_retry;
-#define NTATAG_S_RECV_RETRY(x) ntatag_s_recv_retry, tag_uint_v(x)
+#define NTATAG_S_RECV_RETRY(x) ntatag_s_recv_retry, tag_usize_v(x)
NTA_DLL extern tag_typedef_t ntatag_s_recv_retry_ref;
#define NTATAG_S_RECV_RETRY_REF(x)\
- ntatag_s_recv_retry_ref, tag_uint_vr(&(x))
+ ntatag_s_recv_retry_ref, tag_usize_vr(&(x))
NTA_DLL extern tag_typedef_t ntatag_s_tout_request;
-#define NTATAG_S_TOUT_REQUEST(x) ntatag_s_tout_request, tag_uint_v(x)
+#define NTATAG_S_TOUT_REQUEST(x) ntatag_s_tout_request, tag_usize_v(x)
NTA_DLL extern tag_typedef_t ntatag_s_tout_request_ref;
#define NTATAG_S_TOUT_REQUEST_REF(x)\
- ntatag_s_tout_request_ref, tag_uint_vr(&(x))
+ ntatag_s_tout_request_ref, tag_usize_vr(&(x))
NTA_DLL extern tag_typedef_t ntatag_s_tout_response;
-#define NTATAG_S_TOUT_RESPONSE(x) ntatag_s_tout_response, tag_uint_v(x)
+#define NTATAG_S_TOUT_RESPONSE(x) ntatag_s_tout_response, tag_usize_v(x)
NTA_DLL extern tag_typedef_t ntatag_s_tout_response_ref;
#define NTATAG_S_TOUT_RESPONSE_REF(x)\
- ntatag_s_tout_response_ref, tag_uint_vr(&(x))
+ ntatag_s_tout_response_ref, tag_usize_vr(&(x))
SOFIA_END_DECLS
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/test_nta_api.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/test_nta_api.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/test_nta_api.c Fri Feb 9 12:32:17 2007
@@ -559,18 +559,18 @@
nta_agent_t *nta;
- uint32_t irq_hash = -1, orq_hash = -1, leg_hash = -1;
- uint32_t recv_msg = -1, sent_msg = -1;
- uint32_t recv_request = -1, recv_response = -1;
- uint32_t bad_message = -1, bad_request = -1, bad_response = -1;
- uint32_t drop_request = -1, drop_response = -1;
- uint32_t client_tr = -1, server_tr = -1, dialog_tr = -1;
- uint32_t acked_tr = -1, canceled_tr = -1;
- uint32_t trless_request = -1, trless_to_tr = -1, trless_response = -1;
- uint32_t trless_200 = -1, merged_request = -1;
- uint32_t sent_request = -1, sent_response = -1;
- uint32_t retry_request = -1, retry_response = -1, recv_retry = -1;
- uint32_t tout_request = -1, tout_response = -1;
+ usize_t irq_hash = -1, orq_hash = -1, leg_hash = -1;
+ usize_t recv_msg = -1, sent_msg = -1;
+ usize_t recv_request = -1, recv_response = -1;
+ usize_t bad_message = -1, bad_request = -1, bad_response = -1;
+ usize_t drop_request = -1, drop_response = -1;
+ usize_t client_tr = -1, server_tr = -1, dialog_tr = -1;
+ usize_t acked_tr = -1, canceled_tr = -1;
+ usize_t trless_request = -1, trless_to_tr = -1, trless_response = -1;
+ usize_t trless_200 = -1, merged_request = -1;
+ usize_t sent_request = -1, sent_response = -1;
+ usize_t retry_request = -1, retry_response = -1, recv_retry = -1;
+ usize_t tout_request = -1, tout_response = -1;
TEST_1(nta = nta_agent_create(ag->ag_root, (url_string_t *)"sip:*:*",
NULL, NULL, TAG_END()));
@@ -1301,10 +1301,10 @@
}
if (o_attach) {
- char line[10];
+ char *response, line[10];
printf("nua_test: pid %lu\n", (unsigned long)getpid());
printf("<Press RETURN to continue>\n");
- fgets(line, sizeof line, stdin);
+ response = fgets(line, sizeof line, stdin);
}
#if HAVE_ALARM
else if (o_alarm) {
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/nth_server.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/nth_server.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/nth_server.c Fri Feb 9 12:32:17 2007
@@ -704,7 +704,7 @@
tag_type_t tag, tag_value_t value, ...)
{
server_t *srv;
- msg_mclass_t *mclass = NULL;
+ msg_mclass_t const *mclass = NULL;
tp_name_t tpn[1] = {{ NULL }};
su_root_t *root = NULL;
http_server_t const *server = NULL;
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_dialog.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_dialog.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_dialog.c Fri Feb 9 12:32:17 2007
@@ -378,11 +378,9 @@
su_free(own, du);
}
- /* Zap dialog if there is no more usages */
+ /* Zap dialog if there are no more usages */
if (ds->ds_usage == NULL) {
- nta_leg_destroy(ds->ds_leg), ds->ds_leg = NULL;
- su_free(own, (void *)ds->ds_remote_tag), ds->ds_remote_tag = NULL;
- ds->ds_route = 0;
+ nua_dialog_remove(own, ds, NULL);
ds->ds_has_events = 0;
ds->ds_terminated = 0;
return;
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_register.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_register.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_register.c Fri Feb 9 12:32:17 2007
@@ -119,8 +119,11 @@
nua_registration_t *nr_next, **nr_prev, **nr_list; /* Doubly linked list and its head */
sip_from_t *nr_aor; /**< AoR for this registration, NULL if none */
sip_contact_t *nr_contact; /**< Our Contact */
+ sip_contact_t nr_dcontact[1]; /**< Contact in dialog */
sip_via_t *nr_via; /**< Corresponding Via headers */
+ unsigned long nr_min_expires; /**< Value from 423 negotiation */
+
/** Status of registration */
unsigned nr_ready:1;
/** Kind of registration.
@@ -222,14 +225,13 @@
/* Interface towards outbound_t */
sip_contact_t *nua_handle_contact_by_via(nua_handle_t *nh,
su_home_t *home,
+ int in_dialog,
char const *extra_username,
sip_via_t const *v,
char const *transport,
char const *m_param,
...);
-static int nua_stack_outbound_features(nua_handle_t *nh, outbound_t *ob);
-
static int nua_stack_outbound_refresh(nua_handle_t *,
outbound_t *ob);
@@ -431,6 +433,11 @@
* the desired transport-layer keepalive interval for stream-based
* transports like TLS and TCP.
*
+ * As alternative to OPTIONS/STUN keepalives, the client can propose
+ * a more frequent registration refresh interval with
+ * NUTAG_M_FEATURES() (e.g. NUTAG_M_FEATURES("expires=120") given as
+ * parameter to nua_register()).
+ *
* @sa #nua_r_register, nua_unregister(), #nua_r_unregister,
* #nua_i_register,
* @RFC3261 section 10,
@@ -659,7 +666,6 @@
NH_PISSET(nh, keepalive_stream)
? NH_PGET(nh, keepalive_stream)
: NH_PGET(nh, keepalive));
- nua_stack_outbound_features(nh, ob);
if (outbound_set_contact(ob, sip->sip_contact, nr->nr_via, unreg) < 0)
return nua_client_return(cr, 900, "Cannot set outbound contact", msg);
@@ -676,7 +682,8 @@
nua_handle_t *nh = cr->cr_owner;
nua_dialog_usage_t *du = cr->cr_usage;
nua_registration_t *nr;
- sip_contact_t *m = NULL, *contacts = sip->sip_contact, *previous = NULL;
+ sip_contact_t *m, *contacts = sip->sip_contact;
+ char const *min_expires = NULL;
int unreg;
(void)nh;
@@ -698,48 +705,58 @@
if (m == NULL)
nua_client_terminating(cr);
}
-
- if (cr->cr_terminating) {
- /* Remove the expire parameters from contacts */
- for (m = sip->sip_contact; m; m = m->m_next) {
- if (m->m_url->url_type == url_any) {
- /* If there is a '*' in contact list, remove everything else */
- while (m != sip->sip_contact)
- sip_header_remove(msg, sip, (sip_header_t *)sip->sip_contact);
- while (m->m_next)
- sip_header_remove(msg, sip, (sip_header_t *)m->m_next);
- contacts = m;
- break;
- }
- msg_header_remove_param(m->m_common, "expires");
- }
- }
}
unreg = cr->cr_terminating;
- if (du) {
- nr = nua_dialog_usage_private(du);
+ nr = nua_dialog_usage_private(du);
+ if (nr) {
if (nr->nr_ob) {
outbound_stop_keepalive(nr->nr_ob);
outbound_start_registering(nr->nr_ob);
}
if (nr->nr_by_stack) {
- m = nr->nr_contact;
+ sip_contact_t *m = nr->nr_contact, *previous = NULL;
+
outbound_get_contacts(nr->nr_ob, &m, &previous);
+
+ sip_add_dup(msg, sip, (sip_header_t *)m);
+ /* previous is an outdated contact generated by stack
+ * and it is now unregistered */
+ if (previous)
+ sip_add_dup(msg, sip, (sip_header_t *)previous);
+ }
+ }
+
+ for (m = sip->sip_contact; m; m = m->m_next) {
+ if (m->m_url->url_type == url_any) {
+ /* If there is a '*' in contact list, remove everything else */
+ while (m != sip->sip_contact)
+ sip_header_remove(msg, sip, (sip_header_t *)sip->sip_contact);
+ while (m->m_next)
+ sip_header_remove(msg, sip, (sip_header_t *)m->m_next);
+ contacts = m;
+ break;
+ }
+
+ if (!m->m_expires)
+ continue;
+ if (unreg) {
+ /* Remove the expire parameters from contacts */
+ msg_header_remove_param(m->m_common, "expires");
+ }
+ else if (nr && nr->nr_min_expires &&
+ strtoul(m->m_expires, 0, 10) < nr->nr_min_expires) {
+ if (min_expires == NULL)
+ min_expires = su_sprintf(msg_home(msg), "expires=%lu",
+ nr->nr_min_expires);
+ msg_header_replace_param(msg_home(msg), m->m_common, min_expires);
}
}
return nua_base_client_trequest(cr, msg, sip,
- /* m is stack-generated contact */
- SIPTAG_CONTACT(m),
- /*
- * previous is outdated stack-generated contact
- * which is now unregistered
- */
- SIPTAG_CONTACT(previous),
TAG_IF(unreg, SIPTAG_EXPIRES_STR("0")),
#if 0
TAG_IF(unreg, NTATAG_SIGCOMP_CLOSE(1)),
@@ -772,6 +789,11 @@
/* XXX - report an error? */;
}
+ if (nr && status == 423) {
+ if (sip->sip_min_expires)
+ nr->nr_min_expires = sip->sip_min_expires->me_delta;
+ }
+
/* Check for status-specific reasons to retry */
if (nua_base_client_check_restart(cr, status, phrase, sip))
return 1;
@@ -1262,11 +1284,8 @@
v2[1].v_next = NULL;
-#if 1
- contact = nua_handle_contact_by_via(nh, home, NULL, v2, protocol, NULL);
-#else
- contact = sip_contact_create_from_via_with_transport(home, v2, NULL, protocol);
-#endif
+ contact = nua_handle_contact_by_via(nh, home, 0, NULL, v2, protocol, NULL);
+
v = sip_via_dup(home, v2);
if (!contact || !v) {
@@ -1277,6 +1296,7 @@
nr->nr_ready = 1, nr->nr_default = 1, nr->nr_public = public;
nr->nr_secure = contact->m_url->url_type == url_sips;
nr->nr_contact = contact;
+ *nr->nr_dcontact = *contact, nr->nr_dcontact->m_params = NULL;
nr->nr_via = v;
nr->nr_ip4 = host_is_ip4_address(contact->m_url->url_host);
nr->nr_ip6 = !nr->nr_ip4 && host_is_ip6_reference(contact->m_url->url_host);
@@ -1446,7 +1466,10 @@
return m;
}
- return nr->nr_contact;
+ if (nr->nr_contact)
+ return nr->nr_dcontact;
+ else
+ return NULL;
}
/** Return initial route. */
@@ -1458,7 +1481,7 @@
sip_contact_t const *nua_stack_get_contact(nua_registration_t const *nr)
{
nr = nua_registration_by_aor(nr, NULL, NULL, 1);
- return nr ? nr->nr_contact : NULL;
+ return nr && nr->nr_contact ? nr->nr_dcontact : NULL;
}
/** Add a Contact (and Route) header to request */
@@ -1531,23 +1554,51 @@
return -1;
if (add_contact) {
- sip_contact_t const *m = nua_registration_contact(nr);
+ sip_contact_t const *m = NULL;
+ char const *m_display;
+ char const *m_username;
+ char const *m_params;
+ url_t const *u;
- char const *m_display = NH_PGET(nh, m_display);
- char const *m_username = NH_PGET(nh, m_username);
- char const *m_params = NH_PGET(nh, m_params);
- url_t const *u = m->m_url;
+ if (nr->nr_by_stack && nr->nr_ob) {
+ m = outbound_dialog_gruu(nr->nr_ob);
+
+ if (m)
+ return msg_header_add_dup(msg, (msg_pub_t *)sip, (void const *)m);
+
+ m = outbound_dialog_contact(nr->nr_ob);
+ }
+
+ if (m == NULL)
+ m = nr->nr_contact;
if (!m)
return -1;
- if (str0cmp(m_params, u->url_params) == 0)
+ u = m->m_url;
+
+ if (NH_PISSET(nh, m_display))
+ m_display = NH_PGET(nh, m_display);
+ else
+ m_display = m->m_display;
+
+ if (NH_PISSET(nh, m_username))
+ m_username = NH_PGET(nh, m_username);
+ else
+ m_username = m->m_url->url_user;
+
+ if (NH_PISSET(nh, m_params)) {
+ m_params = NH_PGET(nh, m_params);
+
+ if (u->url_params && m_params && strstr(u->url_params, m_params) == 0)
+ m_params = NULL;
+ }
+ else
m_params = NULL;
m = sip_contact_format(msg_home(msg),
"%s<%s:%s%s%s%s%s%s%s%s%s>",
- m_display ? m_display :
- m->m_display ? m->m_display : "",
+ m_display ? m_display : "",
u->url_scheme,
m_username ? m_username : "",
m_username ? "@" : "",
@@ -1648,7 +1699,7 @@
if (nr0 && nr0->nr_via) {
char const *tport = nr0->nr_via->v_next ? NULL : nr0->nr_via->v_protocol;
- m = nua_handle_contact_by_via(nh, nh->nh_home,
+ m = nua_handle_contact_by_via(nh, nh->nh_home, 0,
NULL, nr0->nr_via, tport, NULL);
}
}
@@ -1657,6 +1708,7 @@
return -1;
nr->nr_contact = m;
+ *nr->nr_dcontact = *m, nr->nr_dcontact->m_params = NULL;
nr->nr_ip4 = host_is_ip4_address(m->m_url->url_host);
nr->nr_ip6 = !nr->nr_ip4 && host_is_ip6_reference(m->m_url->url_host);
nr->nr_by_stack = !application_contact;
@@ -1785,6 +1837,7 @@
/** @internal Generate a @Contact header. */
sip_contact_t *nua_handle_contact_by_via(nua_handle_t *nh,
su_home_t *home,
+ int in_dialog,
char const *extra_username,
sip_via_t const *v,
char const *transport,
@@ -1868,7 +1921,7 @@
su_strlst_append(l, ";comp="), su_strlst_append(l, comp);
s = NH_PGET(nh, m_params);
if (s)
- su_strlst_append(l, s[0] == ';' ? "" : ";"), su_strlst_append(l, s);
+ s[0] == ';' ? "" : su_strlst_append(l, ";"), su_strlst_append(l, s);
su_strlst_append(l, ">");
va_start(va, m_param);
@@ -1882,81 +1935,42 @@
va_end(va);
- m = sip_contact_make(home, su_strlst_join(l, su_strlst_home(l), ""));
-
- su_strlst_destroy(l);
-
- return m;
-}
-
-/** @internal Return a string describing our features. */
-static char *nua_handle_features(nua_handle_t *nh)
-{
- char *retval = NULL;
- su_strlst_t *l = su_strlst_create(NULL);
- su_home_t *home = su_strlst_home(l);
-
- if (!l)
- return NULL;
-
- if (NH_PGET(nh, m_features)) {
- char const *m_features = NH_PGET(nh, m_features);
-
- if (m_features[0] != ';')
- su_strlst_append(l, ";");
-
- su_strlst_append(l, m_features);
- }
-
- if (NH_PGET(nh, callee_caps)) {
- sip_allow_t const *allow = NH_PGET(nh, allow);
-
- if (allow) {
- /* Skip ";" if this is first one */
- su_strlst_append(l, ";methods=\"" + (su_strlst_len(l) == 0));
- if (allow->k_items) {
- size_t i;
- for (i = 0; allow->k_items[i]; i++) {
- su_strlst_append(l, allow->k_items[i]);
- if (allow->k_items[i + 1])
- su_strlst_append(l, ",");
- }
+ if (!in_dialog) {
+ s = NH_PGET(nh, m_features);
+ if (s)
+ s[0] == ';' ? "" : su_strlst_append(l, ";"), su_strlst_append(l, s);
+
+ if (NH_PGET(nh, callee_caps)) {
+ sip_allow_t const *allow = NH_PGET(nh, allow);
+
+ if (allow) {
+ su_strlst_append(l, ";methods=\"");
+ if (allow->k_items) {
+ size_t i;
+ for (i = 0; allow->k_items[i]; i++) {
+ su_strlst_append(l, allow->k_items[i]);
+ if (allow->k_items[i + 1])
+ su_strlst_append(l, ",");
+ }
+ }
+ su_strlst_append(l, "\"");
}
- su_strlst_append(l, "\"");
- }
-
- if (nh->nh_soa) {
- char **media = soa_media_features(nh->nh_soa, 0, home);
- while (*media) {
- if (su_strlst_len(l))
- su_strlst_append(l, ";");
- su_strlst_append(l, *media++);
+ if (nh->nh_soa) {
+ char **media = soa_media_features(nh->nh_soa, 0, home);
+
+ while (*media) {
+ if (su_strlst_len(l))
+ su_strlst_append(l, ";");
+ su_strlst_append(l, *media++);
+ }
}
}
}
- if (su_strlst_len(l))
- retval = su_strlst_join(l, nh->nh_home, "");
-
+ m = sip_contact_make(home, su_strlst_join(l, su_strlst_home(l), ""));
+
su_strlst_destroy(l);
-
- return retval;
-}
-
-static int nua_stack_outbound_features(nua_handle_t *nh, outbound_t *ob)
-{
- char *features;
- int retval;
-
- if (!nh)
- return -1;
- if (!ob)
- return 0;
-
- features = nua_handle_features(nh);
- retval = outbound_set_features(ob, features);
- su_free(nh->nh_home, features);
-
- return retval;
+
+ return m;
}
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.c Fri Feb 9 12:32:17 2007
@@ -299,10 +299,7 @@
if (tags) {
tagi_t *t = e->e_tags, *t_end = (tagi_t *)((char *)t + len);
- void *b = t_end;
-#ifndef NDEBUG
- void *end = (char *)b + xtra;
-#endif
+ void *b = t_end, *end = (char *)b + xtra;
t = tl_dup(t, tags, &b); p = b;
assert(t == t_end); assert(b == end); (void)end;
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/outbound.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/outbound.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/outbound.c Fri Feb 9 12:32:17 2007
@@ -117,7 +117,6 @@
char const *ob_instance; /**< Our instance ID */
int32_t ob_reg_id; /**< Flow-id */
- char const *ob_features; /**< Feature parameters for rcontact */
sip_contact_t *ob_rcontact; /**< Our contact */
sip_contact_t *ob_dcontact; /**< Contact for dialogs */
sip_contact_t *ob_previous; /**< Stale contact */
@@ -327,20 +326,6 @@
return 0;
}
-/** Set the feature string (added to the Contact header when registering). */
-int outbound_set_features(outbound_t *ob, char *features)
-{
- char *old_features = (char *)ob->ob_features;
- char *new_features = su_strdup(ob->ob_home, features);
-
- if (features && !new_features)
- return -1;
-
- ob->ob_features = new_features;
- su_free(ob->ob_home, old_features);
- return 0;
-}
-
/* ---------------------------------------------------------------------- */
/** Obtain contacts for REGISTER */
@@ -698,21 +683,32 @@
{
msg_t *msg = nta_msg_create(ob->ob_nta, MSG_FLG_COMPACT), *previous;
sip_t *osip = sip_object(msg);
- sip_accept_contact_t *ac;
-
- char const *p1 = ob->ob_instance;
- char const *p2 = ob->ob_features;
+ sip_contact_t *m = ob->ob_rcontact;
unsigned d = ob->ob_keepalive.interval;
assert(regsip); assert(regsip->sip_request);
- if (p1 || p2) {
- ac = sip_accept_contact_format(msg_home(msg), "*;require;explicit;%s%s%s",
- p1 ? p1 : "",
- p2 && p2 ? ";" : "",
- p2 ? p2 : "");
- msg_header_insert(msg, NULL, (void *)ac);
+ if (m && m->m_params) {
+ sip_accept_contact_t *ac;
+ size_t i;
+ int features = 0;
+
+ ac = sip_accept_contact_make(msg_home(msg), "*;require;explicit");
+
+ for (i = 0; m->m_params[i]; i++) {
+ char const *s = m->m_params[i];
+ if (!sip_is_callerpref(s))
+ continue;
+ features++;
+ s = su_strdup(msg_home(msg), s);
+ msg_header_add_param(msg_home(msg), ac->cp_common, s);
+ }
+
+ if (features)
+ msg_header_insert(msg, NULL, (void *)ac);
+ else
+ msg_header_free(msg_home(msg), (void *)ac);
}
if (0 >
@@ -1008,46 +1004,16 @@
v = v0; *v0 = *via; v0->v_next = NULL;
- dcontact = ob->ob_oo->oo_contact(ob->ob_owner, home,
+ dcontact = ob->ob_oo->oo_contact(ob->ob_owner, home, 1,
NULL, v, v->v_protocol, NULL);
if (ob->ob_instance && ob->ob_reg_id != 0)
snprintf(reg_id_param, sizeof reg_id_param, ";reg-id=%u", ob->ob_reg_id);
- rcontact = ob->ob_oo->oo_contact(ob->ob_owner, home,
+ rcontact = ob->ob_oo->oo_contact(ob->ob_owner, home, 0,
NULL, v, v->v_protocol,
- ob->ob_features ? ob->ob_features : "",
ob->ob_instance, reg_id_param, NULL);
-#if 0
- char *uri;
-
- /* uri contains < > */
- uri = sip_contact_string_from_via(NULL, via, NULL, v->v_protocol);
-
- dcontact = sip_contact_make(home, uri);
-
- if (ob->ob_instance) {
- char reg_id[20];
-
- if (ob->ob_instance && ob->ob_reg_id)
- snprintf(reg_id, sizeof reg_id, ";reg-id=%u", ob->ob_reg_id);
- else
- strcpy(reg_id, "");
-
- rcontact = sip_contact_format(home, "%s;%s%s%s%s",
- uri, ob->ob_instance, reg_id,
- ob->ob_features ? ";" : "",
- ob->ob_features ? ob->ob_features : "");
- }
- else if (ob->ob_features)
- rcontact = sip_contact_format(home, "%s;%s", uri, ob->ob_features);
- else
- rcontact = dcontact;
-
- free(uri);
-#endif
-
v = sip_via_dup(home, v);
if (!rcontact || !dcontact || !v) {
@@ -1139,7 +1105,7 @@
char const *tport = !v->v_next ? v->v_protocol : NULL;
char reg_id_param[20];
- dcontact = ob->ob_oo->oo_contact(ob->ob_owner, home,
+ dcontact = ob->ob_oo->oo_contact(ob->ob_owner, home, 1,
NULL, v, tport, NULL);
if (!dcontact)
return -1;
@@ -1147,9 +1113,8 @@
if (ob->ob_instance && ob->ob_reg_id != 0)
snprintf(reg_id_param, sizeof reg_id_param, ";reg-id=%u", ob->ob_reg_id);
- rcontact = ob->ob_oo->oo_contact(ob->ob_owner, home,
+ rcontact = ob->ob_oo->oo_contact(ob->ob_owner, home, 0,
NULL, v, v->v_protocol,
- ob->ob_features ? ob->ob_features : "",
ob->ob_instance, reg_id_param, NULL);
if (!rcontact)
return -1;
@@ -1195,6 +1160,11 @@
return ob->ob_dcontact;
}
+sip_contact_t const *outbound_dialog_gruu(outbound_t const *ob)
+{
+ return ob ? ob->ob_gruu : NULL;
+}
+
/* ---------------------------------------------------------------------- */
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/outbound.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/outbound.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/outbound.h Fri Feb 9 12:32:17 2007
@@ -70,8 +70,6 @@
unsigned dgram_interval,
unsigned stream_interval);
-int outbound_set_features(outbound_t *ob, char *features);
-
int outbound_get_contacts(outbound_t *ob,
sip_contact_t **return_current_contact,
sip_contact_t **return_previous_contact);
@@ -98,6 +96,8 @@
sip_contact_t const *outbound_dialog_contact(outbound_t const *ob);
+sip_contact_t const *outbound_dialog_gruu(outbound_t const *ob);
+
int outbound_gruuize(outbound_t *ob, sip_t const *sip);
void outbound_start_keepalive(outbound_t *ob,
@@ -118,6 +118,7 @@
int oo_size;
sip_contact_t *(*oo_contact)(outbound_owner_t *,
su_home_t *home,
+ int used_in_dialog,
char const *extra_username,
sip_via_t const *v,
char const *transport,
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/sofia-sip/nua_tag.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/sofia-sip/nua_tag.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/sofia-sip/nua_tag.h Fri Feb 9 12:32:17 2007
@@ -1074,7 +1074,7 @@
*
* The outbound option string can specify how the NAT traversal is handled.
* The option tokens are as follows:
- * - "gruuize": try to generate a GRUU
+ * - "gruuize": try to generate a GRUU contact from REGISTER response
* - "outbound": use SIP outbound extension (off by default)
* - "validate": validate registration behind a NAT by sending OPTIONS to self
* - "natify": try to traverse NAT
@@ -1084,6 +1084,10 @@
* An option token with "no-" or "not-" prefix turns the option off. For
* example, if you want to try to traverse NATs but not to use OPTIONS
* keepalive, use NUTAG_OUTBOUND("natify no-options-keepalive").
+ *
+ * An empty string can be passed to let the stack choose the
+ * default values for outbound usage (in the 1.12.5 release, the
+ * defaults are: "gruuize no-outbound validate use-port options-keepalive").
*
* @note
* Options string is used so that no new tags need to be added when the
@@ -1207,7 +1211,7 @@
* nua_create()
*
* @par Parameter type
- * msg_mclass_t *
+ * msg_mclass_t const *
*
* @par Values
* Pointer to an extended SIP parser.
@@ -1244,6 +1248,9 @@
/** Keepalive interval in milliseconds.
*
+ * This setting applies to OPTIONS/STUN keepalives. See documentation
+ * for nua_register() for more detailed information.
+ *
* @par Used with
* nua_register() \n
* nua_set_params() \n
@@ -1269,6 +1276,8 @@
/** Transport-level keepalive interval for streams.
*
+ * See documentation for nua_register() for more detailed information.
+ *
* @par Used with
* nua_register() \n
* nua_set_params() \n
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_basic_call.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_basic_call.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_basic_call.c Fri Feb 9 12:32:17 2007
@@ -478,6 +478,47 @@
TEST_1(nua_handle_has_active_call(b_call->nh));
TEST_1(!nua_handle_has_call_on_hold(b_call->nh));
+ /* Send a NOTIFY from B to A */
+ if (print_headings)
+ printf("TEST NUA-3.2.2: send a NOTIFY within a dialog\n");
+
+ /* Make A to accept NOTIFY */
+ nua_set_params(a->nua, NUTAG_APPL_METHOD("NOTIFY"), TAG_END());
+ run_a_until(ctx, nua_r_set_params, until_final_response);
+
+ NOTIFY(b, b_call, b_call->nh,
+ NUTAG_NEWSUB(1),
+ SIPTAG_SUBJECT_STR("NUA-3.2.2"),
+ SIPTAG_EVENT_STR("message-summary"),
+ SIPTAG_CONTENT_TYPE_STR("application/simple-message-summary"),
+ SIPTAG_PAYLOAD_STR("Messages-Waiting: no"),
+ TAG_END());
+
+ run_ab_until(ctx, -1, accept_notify, -1, save_until_final_response);
+
+ /* Notifier events: nua_r_notify */
+ TEST_1(e = b->events->head); TEST_E(e->data->e_event, nua_r_notify);
+ TEST(e->data->e_status, 200);
+ TEST_1(tl_find(e->data->e_tags, nutag_substate));
+ TEST(tl_find(e->data->e_tags, nutag_substate)->t_value,
+ nua_substate_terminated);
+
+ /* watcher events: nua_i_notify */
+ TEST_1(e = a->events->head); TEST_E(e->data->e_event, nua_i_notify);
+ TEST_1(sip = sip_object(e->data->e_msg));
+ TEST_1(sip->sip_subscription_state);
+ TEST_S(sip->sip_subscription_state->ss_substate, "terminated");
+ TEST_1(tl_find(e->data->e_tags, nutag_substate));
+ TEST(tl_find(e->data->e_tags, nutag_substate)->t_value,
+ nua_substate_terminated);
+ TEST_1(!e->next);
+
+ free_events_in_list(ctx, a->events);
+ free_events_in_list(ctx, b->events);
+
+ if (print_headings)
+ printf("TEST NUA-3.2.2: PASSED\n");
+
INFO(b, b_call, b_call->nh, TAG_END());
BYE(b, b_call, b_call->nh, TAG_END());
INFO(b, b_call, b_call->nh, TAG_END());
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_nua.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_nua.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_nua.c Fri Feb 9 12:32:17 2007
@@ -92,6 +92,9 @@
" --no-alarm don't ask for guard ALARM\n"
" -p uri specify uri of outbound proxy (implies --no-proxy)\n"
" --proxy-tests run tests involving proxy, too\n"
+#if SU_HAVE_OSX_CF_API /* If compiled with CoreFoundation events */
+ " --osx-runloop use OSX CoreFoundation runloop instead of poll() loop\n"
+#endif
" -k do not exit after first error\n"
;
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_nua.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_nua.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_nua.h Fri Feb 9 12:32:17 2007
@@ -216,6 +216,8 @@
int until_ready(CONDITION_PARAMS);
int accept_call(CONDITION_PARAMS);
+int accept_notify(CONDITION_PARAMS);
+
void a_callback(nua_event_t event,
int status, char const *phrase,
nua_t *nua, struct context *ctx,
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_register.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_register.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_register.c Fri Feb 9 12:32:17 2007
@@ -133,6 +133,8 @@
NUTAG_KEEPALIVE(1000),
NUTAG_M_DISPLAY("A&A"),
NUTAG_M_USERNAME("a"),
+ NUTAG_M_PARAMS("foo=bar"),
+ NUTAG_M_FEATURES("q=0.9"),
SIPTAG_CSEQ(cseq),
TAG_END());
run_a_until(ctx, -1, save_until_final_response);
@@ -161,6 +163,8 @@
/* VC does not dig \" with TEST_S() */
TEST_S(sip->sip_contact->m_display, expect_m_display); }
TEST_S(sip->sip_contact->m_url->url_user, "a");
+ TEST_1(strstr(sip->sip_contact->m_url->url_params, "foo=bar"));
+ TEST_S(sip->sip_contact->m_q, "0.9");
TEST(sip->sip_cseq->cs_seq, 14);
if (ctx->nat) {
@@ -222,8 +226,12 @@
TEST_1(c_reg->nh = nua_handle(c->nua, c_reg, TAG_END()));
REGISTER(c, c_reg, c_reg->nh, SIPTAG_TO(c->to),
+ NUTAG_OUTBOUND(NULL),
NUTAG_M_DISPLAY("C"),
NUTAG_M_USERNAME("c"),
+ NUTAG_M_PARAMS("c=1"),
+ NUTAG_M_FEATURES("q=0.987;expires=5"),
+ NUTAG_CALLEE_CAPS(1),
SIPTAG_EXPIRES_STR("5"), /* Test 423 negotiation */
TAG_END());
run_abc_until(ctx, -1, save_events, -1, save_events,
@@ -254,6 +262,9 @@
TEST_1(sip->sip_contact);
TEST_S(sip->sip_contact->m_display, "C");
TEST_S(sip->sip_contact->m_url->url_user, "c");
+ TEST_1(strstr(sip->sip_contact->m_url->url_params, "c=1"));
+ TEST_S(sip->sip_contact->m_q, "0.987");
+ TEST_1(msg_header_find_param(sip->sip_contact->m_common, "methods="));
TEST_1(!e->next);
free_events_in_list(ctx, c->events);
@@ -688,6 +699,7 @@
UNREGISTER(c, c->call, c->call->nh, SIPTAG_TO(c->to),
NUTAG_M_DISPLAY("C"),
NUTAG_M_USERNAME("c"),
+ NUTAG_M_PARAMS("c=1"),
TAG_END());
run_c_until(ctx, -1, save_until_final_response);
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_basic.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_basic.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_basic.c Fri Feb 9 12:32:17 2007
@@ -899,7 +899,7 @@
sip_header_t *h;
n = url_xtra(us->us_url);
- h = sip_header_alloc(home, sip_to_class, n);
+ h = sip_header_alloc(home, hc, n);
if (h) {
sip_addr_t *a = h->sh_to;
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_parser.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_parser.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_parser.c Fri Feb 9 12:32:17 2007
@@ -60,9 +60,9 @@
char const sip_version_2_0[] = "SIP/2.0";
/** Default message class */
-extern msg_mclass_t sip_mclass[];
+extern msg_mclass_t const sip_mclass[];
-msg_mclass_t *sip_default_mclass(void)
+msg_mclass_t const *sip_default_mclass(void)
{
return sip_mclass;
}
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sofia-sip/sip_header.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sofia-sip/sip_header.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sofia-sip/sip_header.h Fri Feb 9 12:32:17 2007
@@ -58,7 +58,7 @@
SOFIA_BEGIN_DECLS
/** Return built-in SIP parser object. */
-SOFIAPUBFUN msg_mclass_t *sip_default_mclass(void);
+SOFIAPUBFUN msg_mclass_t const *sip_default_mclass(void);
/** Check that sip_t is a SIP structure (not RTSP or HTTP). @HIDE */
#define sip_is_sip(sip) ((sip) && (sip)->sip_ident == SIP_PROTOCOL_TAG)
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/test_sip_msg.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/test_sip_msg.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/test_sip_msg.c Fri Feb 9 12:32:17 2007
@@ -65,7 +65,7 @@
return *o != *n;
}
-int test_msg_class(msg_mclass_t *mc)
+int test_msg_class(msg_mclass_t const *mc)
{
int i, j, N;
@@ -159,7 +159,7 @@
int m, tcp;
sip_t *sip;
int exitcode = 0;
- msg_mclass_t *sip_mclass = sip_default_mclass();
+ msg_mclass_t const *sip_mclass = sip_default_mclass();
msg_t *msg = msg_create(sip_mclass, MSG_FLG_EXTRACT_COPY);
msg_iovec_t iovec[1];
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/torture_sip.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/torture_sip.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/torture_sip.c Fri Feb 9 12:32:17 2007
@@ -412,7 +412,12 @@
TEST_1(sip_from_tag(home, f, "tag=jxahudsf") == 0);
su_free(home, f);
+ TEST_1(f = sip_from_create(home, (void *)"<sip:joe@bar;tag=bar> (joe)"));
+ TEST_1(sip_is_from((sip_header_t*)f));
+ su_free(home, f);
+
TEST_1(t = sip_to_create(home, (void *)"<sip:joe@bar;tag=bar> (joe)"));
+ TEST_1(sip_is_to((sip_header_t*)f));
TEST_1(sip_to_tag(home, t, "tag=jxahudsf") == 0);
TEST_S(t->a_tag, "jxahudsf");
TEST(msg_header_replace_param(home, t->a_common, "tag=bar"), 1);
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/validator.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/validator.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/validator.c Fri Feb 9 12:32:17 2007
@@ -180,7 +180,7 @@
return path;
}
-msg_mclass_t *mclass = NULL;
+msg_mclass_t const *mclass = NULL;
int validate_file(int fd, char const *name, context_t *ctx);
int validate_dump(char *, off_t, context_t *ctx);
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/run_test_sresolv
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/run_test_sresolv (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/run_test_sresolv Fri Feb 9 12:32:17 2007
@@ -55,9 +55,11 @@
done
fi
-# No named, no fun
-type -p named >/dev/null || {
-echo test_sresolv: there is no BIND named installed, skipping
+# No BIND 9, no fun
+{ type -p named >/dev/null &&
+ named -v | grep -q BIND.*9
+} || {
+echo test_sresolv: there is no BIND 9 named in you path, skipping
exit 77
}
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/test_sresolv.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/test_sresolv.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/test_sresolv.c Fri Feb 9 12:32:17 2007
@@ -64,7 +64,6 @@
#include <sofia-resolv/sres_async.h>
#include <sofia-resolv/sres_record.h>
-#include <sofia-sip/su.h>
#include <sofia-sip/su_alloc.h>
#include <assert.h>
@@ -120,6 +119,84 @@
static int tstflags = 0;
+#if HAVE_WINSOCK2_H
+
+/* Posix send() */
+static inline
+ssize_t sres_send(sres_socket_t s, void *b, size_t length, int flags)
+{
+ if (length > INT_MAX)
+ length = INT_MAX;
+ return (ssize_t)send(s, b, (int)length, flags);
+}
+
+static inline
+ssize_t sres_sendto(sres_socket_t s, void *b, size_t length, int flags,
+ struct sockaddr const *sa, socklen_t salen)
+{
+ if (length > INT_MAX)
+ length = INT_MAX;
+ return (ssize_t)sendto(s, b, (int)length, flags, (void *)sa, (int)salen);
+}
+
+/* Posix recvfrom() */
+static inline
+ssize_t sres_recvfrom(sres_socket_t s, void *buffer, size_t length, int flags,
+ struct sockaddr *from, socklen_t *fromlen)
+{
+ int retval, ilen;
+
+ if (fromlen)
+ ilen = *fromlen;
+
+ if (length > INT_MAX)
+ length = INT_MAX;
+
+ retval = recvfrom(s, buffer, (int)length, flags,
+ (void *)from, fromlen ? &ilen : NULL);
+
+ if (fromlen)
+ *fromlen = ilen;
+
+ return (ssize_t)retval;
+}
+
+static sres_socket_t sres_socket(int af, int socktype, int protocol)
+{
+ return socket(af, socktype, protocol);
+}
+
+static inline
+int sres_close(sres_socket_t s)
+{
+ return closesocket(s);
+}
+
+#if !defined(IPPROTO_IPV6)
+#if HAVE_SIN6
+#include <tpipv6.h>
+#else
+#if !defined(__MINGW32__)
+struct sockaddr_storage {
+ short ss_family;
+ char ss_pad[126];
+};
+#endif
+#endif
+#endif
+#else
+
+#define sres_send(s,b,len,flags) send((s),(b),(len),(flags))
+#define sres_sendto(s,b,len,flags,a,alen) \
+ sendto((s),(b),(len),(flags),(a),(alen))
+#define sres_recvfrom(s,b,len,flags,a,alen) \
+ recvfrom((s),(b),(len),(flags),(a),(alen))
+#define sres_close(s) close((s))
+#define SOCKET_ERROR (-1)
+#define INVALID_SOCKET ((sres_socket_t)-1)
+#define sres_socket(x,y,z) socket((x),(y),(z))
+#endif
+
#if 1
#if HAVE_POLL && 0
@@ -145,7 +222,7 @@
int test_socket(sres_context_t *ctx)
{
int af;
- su_sockeet_t s1, s2, s3, s4;
+ sres_socket_t s1, s2, s3, s4;
struct sockaddr_storage a[1];
struct sockaddr_storage a1[1], a2[1], a3[1], a4[1];
struct sockaddr_in *sin = (void *)a;
@@ -160,10 +237,10 @@
af = AF_INET;
for (;;) {
- TEST_1((s1 = su_socket(af, SOCK_DGRAM, 0)) != INVALID_SOCKET);
- TEST_1((s2 = su_socket(af, SOCK_DGRAM, 0)) != INVALID_SOCKET);
- TEST_1((s3 = su_socket(af, SOCK_DGRAM, 0)) != INVALID_SOCKET);
- TEST_1((s4 = su_socket(af, SOCK_DGRAM, 0)) != INVALID_SOCKET);
+ TEST_1((s1 = sres_socket(af, SOCK_DGRAM, 0)) != INVALID_SOCKET);
+ TEST_1((s2 = sres_socket(af, SOCK_DGRAM, 0)) != INVALID_SOCKET);
+ TEST_1((s3 = sres_socket(af, SOCK_DGRAM, 0)) != INVALID_SOCKET);
+ TEST_1((s4 = sres_socket(af, SOCK_DGRAM, 0)) != INVALID_SOCKET);
TEST_1(setblocking(s1, 0) == 0);
TEST_1(setblocking(s2, 0) == 0);
@@ -212,13 +289,13 @@
TEST(connect(s2, sa4, a4len), 0);
TEST(getsockname(s2, (struct sockaddr *)a2, &a2len), 0);
- TEST(sendto(s1, "foo", 3, 0, sa4, a4len), 3);
- TEST(recvfrom(s4, buf, sizeof buf, 0, sa, &alen), 3);
- TEST(sendto(s4, "bar", 3, 0, sa, alen), 3);
- TEST(recvfrom(s2, buf, sizeof buf, 0, sa, &alen), -1);
- TEST(recvfrom(s1, buf, sizeof buf, 0, sa, &alen), 3);
+ TEST(sres_sendto(s1, "foo", 3, 0, sa4, a4len), 3);
+ TEST(sres_recvfrom(s4, buf, sizeof buf, 0, sa, &alen), 3);
+ TEST(sres_sendto(s4, "bar", 3, 0, sa, alen), 3);
+ TEST(sres_recvfrom(s2, buf, sizeof buf, 0, sa, &alen), -1);
+ TEST(sres_recvfrom(s1, buf, sizeof buf, 0, sa, &alen), 3);
- su_close(s1), su_close(s2), su_close(s3), su_close(s4);
+ sres_close(s1), sres_close(s2), sres_close(s3), sres_close(s4);
break;
}
@@ -1428,7 +1505,7 @@
if (ctx->sinkidx)
su_root_deregister(ctx->root, ctx->sinkidx);
ctx->sinkidx = 0;
- su_close(ctx->sink), ctx->sink = INVALID_SOCKET;
+ sres_close(ctx->sink), ctx->sink = INVALID_SOCKET;
END();
}
@@ -1453,7 +1530,7 @@
result = sres_cached_answers(res, sres_type_a, domain);
-#if 0
+#if 0 /* Currently, we do not create error records */
TEST_1(result); TEST_1(result[0] != NULL);
rr_soa = result[0]->sr_soa;
@@ -1464,7 +1541,6 @@
sres_free_answers(res, result);
#else
- /* Currently, we do not create error records */
TEST_1(result == NULL);
#endif
@@ -1625,7 +1701,8 @@
struct sockaddr *sa = (void *)ss;
socklen_t salen = sizeof ss;
char *bin;
- size_t i, n, binlen;
+ size_t i, binlen;
+ ssize_t n;
char const *domain = "example.com";
char query[512];
@@ -1647,14 +1724,14 @@
/* We got an error => make new query */
TEST_1(q = sres_query(res, test_answer, ctx, /* Send query */
sres_type_naptr, domain));
- TEST_1((n = recvfrom(c, query, sizeof query, 0, sa, &salen)) != -1);
+ TEST_1((n = sres_recvfrom(c, query, sizeof query, 0, sa, &salen)) != -1);
memcpy(bin, query, 2); /* Copy ID */
}
if (i != 1)
bin[i] ^= 0xff;
else
bin[3] ^= SRES_FORMAT_ERR; /* format error -> EDNS0 failure */
- n = su_sendto(c, bin, binlen, 0, sa, salen);
+ n = sres_sendto(c, bin, binlen, 0, sa, salen);
if (i != 1)
bin[i] ^= 0xff;
else
@@ -1675,10 +1752,10 @@
/* We got an error => make new query */
TEST_1(q = sres_query(res, test_answer, ctx, /* Send query */
sres_type_naptr, domain));
- TEST_1((n = su_recvfrom(c, query, sizeof query, 0, sa, &salen)) != -1);
+ TEST_1((n = sres_recvfrom(c, query, sizeof query, 0, sa, &salen)) != -1);
memcpy(bin, query, 2); /* Copy ID */
}
- n = su_sendto(c, bin, i, 0, sa, salen);
+ n = sres_sendto(c, bin, i, 0, sa, salen);
if (n == -1)
perror("sendto");
while (!poll_sockets(ctx))
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/Makefile.am Fri Feb 9 12:32:17 2007
@@ -79,7 +79,7 @@
su_time.c su_time0.c \
su_wait.c su_root.c su_timer.c \
su_port.c su_port.h \
- su_base_port.c su_pthread_port.c \
+ su_base_port.c su_pthread_port.c su_socket_port.c \
su_poll_port.c su_epoll_port.c su_select_port.c \
su_localinfo.c \
su_os_nw.c \
@@ -94,6 +94,7 @@
inet_ntop.c inet_pton.c poll.c getopt.c \
su_tag_ref.c su_win32_port.c
+libsu_la_CFLAGS = $(AM_CFLAGS) $(SOFIA_CFLAGS)
libsu_la_LIBADD = $(REPLACE_LIBADD)
libsu_la_DEPENDENCIES = $(REPLACE_LIBADD)
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/poll.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/poll.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/poll.c Fri Feb 9 12:32:17 2007
@@ -1,13 +1,20 @@
-/* Copyright (C) 1994,1996,1997,1998,1999,2001,2002
- Free Software Foundation, Inc.
- This file is part of the GNU C Library.
+/* This file is part of the Sofia-SIP package.
+
+ Copyright (C) 2005 Nokia Corporation.
+
+ Contact: Pekka Pessi <pekka.pessi(a)nokia.com>
- The GNU C Library is free software; you can redistribute it and/or
+ This file is originally from GNU C library.
+
+ Copyright (C) 1994,1996,1997,1998,1999,2001,2002
+ Free Software Foundation, Inc.
+
+ This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
- The GNU C Library is distributed in the hope that it will be useful,
+ This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
@@ -19,237 +26,225 @@
#include "config.h"
-#if !HAVE_POLL && HAVE_SELECT && HAVE_POLL_PORT
+#if HAVE_SELECT
#include "sofia-sip/su.h"
-
-//extern __typeof(poll) __libc_poll;
-
-#if 1
-
#include <alloca.h>
#include <string.h>
#include "sofia-sip/su_wait.h"
-#ifndef __NFDBITS
-#define NBBY 8 /* bits in a byte */
-#define __NFDBITS (sizeof(__int32_t) * NBBY) /* bits per mask */
-#endif
-
-
-#undef howmany
-
-#ifndef howmany
-#define howmany(x, y) (((x)+((y)-1))/(y)) * sizeof(uint32_t)
-#endif
-
-//libc_hidden_proto(memcpy)
-//libc_hidden_proto(memset)
-//libc_hidden_proto(getdtablesize)
-//libc_hidden_proto(select)
-
-/* uClinux 2.0 doesn't have poll, emulate it using select */
-
-/* Poll the file descriptors described by the NFDS structures starting at
- FDS. If TIMEOUT is nonzero and not -1, allow TIMEOUT milliseconds for
- an event to occur; if TIMEOUT is -1, block until an event occurs.
- Returns the number of file descriptors with events, zero if timed out,
- or -1 for errors. */
+#undef NBBY
+#undef NFDBITS
+#undef FDSETSIZE
+#undef roundup
+
+#define NBBY 8 /* bits in a byte */
+#define NFDBITS (sizeof(long) * NBBY) /* bits per mask */
+
+#define FDSETSIZE(n) (((n) + NFDBITS - 1) / NFDBITS * (NFDBITS / NBBY))
+#define roundup(n, x) (((n) + (x) - 1) / (x) * (x))
+
+/* Emulated poll() using select().
+
+This is used by su_wait().
+
+Poll the file descriptors described by the NFDS structures starting at
+FDS. If TIMEOUT is nonzero and not -1, allow TIMEOUT milliseconds for
+an event to occur; if TIMEOUT is -1, block until an event occurs.
+Returns the number of file descriptors with events, zero if timed out,
+or -1 for errors. */
int poll(struct pollfd *fds, nfds_t nfds, int timeout)
{
- struct timeval tv;
-#if HAVE_ALLOCA_H
- static int max_fd_size;
- int bytes;
- fd_set *rset, *wset, *xset;
-#else
- fd_set rset[1], wset[1], xset[1];
-#endif
- struct pollfd *f;
- int ready;
- int maxfd = 0;
+ struct timeval tv;
+ struct pollfd *f;
+ int ready;
+ int maxfd = 0;
#if HAVE_ALLOCA_H
- if (!max_fd_size)
- max_fd_size = getdtablesize ();
-
- bytes = howmany (max_fd_size, __NFDBITS);
-
- rset = alloca (bytes);
- wset = alloca (bytes);
- xset = alloca (bytes);
-
- /* We can't call FD_ZERO, since FD_ZERO only works with sets
- of exactly __FD_SETSIZE size. */
- memset (rset, 0, bytes);
- memset (wset, 0, bytes);
- memset (xset, 0, bytes);
+ static int max_fd_size;
+ int bytes;
+ fd_set *rset, *wset, *xset;
+
+ if (!max_fd_size)
+ max_fd_size = getdtablesize ();
+
+ bytes = FDSETSIZE (max_fd_size);
+
+ rset = alloca (bytes);
+ wset = alloca (bytes);
+ xset = alloca (bytes);
+
+ /* We can't call FD_ZERO, since FD_ZERO only works with sets
+ of exactly __FD_SETSIZE size. */
+ memset (rset, 0, bytes);
+ memset (wset, 0, bytes);
+ memset (xset, 0, bytes);
#else
- FD_ZERO(rset);
- FD_ZERO(wset);
- FD_ZERO(xset);
-#endif
+ fd_set rset[1], wset[1], xset[1];
+ FD_ZERO(rset);
+ FD_ZERO(wset);
+ FD_ZERO(xset);
+#endif
- for (f = fds; f < &fds[nfds]; ++f)
+ for (f = fds; f < &fds[nfds]; ++f)
{
- f->revents = 0;
- if (f->fd >= 0)
+ f->revents = 0;
+ if (f->fd >= 0)
{
#if HAVE_ALLOCA_H
- if (f->fd >= max_fd_size)
+ if (f->fd >= max_fd_size)
{
- /* The user provides a file descriptor number which is higher
- than the maximum we got from the `getdtablesize' call.
- Maybe this is ok so enlarge the arrays. */
- fd_set *nrset, *nwset, *nxset;
- int nbytes;
-
- max_fd_size = roundup (f->fd, __NFDBITS);
- nbytes = howmany (max_fd_size, __NFDBITS);
-
- nrset = alloca (nbytes);
- nwset = alloca (nbytes);
- nxset = alloca (nbytes);
-
- memset ((char *) nrset + bytes, 0, nbytes - bytes);
- memset ((char *) nwset + bytes, 0, nbytes - bytes);
- memset ((char *) nxset + bytes, 0, nbytes - bytes);
-
- rset = memcpy (nrset, rset, bytes);
- wset = memcpy (nwset, wset, bytes);
- xset = memcpy (nxset, xset, bytes);
+ /* The user provides a file descriptor number which is higher
+ than the maximum we got from the `getdtablesize' call.
+ Maybe this is ok so enlarge the arrays. */
+ fd_set *nrset, *nwset, *nxset;
+ int nbytes;
+
+ max_fd_size = roundup (f->fd, NFDBITS);
+ nbytes = FDSETSIZE (max_fd_size);
+
+ nrset = alloca (nbytes);
+ nwset = alloca (nbytes);
+ nxset = alloca (nbytes);
+
+ memset ((char *) nrset + bytes, 0, nbytes - bytes);
+ memset ((char *) nwset + bytes, 0, nbytes - bytes);
+ memset ((char *) nxset + bytes, 0, nbytes - bytes);
+
+ rset = memcpy (nrset, rset, bytes);
+ wset = memcpy (nwset, wset, bytes);
+ xset = memcpy (nxset, xset, bytes);
- bytes = nbytes;
+ bytes = nbytes;
}
#else
- if (f->fd >= FD_SETSIZE) {
- errno = EBADF;
- return -1;
- }
+ if (f->fd >= FD_SETSIZE) {
+ errno = EBADF;
+ return -1;
+ }
#endif /* HAVE_ALLOCA_H */
- if (f->events & POLLIN)
- FD_SET (f->fd, rset);
- if (f->events & POLLOUT)
- FD_SET (f->fd, wset);
- if (f->events & POLLPRI)
- FD_SET (f->fd, xset);
- if (f->fd > maxfd && (f->events & (POLLIN|POLLOUT|POLLPRI)))
- maxfd = f->fd;
+ if (f->events & POLLIN)
+ FD_SET (f->fd, rset);
+ if (f->events & POLLOUT)
+ FD_SET (f->fd, wset);
+ if (f->events & POLLPRI)
+ FD_SET (f->fd, xset);
+ if (f->fd > maxfd && (f->events & (POLLIN|POLLOUT|POLLPRI)))
+ maxfd = f->fd;
}
}
- tv.tv_sec = timeout / 1000;
- tv.tv_usec = (timeout % 1000) * 1000;
+ tv.tv_sec = timeout / 1000;
+ tv.tv_usec = (timeout % 1000) * 1000;
- while (1)
+ while (1)
{
- ready = select (maxfd + 1, rset, wset, xset,
- timeout == -1 ? NULL : &tv);
+ ready = select (maxfd + 1, rset, wset, xset,
+ timeout == -1 ? NULL : &tv);
- /* It might be that one or more of the file descriptors is invalid.
- We now try to find and mark them and then try again. */
- if (ready == -1 && errno == EBADF)
+ /* It might be that one or more of the file descriptors is invalid.
+ We now try to find and mark them and then try again. */
+ if (ready == -1 && errno == EBADF)
{
- struct timeval sngl_tv;
+ struct timeval sngl_tv;
#if HAVE_ALLOCA_H
- fd_set *sngl_rset = alloca (bytes);
- fd_set *sngl_wset = alloca (bytes);
- fd_set *sngl_xset = alloca (bytes);
-
- /* Clear the original set. */
- memset (rset, 0, bytes);
- memset (wset, 0, bytes);
- memset (xset, 0, bytes);
+ fd_set *sngl_rset = alloca (bytes);
+ fd_set *sngl_wset = alloca (bytes);
+ fd_set *sngl_xset = alloca (bytes);
+
+ /* Clear the original set. */
+ memset (rset, 0, bytes);
+ memset (wset, 0, bytes);
+ memset (xset, 0, bytes);
#else
- fd_set sngl_rset[1];
- fd_set sngl_wset[1];
- fd_set sngl_xset[1];
-
- FD_ZERO(rset);
- FD_ZERO(wset);
- FD_ZERO(xset);
+ fd_set sngl_rset[1];
+ fd_set sngl_wset[1];
+ fd_set sngl_xset[1];
+
+ FD_ZERO(rset);
+ FD_ZERO(wset);
+ FD_ZERO(xset);
#endif
- /* This means we don't wait for input. */
- sngl_tv.tv_sec = 0;
- sngl_tv.tv_usec = 0;
-
- maxfd = -1;
-
- /* Reset the return value. */
- ready = 0;
-
- for (f = fds; f < &fds[nfds]; ++f)
- if (f->fd != -1 && (f->events & (POLLIN|POLLOUT|POLLPRI))
- && (f->revents & POLLNVAL) == 0)
- {
- int n;
+ /* This means we don't wait for input. */
+ sngl_tv.tv_sec = 0;
+ sngl_tv.tv_usec = 0;
+
+ maxfd = -1;
+
+ /* Reset the return value. */
+ ready = 0;
+
+ for (f = fds; f < &fds[nfds]; ++f)
+ if (f->fd != -1 && (f->events & (POLLIN|POLLOUT|POLLPRI))
+ && (f->revents & POLLNVAL) == 0)
+ {
+ int n;
#if HAVE_ALLOCA_H
- memset (sngl_rset, 0, bytes);
- memset (sngl_wset, 0, bytes);
- memset (sngl_xset, 0, bytes);
+ memset (sngl_rset, 0, bytes);
+ memset (sngl_wset, 0, bytes);
+ memset (sngl_xset, 0, bytes);
#else
- FD_ZERO(rset);
- FD_ZERO(wset);
- FD_ZERO(xset);
+ FD_ZERO(rset);
+ FD_ZERO(wset);
+ FD_ZERO(xset);
#endif
+ if (f->events & POLLIN)
+ FD_SET (f->fd, sngl_rset);
+ if (f->events & POLLOUT)
+ FD_SET (f->fd, sngl_wset);
+ if (f->events & POLLPRI)
+ FD_SET (f->fd, sngl_xset);
+
+ n = select (f->fd + 1, sngl_rset, sngl_wset, sngl_xset,
+ &sngl_tv);
+ if (n != -1)
+ {
+ /* This descriptor is ok. */
if (f->events & POLLIN)
- FD_SET (f->fd, sngl_rset);
+ FD_SET (f->fd, rset);
if (f->events & POLLOUT)
- FD_SET (f->fd, sngl_wset);
+ FD_SET (f->fd, wset);
if (f->events & POLLPRI)
- FD_SET (f->fd, sngl_xset);
-
- n = select (f->fd + 1, sngl_rset, sngl_wset, sngl_xset,
- &sngl_tv);
- if (n != -1)
- {
- /* This descriptor is ok. */
- if (f->events & POLLIN)
- FD_SET (f->fd, rset);
- if (f->events & POLLOUT)
- FD_SET (f->fd, wset);
- if (f->events & POLLPRI)
- FD_SET (f->fd, xset);
- if (f->fd > maxfd)
- maxfd = f->fd;
- if (n > 0)
- /* Count it as being available. */
- ++ready;
- }
- else if (errno == EBADF)
- f->revents |= POLLNVAL;
- }
- /* Try again. */
- continue;
+ FD_SET (f->fd, xset);
+ if (f->fd > maxfd)
+ maxfd = f->fd;
+ if (n > 0)
+ /* Count it as being available. */
+ ++ready;
+ }
+ else if (errno == EBADF)
+ f->revents |= POLLNVAL;
+ }
+ /* Try again. */
+ continue;
}
- break;
+ break;
}
- if (ready > 0)
- for (f = fds; f < &fds[nfds]; ++f)
- {
- if (f->fd >= 0)
- {
- if (FD_ISSET (f->fd, rset))
- f->revents |= POLLIN;
- if (FD_ISSET (f->fd, wset))
- f->revents |= POLLOUT;
- if (FD_ISSET (f->fd, xset))
- f->revents |= POLLPRI;
- }
- }
+ if (ready > 0)
+ for (f = fds; f < &fds[nfds]; ++f)
+ {
+ if (f->fd >= 0)
+ {
+ if (FD_ISSET (f->fd, rset))
+ f->revents |= POLLIN;
+ if (FD_ISSET (f->fd, wset))
+ f->revents |= POLLOUT;
+ if (FD_ISSET (f->fd, xset))
+ f->revents |= POLLPRI;
+ }
+ }
- return ready;
+ return ready;
}
#endif
-#endif
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/run_test_su
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/run_test_su (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/run_test_su Fri Feb 9 12:32:17 2007
@@ -2,18 +2,33 @@
rc=0
+run=no
+
+for SU_PORT in select epoll poll ; do
+
+export SU_PORT
+
+grep -q -i '^#define have_'$SU_PORT ../../config.h ||
+continue
+
+run=yes
+
if $VALGRIND ./test_su ; then
- echo PASS: multithread test_su
+ echo PASS: multithread test_su with $SU_PORT
else
- echo FAIL: multithread test_su failed
+ echo FAIL: multithread test_su with $SU_PORT failed
rc=1
fi
if $VALGRIND ./test_su -s ; then
- echo PASS: singlethread test_su
+ echo PASS: singlethread test_su with $SU_PORT
else
- echo FAIL: singlethread test_su failed
+ echo FAIL: singlethread test_su with $SU_PORT failed
rc=1
fi
+done
+
+test $run = no && exit 77
+
exit $rc
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_wait.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_wait.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_wait.h Fri Feb 9 12:32:17 2007
@@ -512,6 +512,31 @@
SOFIAPUBFUN int su_clone_pause(su_clone_r);
SOFIAPUBFUN int su_clone_resume(su_clone_r);
+/* ---------------------------------------------------------------------- */
+/* Different su_root_t implementations */
+
+typedef su_port_t *su_port_create_f(void);
+typedef int su_clone_start_f(su_root_t *parent,
+ su_clone_r return_clone,
+ su_root_magic_t *magic,
+ su_root_init_f init,
+ su_root_deinit_f deinit);
+
+SOFIAPUBFUN void su_port_prefer(su_port_create_f *f, su_clone_start_f *);
+
+SOFIAPUBFUN su_port_create_f su_default_port_create;
+SOFIAPUBFUN su_port_create_f su_epoll_port_create;
+SOFIAPUBFUN su_port_create_f su_poll_port_create;
+SOFIAPUBFUN su_port_create_f su_wsaevent_port_create;
+SOFIAPUBFUN su_port_create_f su_select_port_create;
+
+SOFIAPUBFUN su_clone_start_f su_default_clone_start;
+SOFIAPUBFUN su_clone_start_f su_epoll_clone_start;
+SOFIAPUBFUN su_clone_start_f su_poll_clone_start;
+SOFIAPUBFUN su_clone_start_f su_wsaevent_clone_start;
+SOFIAPUBFUN su_clone_start_f su_select_clone_start;
+
+
SOFIA_END_DECLS
#endif /* SU_WAIT_H */
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_epoll_port.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_epoll_port.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_epoll_port.c Fri Feb 9 12:32:17 2007
@@ -1,7 +1,7 @@
/*
* This file is part of the Sofia-SIP package
*
- * Copyright (C) 2005 Nokia Corporation.
+ * Copyright (C) 2005, 2006, 2007 Nokia Corporation.
*
* Contact: Pekka Pessi <pekka.pessi(a)nokia.com>
*
@@ -23,18 +23,28 @@
*/
/**@ingroup su_wait
- * @CFILE su_poll_port.c
+ * @CFILE su_epoll_port.c
*
- * Port implementation using poll()
+ * Port implementation using epoll(7)
*
* @author Pekka Pessi <Pekka.Pessi(a)nokia.com>
* @author Kai Vehmanen <kai.vehmanen(a)nokia.com>
*
- * @date Created: Tue Sep 14 15:51:04 1999 ppessi
+ * @date Created: Fri Jan 26 20:44:14 2007 ppessi
+ * @date Original: Tue Sep 14 15:51:04 1999 ppessi
*/
#include "config.h"
+#define su_port_s su_epoll_port_s
+
+#include "su_port.h"
+
+#if HAVE_EPOLL
+
+#include "sofia-sip/su.h"
+#include "sofia-sip/su_alloc.h"
+
#include <stdlib.h>
#include <assert.h>
#include <stdarg.h>
@@ -43,14 +53,6 @@
#include <limits.h>
#include <errno.h>
-#define su_port_s su_poll_port_s
-
-#include "sofia-sip/su.h"
-#include "su_port.h"
-#include "sofia-sip/su_alloc.h"
-
-#if HAVE_EPOLL
-
#include <sys/epoll.h>
#define POLL2EPOLL_NEEDED \
@@ -62,8 +64,8 @@
/** Port based on epoll(). */
-struct su_poll_port_s {
- su_pthread_port_t sup_base[1];
+struct su_epoll_port_s {
+ su_socket_port_t sup_base[1];
/** epoll fd */
int sup_epoll;
@@ -88,7 +90,9 @@
} **sup_indices;
};
-static void su_epoll_port_decref(su_port_t *self, int blocking, char const *who);
+static void su_epoll_port_decref(su_port_t *self,
+ int blocking,
+ char const *who);
static int su_epoll_port_register(su_port_t *self,
su_root_t *root,
su_wait_t *wait,
@@ -118,7 +122,7 @@
su_base_port_incref,
su_epoll_port_decref,
su_base_port_gsource,
- su_pthread_port_send,
+ su_socket_port_send,
su_epoll_port_register,
su_epoll_port_unregister,
su_epoll_port_deregister,
@@ -159,7 +163,7 @@
SU_DEBUG_9(("%s(%p) called\n", "su_epoll_port_deinit", (void* )self));
- su_pthread_port_deinit(self);
+ su_socket_port_deinit(self->sup_base);
close(self->sup_epoll), self->sup_epoll = -1;
}
@@ -434,9 +438,9 @@
ev.data.u64 = (uint64_t)0;
ev.data.u32 = (uint32_t)index;
- if (epoll_ctl(self->sup_epoll, EPOLL_CTL_MOD, ser->ser_wait->fd, &ev) == -1) {
+ if (epoll_ctl(self->sup_epoll, EPOLL_CTL_MOD, socket, &ev) == -1) {
SU_DEBUG_1(("su_port(%p): EPOLL_CTL_MOD(%u): %s\n", (void *)self,
- ser->ser_wait->fd, su_strerror(su_errno())));
+ socket, su_strerror(su_errno())));
return -1;
}
@@ -449,7 +453,7 @@
* multishot mode determines how the events are scheduled by port. If
* multishot mode is enabled, port serves all the sockets that have received
* network events. If it is disabled, only first socket event is served.
-p *
+ *
* @param self pointer to port object
* @param multishot multishot mode (0 => disables, 1 => enables, -1 => query)
*
@@ -547,7 +551,7 @@
self->sup_epoll = epoll;
self->sup_multishot = SU_ENABLE_MULTISHOT_POLL;
- if (su_pthread_port_init(self, su_epoll_port_vtable) < 0)
+ if (su_socket_port_init(self->sup_base, su_epoll_port_vtable) < 0)
return su_home_unref(su_port_home(self)), NULL;
return self;
@@ -562,22 +566,21 @@
return su_pthreaded_port_start(su_epoll_port_create,
parent, return_clone, magic, init, deinit);
}
+
#else
su_port_t *su_epoll_port_create(void)
{
- return su_poll_port_create();
+ return su_default_port_create();
}
int su_epoll_clone_start(su_root_t *parent,
- su_clone_r return_clone,
- su_root_magic_t *magic,
- su_root_init_f init,
- su_root_deinit_f deinit)
+ su_clone_r return_clone,
+ su_root_magic_t *magic,
+ su_root_init_f init,
+ su_root_deinit_f deinit)
{
- return su_pthreaded_port_start(su_poll_port_create,
- parent, return_clone, magic, init, deinit);
+ return su_default_clone_start(parent, return_clone, magic, init, deinit);
}
#endif /* HAVE_EPOLL */
-
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_localinfo.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_localinfo.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_localinfo.c Fri Feb 9 12:32:17 2007
@@ -1199,7 +1199,7 @@
int win_localinfo(su_localinfo_t const hints[1], su_localinfo_t **rresult)
{
/* This is Windows XP code, for both IPv6 and IPv4. */
- size_t iaa_size = 2048;
+ ULONG iaa_size = 2048;
IP_ADAPTER_ADDRESSES *iaa0, *iaa;
int error, loopback_seen = 0;
int v4_mapped = (hints->li_flags & LI_V4MAPPED) != 0;
@@ -1208,7 +1208,7 @@
int flags = GAA_FLAG_SKIP_MULTICAST;
*rresult = NULL; next = rresult;
- iaa0 = malloc(iaa_size);
+ iaa0 = malloc((size_t)iaa_size);
if (!iaa0) {
SU_DEBUG_1(("su_localinfo: memory exhausted\n"));
error = ELI_MEMORY;
@@ -1229,7 +1229,7 @@
IP_ADAPTER_UNICAST_ADDRESS *ua;
IP_ADAPTER_UNICAST_ADDRESS lua[1];
int if_index = iaa->IfIndex;
- int ifnamelen = 0;
+ size_t ifnamelen = 0;
char ifname[16];
for (ua = iaa->FirstUnicastAddress; ;ua = ua->Next) {
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_osx_runloop.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_osx_runloop.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_osx_runloop.c Fri Feb 9 12:32:17 2007
@@ -31,7 +31,7 @@
* poll/select/WaitForMultipleObjects and message passing functionality.
*
* @author Pekka Pessi <Pekka.Pessi(a)nokia.com>
- * @author Kai Vehmanen <kai.vehmanen(a)nokia.com>
+ * @author Martti Mela <martti.mela(a)nokia.com>
*
* @date Created: Tue Sep 14 15:51:04 1999 ppessi
*/
@@ -46,9 +46,8 @@
#include <limits.h>
#include <errno.h>
-#define SU_PORT_IMPLEMENTATION 1
+#define su_port_s su_osx_port_s
-#include "sofia-sip/su.h"
#include "su_port.h"
#include "sofia-sip/su_osx_runloop.h"
#include "sofia-sip/su_alloc.h"
@@ -62,163 +61,121 @@
#define enter (void)0
#endif
-
-#if SU_HAVE_PTHREADS
-/* Pthread implementation */
-#include <pthread.h>
-#define SU_HAVE_MBOX 1
-#else
-#define SU_HAVE_MBOX 0
-#endif
-
-#if HAVE_SOCKETPAIR
-#define MBOX_SEND 1
-#else
-#define MBOX_SEND 0
-#endif
-
static su_port_t *su_osx_runloop_create(void) __attribute__((__malloc__));
/* Callback for CFObserver and CFSocket */
-static
-void cf_observer_cb(CFRunLoopObserverRef observer,
- CFRunLoopActivity activity,
- void *info);
-static void su_port_osx_socket_cb(CFSocketRef s,
+static void cf_observer_cb(CFRunLoopObserverRef observer,
+ CFRunLoopActivity activity,
+ void *info);
+
+static void su_osx_port_socket_cb(CFSocketRef s,
CFSocketCallBackType callbackType,
CFDataRef address,
const void *data,
void *info);
-static CFSocketCallBackType map_poll_event_to_cf_event(int events);
-static void su_port_osx_lock(su_port_t *self, char const *who);
-static void su_port_osx_unlock(su_port_t *self, char const *who);
-static void su_port_osx_incref(su_port_t *self, char const *who);
-static void su_port_osx_decref(su_port_t *self, int blocking, char const *who);
+static void su_osx_port_deinit(void *arg);
+
+static void su_osx_port_decref(su_port_t *self, int blocking, char const *who)
+{
+ (void)su_base_port_decref(self, blocking, who);
+}
+
+
+static CFSocketCallBackType map_poll_event_to_cf_event(int events);
-static int su_port_osx_send(su_port_t *self, su_msg_r rmsg);
+static int su_osx_port_send(su_port_t *self, su_msg_r rmsg);
-static int su_port_osx_register(su_port_t *self,
+static int su_osx_port_register(su_port_t *self,
su_root_t *root,
su_wait_t *wait,
su_wakeup_f callback,
su_wakeup_arg_t *arg,
int priority);
-static int su_port_osx_unregister(su_port_t *port,
+static int su_osx_port_unregister(su_port_t *port,
su_root_t *root,
su_wait_t *wait,
su_wakeup_f callback,
su_wakeup_arg_t *arg);
-static int su_port_osx_deregister(su_port_t *self, int i);
+static int su_osx_port_deregister(su_port_t *self, int i);
-static int su_port_osx_unregister_all(su_port_t *self,
+static int su_osx_port_unregister_all(su_port_t *self,
su_root_t *root);
-static int su_port_osx_getmsgs(su_port_t *self);
-static
-int su_port_osx_eventmask(su_port_t *self, int index, int socket, int events);
-static
-void su_port_osx_run(su_port_t *self);
-static
-void su_port_osx_break(su_port_t *self);
-static
-su_duration_t su_port_osx_step(su_port_t *self, su_duration_t tout);
+static int su_osx_port_eventmask(su_port_t *, int , int, int );
+static void su_osx_port_run(su_port_t *self);
+static void su_osx_port_break(su_port_t *self);
+static su_duration_t su_osx_port_step(su_port_t *self, su_duration_t tout);
-#if 0
-unsigned su_port_query(su_port_t *, su_wait_t *, unsigned n_waits);
-void su_port_event(su_port_t *, su_wait_t *waitobj);
-#endif
+static int su_osx_port_multishot(su_port_t *port, int multishot);
-static
-int su_port_osx_own_thread(su_port_t const *port);
+static int su_osx_port_wait_events(su_port_t *self, su_duration_t tout);
-static
-int su_port_osx_add_prepoll(su_port_t *port,
- su_root_t *root,
- su_prepoll_f *,
- su_prepoll_magic_t *);
-
-static
-int su_port_osx_remove_prepoll(su_port_t *port,
- su_root_t *root);
-
-static
-su_timer_t **su_port_osx_timers(su_port_t *port);
-
-static
-int su_port_osx_multishot(su_port_t *port, int multishot);
-
-static
-int su_port_osx_threadsafe(su_port_t *port);
-
-static
-int su_port_osx_yield(su_port_t *port);
+static char const *su_osx_port_name(su_port_t const *self)
+{
+ return "CFRunLoop";
+}
-su_port_vtable_t const su_port_osx_vtable[1] =
+su_port_vtable_t const su_osx_port_vtable[1] =
{{
- /* su_vtable_size: */ sizeof su_port_osx_vtable,
- su_port_osx_lock,
- su_port_osx_unlock,
- su_port_osx_incref,
- su_port_osx_decref,
- NULL /* su_port_osx_runloop */, /* XXX - was: gsource, */
- su_port_osx_send,
- su_port_osx_register,
- su_port_osx_unregister,
- su_port_osx_deregister,
- su_port_osx_unregister_all,
- su_port_osx_eventmask,
- su_port_osx_run,
- su_port_osx_break,
- su_port_osx_step,
- su_port_osx_own_thread,
- su_port_osx_add_prepoll,
- su_port_osx_remove_prepoll,
- su_port_osx_timers,
- su_port_osx_multishot,
- su_port_osx_threadsafe,
- su_port_osx_yield
+ /* su_vtable_size: */ sizeof su_osx_port_vtable,
+ su_pthread_port_lock,
+ su_pthread_port_unlock,
+ su_base_port_incref,
+ su_osx_port_decref,
+ su_base_port_gsource,
+ su_osx_port_send,
+ su_osx_port_register,
+ su_osx_port_unregister,
+ su_osx_port_deregister,
+ su_osx_port_unregister_all,
+ su_osx_port_eventmask,
+ su_osx_port_run,
+ su_osx_port_break,
+ su_osx_port_step,
+ su_pthread_port_own_thread,
+ su_base_port_add_prepoll,
+ su_base_port_remove_prepoll,
+ su_base_port_timers,
+ su_osx_port_multishot,
+ su_base_port_threadsafe,
+ su_base_port_yield,
+ su_osx_port_wait_events,
+ su_base_port_getmsgs,
+ su_base_port_getmsgs_from,
+ su_osx_port_name,
+ su_base_port_start_shared,
+ su_pthread_port_wait,
+ su_pthread_port_execute,
}};
-static int su_port_osx_wait_events(su_port_t *self, su_duration_t tout);
-
-
-/* *
+/*
* Port is a per-thread reactor.
*
* Multiple root objects executed by single thread share a su_port_t object.
*/
-struct su_port_s {
- su_home_t sup_home[1];
-
- su_port_vtable_t const *sup_vtable;
-
- unsigned sup_running;
- unsigned sup_source_fired;
+struct su_osx_port_s {
+ su_socket_port_t sup_socket[1];
+#define sup_pthread sup_socket->sup_base
+#define sup_base sup_socket->sup_base->sup_base
+#define sup_home sup_socket->sup_base->sup_base->sup_home
-#if SU_HAVE_PTHREADS
- pthread_t sup_tid;
- pthread_mutex_t sup_mutex[1];
-#if __CYGWIN__
- pthread_mutex_t sup_reflock[1];
- int sup_ref;
-#else
- pthread_rwlock_t sup_ref[1];
-#endif
-#else
- int sup_ref;
-#endif
-
-#if SU_HAVE_MBOX
- su_socket_t sup_mbox[MBOX_SEND + 1];
- su_wait_t sup_mbox_wait;
-#endif
+ unsigned sup_source_fired;
CFRunLoopRef sup_main_loop;
CFRunLoopSourceRef *sup_sources;
CFSocketRef *sup_sockets;
+
+ CFRunLoopObserverRef sup_observer;
+ CFRunLoopObserverContext sup_observer_cntx[1];
+ /* Struct for CFSocket callbacks; contains current CFSource index */
+ struct osx_magic {
+ su_port_t *o_port;
+ int o_current;
+ int o_count;
+ } osx_magic[1];
unsigned sup_multishot; /**< Multishot operation? */
@@ -248,147 +205,10 @@
su_root_t **sup_wait_roots;
su_wait_t *sup_waits;
-
- /* Pre-poll callback */
- su_prepoll_f *sup_prepoll;
- su_prepoll_magic_t *sup_pp_magic;
- su_root_t *sup_pp_root;
-
- /* Timer list */
- su_timer_t *sup_timers;
-
- /* Message list - this is protected by lock */
- su_msg_t *sup_head;
- su_msg_t **sup_tail;
-
-#if 0
- int sup_free_index; /**< Number of first free index */
- int *sup_indices; /** Indices to registrations */
-
- int *sup_reverses; /** Reverse index */
- su_wakeup_f *sup_wait_cbs;
- su_wakeup_arg_t**sup_wait_args;
- su_root_t **sup_wait_roots;
-
- su_wait_t *sup_waits;
-
- /* Pre-poll callback */
- su_prepoll_f *sup_prepoll;
- su_prepoll_magic_t *sup_pp_magic;
- su_root_t *sup_pp_root;
-
- /* Timer list */
- su_timer_t *sup_timers;
-
- /* Message list - this is protected by lock */
- su_msg_t *sup_head;
- su_msg_t **sup_tail;
-#endif
};
-/* Struct for CFSocket callbacks; contains current CFSource index */
-typedef struct {
- su_port_t *o_port;
- int o_current;
- int o_count;
-} osx_magic_t;
-
-
-#if SU_HAVE_PTHREADS
-#define SU_PORT_OSX_OWN_THREAD(p) (pthread_equal((p)->sup_tid, pthread_self()))
-
-#if __CYGWIN__
-
-/* Debugging versions */
-#define SU_PORT_OSX_INITREF(p) (pthread_mutex_init((p)->sup_reflock, NULL), printf("initref(%p)\n", (p)))
-#define SU_PORT_OSX_INCREF(p, f) (pthread_mutex_lock(p->sup_reflock), p->sup_ref++, pthread_mutex_unlock(p->sup_reflock), printf("incref(%p) by %s\n", (p), f))
-#define SU_PORT_OSX_DECREF(p, f) do { \
- pthread_mutex_lock(p->sup_reflock); p->sup_ref--; pthread_mutex_unlock(p->sup_reflock); \
- if ((p->sup_ref) == 0) { \
- printf("decref(%p) to 0 by %s\n", (p), f); su_port_osx_destroy(p); } \
- else { printf("decref(%p) to %u by %s\n", (p), p->sup_ref, f); } } while(0)
-
-#define SU_PORT_OSX_ZAPREF(p, f) do { printf("zapref(%p) by %s\n", (p), f), \
- pthread_mutex_lock(p->sup_reflock); p->sup_ref--; pthread_mutex_unlock(p->sup_reflock); \
- if ((p->sup_ref) != 0) { \
- assert(!"SU_PORT_OSX_ZAPREF"); } \
- su_port_osx_destroy(p); } while(0)
-
-#define SU_PORT_OSX_INITLOCK(p) \
- (pthread_mutex_init((p)->sup_mutex, NULL), printf("init_lock(%p)\n", p))
-
-#define SU_PORT_OSX_LOCK(p, f) \
- (printf("%ld at %s locking(%p)...", pthread_self(), f, p), pthread_mutex_lock((p)->sup_mutex), printf(" ...%ld at %s locked(%p)...", pthread_self(), f, p))
-
-#define SU_PORT_OSX_UNLOCK(p, f) \
- (pthread_mutex_unlock((p)->sup_mutex), printf(" ...%ld at %s unlocked(%p)\n", pthread_self(), f, p))
-
-#elif 1
-#define SU_PORT_OSX_INITREF(p) (pthread_rwlock_init(p->sup_ref, NULL))
-#define SU_PORT_OSX_INCREF(p, f) (pthread_rwlock_rdlock(p->sup_ref))
-#define SU_PORT_OSX_DECREF(p, f) do { pthread_rwlock_unlock(p->sup_ref); \
- if (pthread_rwlock_trywrlock(p->sup_ref) == 0) su_port_osx_destroy(p); } while(0)
-
-#define SU_PORT_OSX_ZAPREF(p, f) do { pthread_rwlock_unlock(p->sup_ref); \
- if (pthread_rwlock_trywrlock(p->sup_ref) != 0) { \
- assert(!"SU_PORT_OSX_ZAPREF"); pthread_rwlock_wrlock(p->sup_ref); } \
- su_port_osx_destroy(p); } while(0)
-
-#define SU_PORT_OSX_INITLOCK(p) (pthread_mutex_init((p)->sup_mutex, NULL))
-#define SU_PORT_OSX_LOCK(p, f) (pthread_mutex_lock((p)->sup_mutex))
-#define SU_PORT_OSX_UNLOCK(p, f) (pthread_mutex_unlock((p)->sup_mutex))
-
-#else
-
-/* Debugging versions */
-#define SU_PORT_OSX_INITREF(p) (pthread_rwlock_init((p)->sup_ref, NULL), printf("initref(%p)\n", (p)))
-#define SU_PORT_OSX_INCREF(p, f) (pthread_rwlock_rdlock(p->sup_ref), printf("incref(%p) by %s\n", (p), f))
-#define SU_PORT_OSX_DECREF(p, f) do { \
- pthread_rwlock_unlock(p->sup_ref); \
- if (pthread_rwlock_trywrlock(p->sup_ref) == 0) { \
- printf("decref(%p) to 0 by %s\n", (p), f); su_port_osx_destroy(p); } \
- else { printf("decref(%p) by %s\n", (p), f); } } while(0)
-
-#define SU_PORT_OSX_ZAPREF(p, f) do { printf("zapref(%p) by %s\n", (p), f), \
- pthread_rwlock_unlock(p->sup_ref); \
- if (pthread_rwlock_trywrlock(p->sup_ref) != 0) { \
- assert(!"SU_PORT_OSX_ZAPREF"); pthread_rwlock_wrlock(p->sup_ref); } \
- su_port_osx_destroy(p); } while(0)
-
-#define SU_PORT_OSX_INITLOCK(p) \
- (pthread_mutex_init((p)->sup_mutex, NULL), printf("init_lock(%p)\n", p))
-
-#define SU_PORT_OSX_LOCK(p, f) \
- (printf("%ld at %s locking(%p)...", pthread_self(), f, p), pthread_mutex_lock((p)->sup_mutex), printf(" ...%ld at %s locked(%p)...", pthread_self(), f, p))
-
-#define SU_PORT_OSX_UNLOCK(p, f) \
- (pthread_mutex_unlock((p)->sup_mutex), printf(" ...%ld at %s unlocked(%p)\n", pthread_self(), f, p))
-
-#endif
-
-#else /* !SU_HAVE_PTHREADS */
-
-#define SU_PORT_OSX_OWN_THREAD(p) 1
-#define SU_PORT_OSX_INITLOCK(p) (void)(p)
-#define SU_PORT_OSX_LOCK(p, f) (void)(p)
-#define SU_PORT_OSX_UNLOCK(p, f) (void)(p)
-#define SU_PORT_OSX_ZAPREF(p, f) ((p)->sup_ref--)
-
-#define SU_PORT_OSX_INITREF(p) ((p)->sup_ref = 1)
-#define SU_PORT_OSX_INCREF(p, f) ((p)->sup_ref++)
-#define SU_PORT_OSX_DECREF(p, f) \
-do { if (--((p)->sup_ref) == 0) su_port_osx_destroy(p); } while (0);
-
-#endif
-
-#if SU_HAVE_MBOX
-static int su_port_osx_wakeup(su_root_magic_t *magic,
- su_wait_t *w,
- su_wakeup_arg_t *arg);
-#endif
-
-static void su_port_osx_destroy(su_port_t *self);
+/* XXX - mela static void su_osx_port_destroy(su_port_t *self); */
/** Create a reactor object.
*
@@ -405,7 +225,6 @@
return su_root_create_with_port(magic, su_osx_runloop_create());
}
-
void osx_enabler_cb(CFSocketRef s,
CFSocketCallBackType type,
CFDataRef address,
@@ -413,35 +232,32 @@
void *info)
{
CFRunLoopRef rl;
- osx_magic_t *magic = (osx_magic_t *) info;
+ struct osx_magic *magic = (struct osx_magic *) info;
su_port_t *self = magic->o_port;
su_duration_t tout = 0;
su_time_t now = su_now();
rl = CFRunLoopGetCurrent();
- if (self->sup_running) {
+ if (self->sup_base->sup_running) {
- if (self->sup_prepoll)
- self->sup_prepoll(self->sup_pp_magic, self->sup_pp_root);
+ if (self->sup_base->sup_prepoll)
+ self->sup_base->sup_prepoll(self->sup_base->sup_pp_magic, self->sup_base->sup_pp_root);
- if (self->sup_head)
- su_port_osx_getmsgs(self);
+ if (self->sup_base->sup_head)
+ su_base_port_getmsgs(self);
- if (self->sup_timers)
- su_timer_expire(&self->sup_timers, &tout, now);
+ if (self->sup_base->sup_timers)
+ su_timer_expire(&self->sup_base->sup_timers, &tout, now);
}
CFRunLoopWakeUp(rl);
-
}
/**@internal
*
- * Allocates and initializes a message port. It creates a mailbox used to.
- * wake up the tasks waiting on the port if needed. Currently, the
- * mailbox is simply an UDP socket connected to itself.
+ * Allocates and initializes a message port.
*
* @return
* If successful a pointer to the new message port is returned, otherwise
@@ -449,142 +265,59 @@
*/
su_port_t *su_osx_runloop_create(void)
{
- su_port_t *self;
-
- SU_DEBUG_9(("su_osx_runloop_create() called\n"));
-
- self = su_home_clone(NULL, sizeof(*self));
+ su_port_t *self = su_home_new(sizeof *self);
- if (self) {
-#if SU_HAVE_MBOX
- int af;
- su_socket_t mb = INVALID_SOCKET;
- char const *why;
-#endif
- CFRunLoopObserverRef cf_observer;
- osx_magic_t *osx_magic = NULL;
- CFRunLoopObserverContext cf_observer_cntx[1] = {{0, NULL, NULL,
- NULL, NULL}};
-
- self->sup_vtable = su_port_osx_vtable;
-
- SU_PORT_OSX_INITREF(self);
- SU_PORT_OSX_INITLOCK(self);
- self->sup_tail = &self->sup_head;
-
- self->sup_multishot = 0; /* XXX (SU_ENABLE_MULTISHOT_POLL) != 0; */
-
-#if SU_HAVE_PTHREADS
- self->sup_tid = pthread_self();
-#endif
-
-#if SU_HAVE_MBOX
-#if HAVE_SOCKETPAIR
-#if defined(AF_LOCAL)
- af = AF_LOCAL;
-#else
- af = AF_UNIX;
-#endif
- if (socketpair(af, SOCK_STREAM, 0, self->sup_mbox) == -1) {
- why = "su_port_osx_init: socketpair"; goto error;
- }
-
- mb = self->sup_mbox[0];
- su_setblocking(self->sup_mbox[0], 0);
- su_setblocking(self->sup_mbox[1], 0);
-#else
- {
- struct sockaddr_in sin = { sizeof(struct sockaddr_in), 0 };
- socklen_t sinsize = sizeof sin;
- struct sockaddr *sa = (struct sockaddr *)&sin;
-
- af = PF_INET;
-
- self->sup_mbox[0] = mb = su_socket(af, SOCK_DGRAM, IPPROTO_UDP);
- if (mb == INVALID_SOCKET) {
- why = "su_port_osx_init: socket"; goto error;
- }
-
- sin.sin_family = AF_INET;
- sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK); /* 127.1 */
-
- /* Get a port for us */
- if (bind(mb, sa, sizeof sin) == -1) {
- why = "su_port_osx_init: bind"; goto error;
- }
+ if (!self)
+ return self;
- if (getsockname(mb, sa, &sinsize) == -1) {
- why = "su_port_osx_init: getsockname"; goto error;
- }
-
- if (connect(mb, sa, sinsize) == -1) {
- why = "su_port_osx_init: connect"; goto error;
- }
- }
-#endif
+ enter;
- if (su_wait_create(&self->sup_mbox_wait, mb, SU_WAIT_IN) == -1) {
- why = "su_port_osx_init: su_wait_create"; goto error;
- }
+ if (su_home_destructor(su_port_home(self), su_osx_port_deinit) < 0)
+ return su_home_unref(su_port_home(self)), NULL;
- if (su_port_osx_register(self, NULL, &self->sup_mbox_wait,
- su_port_osx_wakeup,
- (su_wakeup_arg_t *)self->sup_mbox, 0)
- == -1) {
- why = "su_port_osx_create: su_port_osx_register"; goto error;
- }
+ self->sup_multishot = SU_ENABLE_MULTISHOT_POLL;
- osx_magic = calloc(1, sizeof(*osx_magic));
- osx_magic->o_port = self;
- cf_observer_cntx->info = osx_magic;
-
- cf_observer =
- CFRunLoopObserverCreate(NULL, kCFRunLoopAfterWaiting | kCFRunLoopBeforeWaiting,
- TRUE, 0, cf_observer_cb, cf_observer_cntx);
+ if (su_socket_port_init(self->sup_base, su_osx_port_vtable) == 0) {
+ self->osx_magic->o_port = self;
+ self->sup_observer_cntx->info = self->osx_magic;
+ self->sup_observer =
+ CFRunLoopObserverCreate(NULL,
+ kCFRunLoopAfterWaiting | kCFRunLoopBeforeWaiting,
+ TRUE, 0, cf_observer_cb, self->sup_observer_cntx);
CFRunLoopAddObserver(CFRunLoopGetCurrent(),
- cf_observer,
+ self->sup_observer,
kCFRunLoopDefaultMode);
-
- SU_DEBUG_9(("su_port_osx_create() returns %p\n", self));
-
- return self;
-
- error:
- su_perror(why);
- su_port_osx_destroy(self), self = NULL;
-#endif
}
-
- SU_DEBUG_9(("su_port_osx_create() returns %p\n", self));
-
+ else
+ return su_home_unref(su_port_home(self)), NULL;
+
return self;
}
-
static
void cf_observer_cb(CFRunLoopObserverRef observer,
CFRunLoopActivity activity,
void *info)
{
CFRunLoopRef rl;
- osx_magic_t *magic = (osx_magic_t *) info;
+ struct osx_magic *magic = (struct osx_magic *) info;
su_port_t *self = magic->o_port;
su_duration_t tout = 0;
su_time_t now = su_now();
rl = CFRunLoopGetCurrent();
- if (self->sup_running) {
+ if (self->sup_base->sup_running) {
- if (self->sup_prepoll)
- self->sup_prepoll(self->sup_pp_magic, self->sup_pp_root);
+ if (self->sup_base->sup_prepoll)
+ self->sup_base->sup_prepoll(self->sup_base->sup_pp_magic, self->sup_base->sup_pp_root);
- if (self->sup_head)
- su_port_osx_getmsgs(self);
+ if (self->sup_base->sup_head)
+ su_port_getmsgs(self);
- if (self->sup_timers)
- su_timer_expire(&self->sup_timers, &tout, now);
+ if (self->sup_base->sup_timers)
+ su_timer_expire(&self->sup_base->sup_timers, &tout, now);
} else
SU_DEBUG_9(("cf_observer_cb(): PORT IS NOT RUNNING!\n"));
@@ -594,70 +327,13 @@
}
/** @internal Destroy a port. */
-void su_port_osx_destroy(su_port_t *self)
-{
- assert(self);
-
- SU_DEBUG_9(("su_port_osx_destroy() called\n"));
-
-#if SU_HAVE_MBOX
- if (self->sup_mbox[0] != INVALID_SOCKET) {
- su_port_osx_unregister(self, NULL, &self->sup_mbox_wait, NULL,
- (su_wakeup_arg_t *)self->sup_mbox);
- su_wait_destroy(&self->sup_mbox_wait);
- su_close(self->sup_mbox[0]); self->sup_mbox[0] = INVALID_SOCKET;
-#if HAVE_SOCKETPAIR
- su_close(self->sup_mbox[1]); self->sup_mbox[1] = INVALID_SOCKET;
-#endif
- SU_DEBUG_9(("su_port_osx_destroy() close mailbox\n"));
- }
-#endif
- if (self->sup_sources)
- free(self->sup_sources), self->sup_sources = NULL;
- if (self->sup_sockets)
- free(self->sup_sockets), self->sup_sockets = NULL;
- if (self->sup_waits)
- free(self->sup_waits), self->sup_waits = NULL;
- if (self->sup_wait_cbs)
- free(self->sup_wait_cbs), self->sup_wait_cbs = NULL;
- if (self->sup_wait_args)
- free(self->sup_wait_args), self->sup_wait_args = NULL;
- if (self->sup_wait_roots)
- free(self->sup_wait_roots), self->sup_wait_roots = NULL;
- if (self->sup_reverses)
- free(self->sup_reverses), self->sup_reverses = NULL;
- if (self->sup_indices)
- free(self->sup_indices), self->sup_indices = NULL;
-
- SU_DEBUG_9(("su_port_osx_destroy() freed registrations\n"));
-
- su_home_zap(self->sup_home);
-
- SU_DEBUG_9(("su_port_osx_destroy() returns\n"));
-
-}
-
-static void su_port_osx_lock(su_port_t *self, char const *who)
+static void su_osx_port_deinit(void *arg)
{
- SU_PORT_OSX_LOCK(self, who);
-}
+ su_port_t *self = arg;
-static void su_port_osx_unlock(su_port_t *self, char const *who)
-{
- SU_PORT_OSX_UNLOCK(self, who);
-}
+ SU_DEBUG_9(("%s(%p) called\n", "su_osx_port_deinit", (void *)self));
-static void su_port_osx_incref(su_port_t *self, char const *who)
-{
- SU_PORT_OSX_INCREF(self, who);
-}
-
-static void su_port_osx_decref(su_port_t *self, int blocking, char const *who)
-{
- if (blocking)
- SU_PORT_OSX_ZAPREF(self, who);
- else
- SU_PORT_OSX_DECREF(self, who);
+ su_socket_port_deinit(self->sup_base);
}
static
@@ -683,6 +359,7 @@
}
+#if 0
static
int map_cf_event_to_poll_event(CFSocketCallBackType type)
{
@@ -702,18 +379,18 @@
return event;
}
-
+#endif
static
-void su_port_osx_socket_cb(CFSocketRef s,
+void su_osx_port_socket_cb(CFSocketRef s,
CFSocketCallBackType type,
CFDataRef address,
const void *data,
void *info)
{
- osx_magic_t *magic = (osx_magic_t *) info;
- su_port_t *self = magic->o_port;
- int curr = magic->o_current;
+ struct osx_magic *magic = (struct osx_magic *) info;
+ su_port_t *self = magic->o_port;
+ int curr = magic->o_current;
su_duration_t tout = 0;
#if SU_HAVE_POLL
@@ -733,13 +410,13 @@
&waits[n],
self->sup_wait_args[n]);
- if (self->sup_running) {
- su_port_osx_getmsgs(self);
+ if (self->sup_base->sup_running) {
+ su_port_getmsgs(self);
- if (self->sup_timers)
- su_timer_expire(&self->sup_timers, &tout, su_now());
+ if (self->sup_base->sup_timers)
+ su_timer_expire(&self->sup_base->sup_timers, &tout, su_now());
- if (self->sup_head)
+ if (self->sup_base->sup_head)
tout = 0;
/* CFRunLoopWakeUp(CFRunLoopGetCurrent()); */
@@ -752,37 +429,20 @@
}
-#if SU_HAVE_MBOX
-/** @internal Message box wakeup function. */
-static int su_port_osx_wakeup(su_root_magic_t *magic, /* NULL */
- su_wait_t *w,
- su_wakeup_arg_t *arg)
-{
- char buf[32];
- su_socket_t s = *(su_socket_t *)arg;
- su_wait_events(w, s);
- recv(s, buf, sizeof(buf), 0);
-
- /* CFRunLoopWakeUp(CFRunLoopGetCurrent()); */
-
- return 0;
-}
-#endif
-
/** @internal Send a message to the port. */
-int su_port_osx_send(su_port_t *self, su_msg_r rmsg)
+int su_osx_port_send(su_port_t *self, su_msg_r rmsg)
{
CFRunLoopRef rl;
if (self) {
int wakeup;
- SU_PORT_OSX_LOCK(self, "su_port_osx_send");
+ //XXX - mela SU_OSX_PORT_LOCK(self, "su_osx_port_send");
- wakeup = self->sup_head == NULL;
+ wakeup = self->sup_base->sup_head == NULL;
- *self->sup_tail = rmsg[0]; rmsg[0] = NULL;
- self->sup_tail = &(*self->sup_tail)->sum_next;
+ *self->sup_base->sup_tail = rmsg[0]; rmsg[0] = NULL;
+ self->sup_base->sup_tail = &(*self->sup_base->sup_tail)->sum_next;
#if SU_HAVE_MBOX
/* if (!pthread_equal(pthread_self(), self->sup_tid)) */
@@ -799,7 +459,7 @@
}
#endif
- SU_PORT_OSX_UNLOCK(self, "su_port_osx_send");
+ //XXX - mela SU_OSX_PORT_UNLOCK(self, "su_osx_port_send");
rl = CFRunLoopGetCurrent();
CFRunLoopWakeUp(rl);
@@ -811,48 +471,6 @@
return -1;
}
}
-
-/** @internal
- * Execute the messages in the incoming queue until the queue is empty..
- *
- * @param self - pointer to a port object
- *
- * @retval Number of messages sent
- */
-int su_port_osx_getmsgs(su_port_t *self)
-{
- int n = 0;
-
- if (self->sup_head) {
- su_msg_f f;
- su_msg_t *msg, *queue;
-
- SU_PORT_OSX_LOCK(self, "su_port_getmsgs");
-
- queue = self->sup_head;
- self->sup_tail = &self->sup_head;
- self->sup_head = NULL;
-
- SU_PORT_OSX_UNLOCK(self, "su_port_osx_getmsgs");
-
- for (msg = queue; msg; msg = queue) {
- queue = msg->sum_next;
- msg->sum_next = NULL;
-
- f = msg->sum_func;
- if (f)
- f(SU_ROOT_MAGIC(msg->sum_to->sut_root), &msg, msg->sum_data);
- su_msg_delivery_report(&msg);
- n++;
- }
-
- /* Check for wait events that may have been generated by messages */
- su_port_osx_wait_events(self, 0);
- }
-
- return n;
-}
-
static int o_count;
/** @internal
@@ -873,9 +491,9 @@
* (0 is normal, 1 important, 2 realtime)
*
* @return
- * The function @su_port_osx_register returns nonzero index of the wait object,
+ * The function @su_osx_port_register returns nonzero index of the wait object,
* or -1 upon an error. */
-int su_port_osx_register(su_port_t *self,
+int su_osx_port_register(su_port_t *self,
su_root_t *root,
su_wait_t *wait,
su_wakeup_f callback,
@@ -887,11 +505,11 @@
CFRunLoopSourceRef *sources, source;
CFSocketRef cf_socket, *sockets;
int events = 0;
- osx_magic_t *osx_magic = NULL;
+ struct osx_magic *osx_magic = NULL;
CFSocketContext cf_socket_cntx[1] = {{0, NULL, NULL, NULL, NULL}};
CFOptionFlags flags = 0;
- assert(SU_PORT_OSX_OWN_THREAD(self));
+ // XXX - mela assert(SU_OSX_PORT_OWN_THREAD(self));
n = self->sup_n_waits;
@@ -1015,7 +633,7 @@
cf_socket = CFSocketCreateWithNative(NULL,
(CFSocketNativeHandle) su_wait_socket(wait),
- events, su_port_osx_socket_cb, cf_socket_cntx);
+ events, su_osx_port_socket_cb, cf_socket_cntx);
flags = CFSocketGetSocketFlags(cf_socket);
flags &= ~kCFSocketCloseOnInvalidate;
@@ -1044,7 +662,7 @@
/** Deregister a su_wait_t object. */
static
-int su_port_osx_deregister0(su_port_t *self, int i)
+int su_osx_port_deregister0(su_port_t *self, int i)
{
CFRunLoopRef rl;
int n, N, *indices, *reverses;
@@ -1118,7 +736,7 @@
/** Unregister a su_wait_t object.
*
- * The function su_port_osx_unregister() unregisters a su_wait_t object. The
+ * The function su_osx_port_unregister() unregisters a su_wait_t object. The
* wait object, a callback function and a argument are removed from the
* port object.
*
@@ -1131,7 +749,7 @@
*
* @return Nonzero index of the wait object, or -1 upon an error.
*/
-int su_port_osx_unregister(su_port_t *self,
+int su_osx_port_unregister(su_port_t *self,
su_root_t *root,
su_wait_t *wait,
su_wakeup_f callback, /* XXX - ignored */
@@ -1140,13 +758,13 @@
int n, N;
assert(self);
- assert(SU_PORT_OSX_OWN_THREAD(self));
+ // XXX - mela assert(SU_OSX_PORT_OWN_THREAD(self));
N = self->sup_n_waits;
for (n = 0; n < N; n++) {
if (SU_WAIT_CMP(wait[0], self->sup_waits[n]) == 0) {
- return su_port_osx_deregister0(self, self->sup_reverses[n]);
+ return su_osx_port_deregister0(self, self->sup_reverses[n]);
}
}
@@ -1157,7 +775,7 @@
/** Deregister a su_wait_t object.
*
- * The function su_port_osx_deregister() deregisters a su_wait_t registrattion.
+ * The function su_osx_port_deregister() deregisters a su_wait_t registrattion.
* The wait object, a callback function and a argument are removed from the
* port object.
*
@@ -1166,13 +784,13 @@
*
* @return Index of the wait object, or -1 upon an error.
*/
-int su_port_osx_deregister(su_port_t *self, int i)
+int su_osx_port_deregister(su_port_t *self, int i)
{
su_wait_t wait[1] = { SU_WAIT_INIT };
int retval;
assert(self);
- assert(SU_PORT_OSX_OWN_THREAD(self));
+ // XXX - mela assert(SU_OSX_PORT_OWN_THREAD(self));
if (i <= 0 || i > self->sup_size_waits)
return su_seterrno(EBADF);
@@ -1180,7 +798,7 @@
if (self->sup_indices[i] < 0)
return su_seterrno(EBADF);
- retval = su_port_osx_deregister0(self, i);
+ retval = su_osx_port_deregister0(self, i);
su_wait_destroy(wait);
@@ -1191,7 +809,7 @@
/** @internal
* Unregister all su_wait_t objects.
*
- * The function su_port_osx_unregister_all() unregisters all su_wait_t objects
+ * The function su_osx_port_unregister_all() unregisters all su_wait_t objects
* and destroys all queued timers associated with given root object.
*
* @param self - pointer to port object
@@ -1199,7 +817,7 @@
*
* @return Number of wait objects removed.
*/
-int su_port_osx_unregister_all(su_port_t *self,
+int su_osx_port_unregister_all(su_port_t *self,
su_root_t *root)
{
int i, j, index, N;
@@ -1212,7 +830,7 @@
CFRunLoopSourceRef *sources;
CFSocketRef *sockets;
- assert(SU_PORT_OSX_OWN_THREAD(self));
+ // XXX - assert(SU_OSX_PORT_OWN_THREAD(self));
N = self->sup_n_waits;
indices = self->sup_indices;
@@ -1286,7 +904,7 @@
/**Set mask for a registered event. @internal
*
- * The function su_port_osx_eventmask() sets the mask describing events that can
+ * The function su_osx_port_eventmask() sets the mask describing events that can
* signal the registered callback.
*
* @param port pointer to port object
@@ -1297,12 +915,12 @@
* @retval 0 when successful,
* @retval -1 upon an error.
*/
-int su_port_osx_eventmask(su_port_t *self, int index, int socket, int events)
+int su_osx_port_eventmask(su_port_t *self, int index, int socket, int events)
{
int n, ret;
assert(self);
- assert(SU_PORT_OSX_OWN_THREAD(self));
+ // XXX - mela assert(SU_OSX_PORT_OWN_THREAD(self));
if (index <= 0 || index > self->sup_size_waits)
return su_seterrno(EBADF);
@@ -1321,7 +939,7 @@
/** @internal
*
* Copies the su_wait_t objects from the port. The number of wait objects
- * can be found out by calling su_port_osx_query() with @a n_waits as zero.
+ * can be found out by calling su_osx_port_query() with @a n_waits as zero.
*
* @note This function is called only by friends.
*
@@ -1331,11 +949,11 @@
*
* @return Number of wait objects, or 0 upon an error.
*/
-unsigned su_port_osx_query(su_port_t *self, su_wait_t *waits, unsigned n_waits)
+unsigned su_osx_port_query(su_port_t *self, su_wait_t *waits, unsigned n_waits)
{
unsigned n;
- assert(SU_PORT_OSX_OWN_THREAD(self));
+ // XXX - mela assert(SU_OSX_PORT_OWN_THREAD(self));
n = self->sup_n_waits;
@@ -1351,7 +969,7 @@
/** @internal Enable multishot mode.
*
- * The function su_port_osx_multishot() enables, disables or queries the
+ * The function su_osx_port_multishot() enables, disables or queries the
* multishot mode for the port. The multishot mode determines how the events
* are scheduled by port. If multishot mode is enabled, port serves all the
* sockets that have received network events. If it is disables, only first
@@ -1364,7 +982,7 @@
* @retval 1 multishot mode is enabled
* @retval -1 an error occurred
*/
-int su_port_osx_multishot(su_port_t *self, int multishot)
+int su_osx_port_multishot(su_port_t *self, int multishot)
{
if (multishot < 0)
return self->sup_multishot;
@@ -1374,12 +992,14 @@
return (errno = EINVAL), -1;
}
+#if 0
/** @internal Enable threadsafe operation. */
static
-int su_port_osx_threadsafe(su_port_t *port)
+int su_osx_port_threadsafe(su_port_t *port)
{
return su_home_threadsafe(port->sup_home);
}
+#endif
/** Prepare root to be run on OSX Run Loop.
*
@@ -1399,23 +1019,23 @@
CFRunLoopRef rl;
su_duration_t tout = 0;
- assert(SU_PORT_OSX_OWN_THREAD(self));
+ // XXX - mela assert(SU_OSX_PORT_OWN_THREAD(self));
enter;
- self->sup_running = 1;
+ self->sup_base->sup_running = 1;
rl = CFRunLoopGetCurrent();
- if (self->sup_prepoll)
- self->sup_prepoll(self->sup_pp_magic, self->sup_pp_root);
+ if (self->sup_base->sup_prepoll)
+ self->sup_base->sup_prepoll(self->sup_base->sup_pp_magic, self->sup_base->sup_pp_root);
- if (self->sup_head)
- su_port_osx_getmsgs(self);
+ if (self->sup_base->sup_head)
+ su_port_getmsgs(self);
- if (self->sup_timers)
- su_timer_expire(&self->sup_timers, &tout, su_now());
+ if (self->sup_base->sup_timers)
+ su_timer_expire(&self->sup_base->sup_timers, &tout, su_now());
- if (!self->sup_running)
+ if (!self->sup_base->sup_running)
return;
CFRetain(rl);
@@ -1426,45 +1046,45 @@
/** @internal Main loop.
*
- * The function @c su_port_osx_run() waits for wait objects and the timers
+ * The function @c su_osx_port_run() waits for wait objects and the timers
* associated with the port object. When any wait object is signaled or
* timer is expired, it invokes the callbacks, and returns waiting.
*
- * The function @c su_port_osx_run() runs until @c su_port_osx_break() is called
+ * The function @c su_osx_port_run() runs until @c su_osx_port_break() is called
* from a callback.
*
* @param self pointer to port object
*
*/
-void su_port_osx_run(su_port_t *self)
+void su_osx_port_run(su_port_t *self)
{
CFRunLoopRef rl;
su_duration_t tout = 0;
- assert(SU_PORT_OSX_OWN_THREAD(self));
+ // XXX - mela assert(SU_OSX_PORT_OWN_THREAD(self));
enter;
- self->sup_running = 1;
+ self->sup_base->sup_running = 1;
rl = CFRunLoopGetCurrent();
- if (self->sup_prepoll)
- self->sup_prepoll(self->sup_pp_magic, self->sup_pp_root);
+ if (self->sup_base->sup_prepoll)
+ self->sup_base->sup_prepoll(self->sup_base->sup_pp_magic, self->sup_base->sup_pp_root);
- if (self->sup_head)
- su_port_osx_getmsgs(self);
+ if (self->sup_base->sup_head)
+ su_port_getmsgs(self);
- if (self->sup_timers)
- su_timer_expire(&self->sup_timers, &tout, su_now());
+ if (self->sup_base->sup_timers)
+ su_timer_expire(&self->sup_base->sup_timers, &tout, su_now());
- if (!self->sup_running)
+ if (!self->sup_base->sup_running)
return;
CFRetain(rl);
self->sup_main_loop = rl;
/* if there are messages do a quick wait */
- if (self->sup_head)
+ if (self->sup_base->sup_head)
tout = 0;
CFRunLoopRun();
@@ -1475,70 +1095,70 @@
#if tuning
/* This version can help tuning... */
-void su_port_osx_run_tune(su_port_t *self)
+void su_osx_port_run_tune(su_port_t *self)
{
int i;
int timers = 0, messages = 0, events = 0;
su_duration_t tout = 0, tout0;
su_time_t started = su_now(), woken = started, bedtime = woken;
- assert(SU_PORT_OSX_OWN_THREAD(self));
+ // XXX - mela assert(SU_OSX_PORT_OWN_THREAD(self));
- for (self->sup_running = 1; self->sup_running;) {
+ for (self->sup_base->sup_running = 1; self->sup_base->sup_running;) {
tout0 = tout, tout = 2000;
timers = 0, messages = 0;
- if (self->sup_prepoll)
- self->sup_prepoll(self->sup_pp_magic, self->sup_pp_root);
+ if (self->sup_base->sup_prepoll)
+ self->sup_base->sup_prepoll(self->sup_base->sup_pp_magic, self->sup_base->sup_pp_root);
- if (self->sup_head)
- messages = su_port_osx_getmsgs(self);
+ if (self->sup_base->sup_head)
+ messages = su_port_getmsgs(self);
- if (self->sup_timers)
- timers = su_timer_expire(&self->sup_timers, &tout, su_now());
+ if (self->sup_base->sup_timers)
+ timers = su_timer_expire(&self->sup_base->sup_timers, &tout, su_now());
- if (!self->sup_running)
+ if (!self->sup_base->sup_running)
break;
- if (self->sup_head) /* if there are messages do a quick wait */
+ if (self->sup_base->sup_head) /* if there are messages do a quick wait */
tout = 0;
bedtime = su_now();
- events = su_port_osx_wait_events(self, tout);
+ events = su_osx_port_wait_events(self, tout);
woken = su_now();
if (messages || timers || events)
- SU_DEBUG_1(("su_port_osx_run(%p): %.6f: %u messages %u timers %u "
+ SU_DEBUG_1(("su_osx_port_run(%p): %.6f: %u messages %u timers %u "
"events slept %.6f/%.3f\n",
self, su_time_diff(woken, started), messages, timers, events,
su_time_diff(woken, bedtime), tout0 * 1e-3));
- if (!self->sup_running)
+ if (!self->sup_base->sup_running)
break;
}
}
#endif
/** @internal
- * The function @c su_port_osx_break() is used to terminate execution of @c
- * su_port_osx_run(). It can be called from a callback function.
+ * The function @c su_osx_port_break() is used to terminate execution of @c
+ * su_osx_port_run(). It can be called from a callback function.
*
* @param self pointer to port
*
*/
-void su_port_osx_break(su_port_t *self)
+void su_osx_port_break(su_port_t *self)
{
if (self->sup_main_loop)
CFRunLoopStop(self->sup_main_loop);
- self->sup_running = 0;
+ self->sup_base->sup_running = 0;
}
/** @internal
- * The function @c su_port_osx_wait_events() is used to poll() for wait objects
+ * The function @c su_osx_port_wait_events() is used to poll() for wait objects
*
* @param self pointer to port
* @param tout timeout in milliseconds
@@ -1546,7 +1166,7 @@
* @return number of events handled
*/
static
-int su_port_osx_wait_events(su_port_t *self, su_duration_t tout)
+int su_osx_port_wait_events(su_port_t *self, su_duration_t tout)
{
int i, events = 0;
su_wait_t *waits = self->sup_waits;
@@ -1591,21 +1211,6 @@
return events;
}
-/** @internal
- * Used to check wait events in callbacks that take lots of time
- *
- * This function does a timeout 0 poll() and runs wait objects.
- *
- * @param port pointer to port
- *
- * @return number of events handled
- */
-static
-int su_port_osx_yield(su_port_t *port)
-{
- return su_port_osx_wait_events(port, 0);
-}
-
/** @internal Block until wait object is signaled or timeout.
*
* This function waits for wait objects and the timers associated with
@@ -1622,14 +1227,14 @@
* Milliseconds to the next invocation of timer, or @c SU_WAIT_FOREVER if
* there are no active timers.
*/
-su_duration_t su_port_osx_step(su_port_t *self, su_duration_t tout)
+su_duration_t su_osx_port_step(su_port_t *self, su_duration_t tout)
{
CFRunLoopRef rl;
su_time_t now = su_now();
CFAbsoluteTime start;
int ret, timeout = tout > INT32_MAX ? INT32_MAX : tout;
- assert(SU_PORT_OSX_OWN_THREAD(self));
+ // XXX - mela assert(SU_OSX_PORT_OWN_THREAD(self));
rl = CFRunLoopGetCurrent();
@@ -1641,17 +1246,17 @@
if (tout < timeout)
timeout = tout;
- if (self->sup_prepoll)
- self->sup_prepoll(self->sup_pp_magic, self->sup_pp_root);
+ if (self->sup_base->sup_prepoll)
+ self->sup_base->sup_prepoll(self->sup_base->sup_pp_magic, self->sup_base->sup_pp_root);
- if (self->sup_head)
- su_port_osx_getmsgs(self);
+ if (self->sup_base->sup_head)
+ su_base_port_getmsgs(self);
- if (self->sup_timers)
- su_timer_expire(&self->sup_timers, &tout, now);
+ if (self->sup_base->sup_timers)
+ su_timer_expire(&self->sup_base->sup_timers, &tout, now);
/* if there are messages do a quick wait */
- if (self->sup_head)
+ if (self->sup_base->sup_head)
tout = 0;
start = CFAbsoluteTimeGetCurrent();
@@ -1667,112 +1272,22 @@
break;
}
+#if 0
/* Check how long to run this loop */
- if (CFAbsoluteTimeGetCurrent() >= start + timeout / 1000)
+ if (CFAbsoluteTimeGetCurrent() >= start + timeout / 10000)
+#else
break;
+#endif
}
- if (self->sup_head)
- su_port_osx_getmsgs(self);
+ if (self->sup_base->sup_head)
+ su_base_port_getmsgs(self);
- if (self->sup_timers)
- su_timer_expire(&self->sup_timers, &tout, su_now());
+ if (self->sup_base->sup_timers)
+ su_timer_expire(&self->sup_base->sup_timers, &tout, su_now());
- if (self->sup_head)
+ if (self->sup_base->sup_head)
tout = 0;
return tout;
}
-
-
-/** @internal
- * Checks if the calling thread owns the port object.
- *
- * @param self pointer to a port object
- *
- * @retval true (nonzero) if the calling thread owns the port,
- * @retval false (zero) otherwise.
- */
-int su_port_osx_own_thread(su_port_t const *self)
-{
- return self == NULL || SU_PORT_OSX_OWN_THREAD(self);
-}
-
-#if 0
-/** @internal
- * Prints out the contents of the port.
- *
- * @param self pointer to a port
- * @param f pointer to a file (if @c NULL, uses @c stdout).
- */
-void su_port_osx_dump(su_port_t const *self, FILE *f)
-{
- int i;
-#define IS_WAIT_IN(x) (((x)->events & SU_WAIT_IN) ? "IN" : "")
-#define IS_WAIT_OUT(x) (((x)->events & SU_WAIT_OUT) ? "OUT" : "")
-#define IS_WAIT_ACCEPT(x) (((x)->events & SU_WAIT_ACCEPT) ? "ACCEPT" : "")
-
- if (f == NULL)
- f = stdout;
-
- fprintf(f, "su_port_osx_t at %p:\n", self);
- fprintf(f, "\tport is%s running\n", self->sup_running ? "" : "not ");
-#if SU_HAVE_PTHREADS
- fprintf(f, "\tport tid %p\n", (void *)self->sup_tid);
-#endif
-#if SU_HAVE_MBOX
- fprintf(f, "\tport mbox %d (%s%s%s)\n", self->sup_mbox[0],
- IS_WAIT_IN(&self->sup_mbox_wait),
- IS_WAIT_OUT(&self->sup_mbox_wait),
- IS_WAIT_ACCEPT(&self->sup_mbox_wait));
-#endif
- fprintf(f, "\t%d wait objects\n", self->sup_n_waits);
- for (i = 0; i < self->sup_n_waits; i++) {
-
- }
-}
-
-#endif
-
-/* =========================================================================
- * Pre-poll() callback
- */
-
-int su_port_osx_add_prepoll(su_port_t *port,
- su_root_t *root,
- su_prepoll_f *callback,
- su_prepoll_magic_t *magic)
-{
- if (port->sup_prepoll)
- return -1;
-
- port->sup_prepoll = callback;
- port->sup_pp_magic = magic;
- port->sup_pp_root = root;
-
- return 0;
-}
-
-int su_port_osx_remove_prepoll(su_port_t *port,
- su_root_t *root)
-{
- if (port->sup_pp_root != root)
- return -1;
-
- port->sup_prepoll = NULL;
- port->sup_pp_magic = NULL;
- port->sup_pp_root = NULL;
-
- return 0;
-}
-
-/* =========================================================================
- * Timers
- */
-
-static
-su_timer_t **su_port_osx_timers(su_port_t *self)
-{
- return &self->sup_timers;
-}
-
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_poll_port.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_poll_port.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_poll_port.c Fri Feb 9 12:32:17 2007
@@ -30,12 +30,19 @@
* @author Pekka Pessi <Pekka.Pessi(a)nokia.com>
* @author Kai Vehmanen <kai.vehmanen(a)nokia.com>
*
- * @date Created: Tue Sep 14 15:51:04 1999 ppessi
+ * @date Create: Fri Jan 26 20:44:14 2007 ppessi
+ * @date Original: Tue Sep 14 15:51:04 1999 ppessi
*/
#include "config.h"
-#if HAVE_POLL || HAVE_SELECT
+#define su_port_s su_poll_port_s
+
+#include "su_port.h"
+#include "sofia-sip/su_alloc.h"
+#include "sofia-sip/su.h"
+
+#if HAVE_POLL_PORT
#include <stdlib.h>
#include <assert.h>
@@ -45,18 +52,12 @@
#include <limits.h>
#include <errno.h>
-#define su_port_s su_poll_port_s
-
-#include "sofia-sip/su.h"
-#include "su_port.h"
-#include "sofia-sip/su_alloc.h"
-
/** Port based on poll(). */
struct su_poll_port_s {
- su_pthread_port_t sup_base[1];
+ su_socket_port_t sup_base[1];
-#define sup_home sup_base->sup_base->sup_home
+#define sup_home sup_base->sup_base->sup_base->sup_home
unsigned sup_multishot; /**< Multishot operation? */
@@ -69,12 +70,7 @@
int sup_size_waits; /**< Size of allocated su_waits */
int sup_pri_offset; /**< Offset to prioritized waits */
-#if !SU_HAVE_WINSOCK
#define INDEX_MAX (0x7fffffff)
-#else
- /* We use WSAWaitForMultipleEvents() */
-#define INDEX_MAX (64)
-#endif
/** Indices from index returned by su_root_register() to tables below.
*
@@ -124,7 +120,7 @@
su_base_port_incref,
su_poll_port_decref,
su_base_port_gsource,
- su_pthread_port_send,
+ su_socket_port_send,
su_poll_port_register,
su_poll_port_unregister,
su_poll_port_deregister,
@@ -160,7 +156,7 @@
SU_DEBUG_9(("%s(%p) called\n", "su_poll_port_deinit", (void *)self));
- su_pthread_port_deinit(self);
+ su_socket_port_deinit(self->sup_base);
}
static void su_poll_port_decref(su_port_t *self, int blocking, char const *who)
@@ -516,8 +512,8 @@
/**Set mask for a registered event. @internal
*
- * The function su_poll_port_eventmask() sets the mask describing events that can
- * signal the registered callback.
+ * The function su_poll_port_eventmask() sets the mask describing events
+ * that can signal the registered callback.
*
* @param port pointer to port object
* @param index registration index
@@ -663,7 +659,7 @@
self->sup_multishot = SU_ENABLE_MULTISHOT_POLL;
- if (su_pthread_port_init(self, su_poll_port_vtable) < 0)
+ if (su_socket_port_init(self->sup_base, su_poll_port_vtable) < 0)
return su_home_unref(su_port_home(self)), NULL;
return self;
@@ -675,8 +671,25 @@
su_root_init_f init,
su_root_deinit_f deinit)
{
- return su_pthreaded_port_start(su_poll_port_create,
+ return su_pthreaded_port_start(su_default_port_create,
parent, return_clone, magic, init, deinit);
}
-#endif /* HAVE_POLL || HAVE_SELECT */
+#else
+
+su_port_t *su_poll_port_create(void)
+{
+ return su_default_port_create();
+}
+
+int su_poll_clone_start(su_root_t *parent,
+ su_clone_r return_clone,
+ su_root_magic_t *magic,
+ su_root_init_f init,
+ su_root_deinit_f deinit)
+{
+ return su_default_clone_start(parent, return_clone, magic, init, deinit);
+}
+
+#endif /* HAVE_POLL_PORT */
+
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_port.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_port.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_port.c Fri Feb 9 12:32:17 2007
@@ -48,7 +48,43 @@
#include <string.h>
#include <stdlib.h>
-static su_port_create_f *preferred_su_port_create;
+/** Create the default su_port_t implementation. */
+su_port_t *su_default_port_create(void)
+{
+#if HAVE_EPOLL
+ return su_epoll_port_create();
+#elif HAVE_POLL_PORT
+ return su_poll_port_create();
+#elif HAVE_WIN32
+ return su_wsaevent_port_create();
+#elif HAVE_SELECT
+ return su_select_port_create();
+#else
+ return NULL;
+#endif
+}
+
+int su_default_clone_start(su_root_t *parent,
+ su_clone_r return_clone,
+ su_root_magic_t *magic,
+ su_root_init_f init,
+ su_root_deinit_f deinit)
+{
+#if HAVE_EPOLL
+ return su_epoll_clone_start(parent, return_clone, magic, init, deinit);;
+#elif HAVE_POLL_PORT
+ return su_poll_clone_start(parent, return_clone, magic, init, deinit);;
+#elif HAVE_WIN32
+ return su_wsaevent_clone_start(parent, return_clone, magic, init, deinit);;
+#elif HAVE_SELECT
+ return su_select_clone_start(parent, return_clone, magic, init, deinit);;
+#else
+ errno = ENOSYS;
+ return -1;
+#endif
+}
+
+static su_port_create_f *preferred_su_port_create = su_default_port_create;
static su_clone_start_f *preferred_su_clone_start;
/** Explicitly set the preferred su_port_t implementation.
@@ -69,45 +105,44 @@
if (name == NULL)
;
-#if HAVE_POLL_PORT
#if HAVE_EPOLL
else if (strcmp(name, "epoll") == 0) {
create = su_epoll_port_create;
start = su_epoll_clone_start;
}
#endif
+#if HAVE_POLL_PORT
else if (strcmp(name, "poll") == 0) {
create = su_poll_port_create;
start = su_poll_clone_start;
}
-#else
- /* select port does not work yet */
-#error no poll!
#endif
-#if HAVE_SELECT
+#if HAVE_WIN32
+ else if (strcasecmp(name, "wsaevent") == 0) {
+ create = su_wsaevent_port_create;
+ start = su_wsaevent_clone_start;
+ }
+#endif
+#if HAVE_SELECT && !HAVE_WIN32
else if (strcmp(name, "select") == 0) {
create = su_select_port_create;
start = su_select_clone_start;
}
#endif
-#if HAVE_POLL_PORT
-#if HAVE_EPOLL
- if (create == NULL) create = su_epoll_port_create;
- if (start == NULL) start = su_epoll_clone_start;
-#else
- if (create == NULL) create = su_poll_port_create;
- if (start == NULL) start = su_poll_clone_start;
-#endif
-#else
-#if HAVE_SELECT
- if (create == NULL) create = su_select_port_create;
- if (start == NULL) start = su_select_clone_start;
-#endif
-#endif
+ if (create == NULL)
+ create = su_default_port_create;
- if (preferred_su_port_create == NULL) preferred_su_port_create = create;
- if (preferred_su_clone_start == NULL) preferred_su_clone_start = start;
+ if (!preferred_su_port_create ||
+ preferred_su_port_create == su_default_port_create)
+ preferred_su_port_create = create;
+
+ if (start == NULL)
+ start = su_default_clone_start;
+
+ if (!preferred_su_clone_start ||
+ preferred_su_clone_start == su_default_clone_start)
+ preferred_su_clone_start = start;
}
/** Create the preferred su_port_t implementation. */
@@ -116,10 +151,7 @@
if (preferred_su_port_create == NULL)
su_port_set_system_preferences(getenv("SU_PORT"));
- if (preferred_su_port_create)
- return preferred_su_port_create();
-
- return NULL;
+ return preferred_su_port_create();
}
/* ========================================================================
@@ -244,8 +276,6 @@
if (parent == NULL || parent->sur_threading) {
if (preferred_su_clone_start == NULL)
su_port_set_system_preferences(getenv("SU_PORT"));
- if (preferred_su_clone_start == NULL)
- return -1;
return preferred_su_clone_start(parent, return_clone, magic, init, deinit);
}
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_port.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_port.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_port.h Fri Feb 9 12:32:17 2007
@@ -152,26 +152,6 @@
/* Extension from >= 1.12.5 */
-typedef su_port_t *su_port_create_f(void);
-typedef int su_clone_start_f(su_root_t *parent,
- su_clone_r return_clone,
- su_root_magic_t *magic,
- su_root_init_f init,
- su_root_deinit_f deinit);
-
-SOFIAPUBFUN void su_port_prefer(su_port_create_f *f, su_clone_start_f *);
-
-SOFIAPUBFUN su_port_t *su_epoll_port_create(void)
- __attribute__((__malloc__));
-SOFIAPUBFUN su_port_t *su_poll_port_create(void)
- __attribute__((__malloc__));
-SOFIAPUBFUN su_port_t *su_select_port_create(void)
- __attribute__((__malloc__));
-
-SOFIAPUBFUN su_clone_start_f su_epoll_clone_start;
-SOFIAPUBFUN su_clone_start_f su_poll_clone_start;
-SOFIAPUBFUN su_clone_start_f su_select_clone_start;
-
SOFIAPUBFUN void su_msg_delivery_report(su_msg_r msg);
SOFIAPUBFUN su_duration_t su_timer_next_expires(su_timer_t const * t,
su_time_t now);
@@ -518,22 +498,18 @@
#include <pthread.h>
-#define SU_MBOX_SIZE 2
-
/** Pthread port object */
typedef struct su_pthread_port_s {
su_base_port_t sup_base[1];
struct su_pthread_port_waiting_parent
*sup_waiting_parent;
pthread_t sup_tid;
- pthread_mutex_t sup_runlock[1];
#if 0
+ pthread_mutex_t sup_runlock[1];
pthread_cond_t sup_resume[1];
short sup_paused; /**< True if thread is paused */
#endif
short sup_thread; /**< True if thread is active */
- short sup_mbox_index;
- su_socket_t sup_mbox[SU_MBOX_SIZE];
} su_pthread_port_t;
/* Pthread methods */
@@ -546,9 +522,9 @@
SOFIAPUBFUN int su_pthread_port_own_thread(su_port_t const *self);
+#if 0 /* not yet */
SOFIAPUBFUN int su_pthread_port_send(su_port_t *self, su_msg_r rmsg);
-#if 0 /* not yet */
SOFIAPUBFUN su_port_t *su_pthread_port_create(void);
SOFIAPUBFUN su_port_t *su_pthread_port_start(su_root_t *parent,
su_clone_r return_clone,
@@ -584,12 +560,27 @@
#define su_pthread_port_lock su_base_port_lock
#define su_pthread_port_unlock su_base_port_unlock
#define su_pthread_port_own_thread su_base_port_own_thread
-#define su_pthread_port_send su_base_port_send
#define su_pthread_port_wait su_base_port_wait
#define su_pthread_port_execute su_base_port_execute
#endif
+/* ====================================================================== */
+/* Mailbox port using sockets */
+
+#define SU_MBOX_SIZE 2
+
+typedef struct su_socket_port_s {
+ su_pthread_port_t sup_base[1];
+ int sup_mbox_index;
+ su_socket_t sup_mbox[SU_MBOX_SIZE];
+} su_socket_port_t;
+
+SOFIAPUBFUN int su_socket_port_init(su_socket_port_t *,
+ su_port_vtable_t const *);
+SOFIAPUBFUN void su_socket_port_deinit(su_socket_port_t *self);
+SOFIAPUBFUN int su_socket_port_send(su_port_t *self, su_msg_r rmsg);
+
SOFIA_END_DECLS
#endif /* SU_PORT_H */
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_pthread_port.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_pthread_port.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_pthread_port.c Fri Feb 9 12:32:17 2007
@@ -61,24 +61,6 @@
#define SU_TASK_COPY(d, s, by) (void)((d)[0]=(s)[0], \
(s)->sut_port?(void)su_port_incref(s->sut_port, #by):(void)0)
-#if HAVE_SOCKETPAIR
-#define SU_MBOX_SEND 1
-#else
-#define SU_MBOX_SEND 0
-#endif
-
-/** @internal Message box wakeup function. */
-static int su_mbox_port_wakeup(su_root_magic_t *magic, /* NULL */
- su_wait_t *w,
- su_wakeup_arg_t *arg)
-{
- char buf[32];
- su_socket_t socket = *(su_socket_t*)arg;
- su_wait_events(w, socket);
- recv(socket, buf, sizeof(buf), 0);
- return 0;
-}
-
/**@internal
*
* Initializes a message port. It creates a mailbox used to wake up the
@@ -90,93 +72,14 @@
SU_DEBUG_9(("su_pthread_port_init(%p, %p) called\n",
(void *)self, (void *)vtable));
+ self->sup_tid = pthread_self();
+
if (su_base_port_init(self, vtable) == 0 &&
su_base_port_threadsafe(self) == 0) {
- int af;
- su_socket_t mb = INVALID_SOCKET;
- su_wait_t wait[1] = { SU_WAIT_INIT };
- char const *why;
-
- self->sup_tid = pthread_self();
-
-#if 0
- pthread_mutex_init(self->sup_runlock, NULL);
- pthread_mutex_lock(self->sup_runlock);
- pthread_cond_init(self->sup_resume, NULL);
-#endif
-
-#if HAVE_SOCKETPAIR
-#if defined(AF_LOCAL)
- af = AF_LOCAL;
-#else
- af = AF_UNIX;
-#endif
- if (socketpair(af, SOCK_STREAM, 0, self->sup_mbox) == -1) {
- why = "socketpair"; goto error;
- }
-
- mb = self->sup_mbox[0];
- su_setblocking(self->sup_mbox[1], 0);
-
-#else
- {
- struct sockaddr_in sin = { sizeof(struct sockaddr_in), 0 };
- socklen_t sinsize = sizeof sin;
- struct sockaddr *sa = (struct sockaddr *)&sin;
-
- af = PF_INET;
-
- self->sup_mbox[0] = mb = su_socket(af, SOCK_DGRAM, IPPROTO_UDP);
- if (mb == INVALID_SOCKET) {
- why = "socket"; goto error;
- }
-
- sin.sin_family = AF_INET;
- sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK); /* 127.1 */
-
- /* Get a port for us */
- if (bind(mb, sa, sizeof sin) == -1) {
- why = "bind"; goto error;
- }
-
- if (getsockname(mb, sa, &sinsize) == -1) {
- why = "getsockname"; goto error;
- }
-
- if (connect(mb, sa, sinsize) == -1) {
- why = "connect"; goto error;
- }
- }
-#endif
-
- su_setblocking(mb, 0);
-
- if (su_wait_create(wait, mb, SU_WAIT_IN) == -1) {
- why = "su_wait_create";
- goto error;
- }
-
- self->sup_mbox_index = su_port_register(self, NULL, wait,
- su_mbox_port_wakeup,
- (void *)self->sup_mbox, 0);
-
- if (self->sup_mbox_index <= 0) {
- why = "su_port_register";
- su_wait_destroy(wait);
- goto error;
- }
-
- SU_DEBUG_9(("%s() returns %d\n", "su_pthread_port_init", 0));
-
return 0;
-
- error:
- su_log("%s: %s: %s\n",
- "su_pthread_port_init", why, su_strerror(su_errno()));
- su_pthread_port_deinit(self);
}
-
- SU_DEBUG_9(("%s() returns %d\n", "su_pthread_port_init", -1));
+ else
+ su_base_port_deinit(self);
return -1;
}
@@ -187,17 +90,6 @@
{
assert(self);
- if (self->sup_mbox_index > 0)
- su_port_deregister(self, self->sup_mbox_index);
- self->sup_mbox_index = 0;
-
- if (self->sup_mbox[0] && self->sup_mbox[0] != INVALID_SOCKET)
- su_close(self->sup_mbox[0]); self->sup_mbox[0] = INVALID_SOCKET;
-#if HAVE_SOCKETPAIR
- if (self->sup_mbox[1] && self->sup_mbox[1] != INVALID_SOCKET)
- su_close(self->sup_mbox[1]); self->sup_mbox[1] = INVALID_SOCKET;
-#endif
-
#if 0
pthread_mutex_destroy(self->sup_runlock);
pthread_cond_destroy(self->sup_resume);
@@ -225,27 +117,6 @@
(void *)pthread_self(), who, self));
}
-/** @internal Send a message to the port. */
-int su_pthread_port_send(su_port_t *self, su_msg_r rmsg)
-{
- int wakeup = su_base_port_send(self, rmsg);
-
- if (wakeup < 0)
- return -1;
- if (wakeup == 0)
- return 0;
-
- assert(self->sup_mbox[SU_MBOX_SEND] != INVALID_SOCKET);
-
- if (send(self->sup_mbox[SU_MBOX_SEND], "X", 1, 0) == -1) {
-#if HAVE_SOCKETPAIR
- if (su_errno() != EWOULDBLOCK)
-#endif
- su_perror("su_msg_send: send()");
- }
- return 0;
-}
-
/** @internal
* Checks if the calling thread owns the port object.
*
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_select_port.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_select_port.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_select_port.c Fri Feb 9 12:32:17 2007
@@ -25,12 +25,12 @@
/**@ingroup su_wait
* @CFILE su_select_port.c
*
- * Port implementation using select(). NOT IMPLEMENTED YET!
+ * Port implementation using select().
*
* @author Pekka Pessi <Pekka.Pessi(a)nokia.com>
* @author Kai Vehmanen <kai.vehmanen(a)nokia.com>
*
- * @date Created: Tue Sep 14 15:51:04 1999 ppessi
+ * @date Created: Fri Jan 26 17:56:34 2007 ppessi
*/
#include "config.h"
@@ -51,63 +51,82 @@
#include <limits.h>
#include <errno.h>
+#if HAVE_WIN32
+#error winsock select() not supported yet
+#else
#if HAVE_SYS_SELECT_H
#include <sys/select.h>
#elif HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
+#include <sys/types.h>
+#include <unistd.h>
+
+#ifndef __NFDBITS
+#define __NFDBITS (8 * sizeof (long int))
+#endif
+
+#undef FDSETSIZE
+/* Size of fd set in bytes */
+#define FDSETSIZE(n) (((n) + __NFDBITS - 1) / __NFDBITS * (__NFDBITS / 8))
+#endif
+
/** Port based on select(). */
struct su_select_port_s {
- su_pthread_port_t sup_base[1];
+ su_socket_port_t sup_base[1];
+
+#define sup_home sup_base->sup_base->sup_base->sup_home
+ /** epoll fd */
+ int sup_epoll;
unsigned sup_multishot; /**< Multishot operation? */
unsigned sup_registers; /** Counter incremented by
su_port_register() or
su_port_unregister()
*/
+ int sup_n_registrations;
+ int sup_max_index; /**< Indexes are equal or smaller than this */
+ int sup_size_indices; /**< Size of allocated index table */
+
+ /** Structure containing registration data */
+ struct su_select_register {
+ struct su_select_register *ser_next; /* Next in free list */
+ su_wakeup_f ser_cb;
+ su_wakeup_arg_t*ser_arg;
+ su_root_t *ser_root;
+ int ser_id; /** registration identifier */
+ su_wait_t ser_wait[1];
+ } **sup_indices;
- int sup_n_waits; /**< Active su_wait_t in su_waits */
- int sup_size_waits; /**< Size of allocated su_waits */
- int sup_pri_offset; /**< Offset to prioritized waits */
-
- /** Indices from index returned by su_root_register() to tables below.
- *
- * Free elements are negative. Free elements form a list, value of free
- * element is (0 - index of next free element).
- *
- * First element sup_indices[0] points to first free element.
- */
- int *sup_indices;
-
- int *sup_reverses; /** Reverse index */
- su_wakeup_f *sup_wait_cbs;
- su_wakeup_arg_t**sup_wait_args;
- su_root_t **sup_wait_roots;
- su_wait_t *sup_waits;
+ int sup_maxfd, sup_allocfd;
+
+ fd_set *sup_readfds, *sup_readfds2;
+ fd_set *sup_writefds, *sup_writefds2;
};
-static void su_select_port_decref(su_port_t *, int blocking, char const *who);
-
+static void su_select_port_decref(su_port_t *self,
+ int blocking,
+ char const *who);
static int su_select_port_register(su_port_t *self,
- su_root_t *root,
- su_wait_t *wait,
- su_wakeup_f callback,
- su_wakeup_arg_t *arg,
- int priority);
+ su_root_t *root,
+ su_wait_t *wait,
+ su_wakeup_f callback,
+ su_wakeup_arg_t *arg,
+ int priority);
static int su_select_port_unregister(su_port_t *port,
- su_root_t *root,
- su_wait_t *wait,
- su_wakeup_f callback,
- su_wakeup_arg_t *arg);
+ su_root_t *root,
+ su_wait_t *wait,
+ su_wakeup_f callback,
+ su_wakeup_arg_t *arg);
static int su_select_port_deregister(su_port_t *self, int i);
static int su_select_port_unregister_all(su_port_t *self, su_root_t *root);
static int su_select_port_eventmask(su_port_t *self,
- int index,
- int socket,
- int events);
+ int index,
+ int socket,
+ int events);
static int su_select_port_multishot(su_port_t *self, int multishot);
static int su_select_port_wait_events(su_port_t *self, su_duration_t tout);
static char const *su_select_port_name(su_port_t const *self);
@@ -120,7 +139,7 @@
su_base_port_incref,
su_select_port_decref,
su_base_port_gsource,
- su_pthread_port_send,
+ su_socket_port_send,
su_select_port_register,
su_select_port_unregister,
su_select_port_deregister,
@@ -142,7 +161,7 @@
su_select_port_name,
su_base_port_start_shared,
su_pthread_port_wait,
- su_pthread_port_execute
+ su_pthread_port_execute,
}};
static char const *su_select_port_name(su_port_t const *self)
@@ -150,39 +169,23 @@
return "select";
}
+static void su_select_port_decref(su_port_t *self, int blocking, char const *who)
+{
+ (void)su_base_port_decref(self, blocking, who);
+}
+
static void su_select_port_deinit(void *arg)
{
su_port_t *self = arg;
SU_DEBUG_9(("%s(%p) called\n", "su_select_port_deinit", (void *)self));
- su_pthread_port_deinit(self);
-
- if (self->sup_waits)
- free(self->sup_waits), self->sup_waits = NULL;
- if (self->sup_wait_cbs)
- free(self->sup_wait_cbs), self->sup_wait_cbs = NULL;
- if (self->sup_wait_args)
- free(self->sup_wait_args), self->sup_wait_args = NULL;
- if (self->sup_wait_roots)
- free(self->sup_wait_roots), self->sup_wait_roots = NULL;
- if (self->sup_reverses)
- free(self->sup_reverses), self->sup_reverses = NULL;
- if (self->sup_indices)
- free(self->sup_indices), self->sup_indices = NULL;
-
- SU_DEBUG_9(("%s(%p) freed registrations\n",
- "su_select_port_deinit", (void *)self));
-}
-
-static void su_select_port_decref(su_port_t *self, int blocking, char const *who)
-{
- su_base_port_decref(self, blocking, who);
+ su_socket_port_deinit(self->sup_base);
}
/** @internal
*
- * Register a @c su_wait_t object. The wait object, a callback function and
+ * Register a #su_wait_t object. The wait object, a callback function and
* an argument pointer is stored in the port object. The callback function
* will be called when the wait object is signaled.
*
@@ -202,179 +205,154 @@
* or -1 upon an error.
*/
int su_select_port_register(su_port_t *self,
- su_root_t *root,
- su_wait_t *wait,
- su_wakeup_f callback,
- su_wakeup_arg_t *arg,
- int priority)
+ su_root_t *root,
+ su_wait_t *wait,
+ su_wakeup_f callback,
+ su_wakeup_arg_t *arg,
+ int priority)
{
int i, j, n;
+ struct su_select_register *ser;
+ struct su_select_register **indices = self->sup_indices;
+ int allocfd = self->sup_allocfd;
+ fd_set *readfds = self->sup_readfds, *readfds2 = self->sup_readfds2;
+ fd_set *writefds = self->sup_writefds, *writefds2 = self->sup_writefds2;
assert(su_port_own_thread(self));
- n = self->sup_n_waits;
+ n = self->sup_size_indices;
if (n >= SU_WAIT_MAX)
return su_seterrno(ENOMEM);
- if (n >= self->sup_size_waits) {
- /* Reallocate size arrays */
- int size;
- int *indices;
- int *reverses;
- su_wait_t *waits;
- su_wakeup_f *wait_cbs;
- su_wakeup_arg_t **wait_args;
- su_root_t **wait_tasks;
-
- if (self->sup_size_waits == 0)
- size = su_root_size_hint;
- else
- size = 2 * self->sup_size_waits;
-
- if (size < SU_WAIT_MIN)
- size = SU_WAIT_MIN;
-
- /* Too large */
- if (-3 - size > 0)
- return (errno = ENOMEM), -1;
+ self->sup_registers++;
- indices = realloc(self->sup_indices, (size + 1) * sizeof(*indices));
- if (indices) {
- self->sup_indices = indices;
+ if (wait->fd >= allocfd)
+ allocfd += __NFDBITS; /* long at a time */
- if (self->sup_size_waits == 0)
- indices[0] = -1;
+ if (allocfd >= self->sup_allocfd) {
+ size_t bytes = FDSETSIZE(allocfd);
+ size_t bytes0 = FDSETSIZE(self->sup_allocfd);
+ /* (Re)allocate fd_sets */
+
+ readfds = su_realloc(self->sup_home, readfds, bytes);
+ if (readfds) self->sup_readfds = readfds;
+ readfds2 = su_realloc(self->sup_home, readfds2, bytes);
+ if (readfds2) self->sup_readfds2 = readfds2;
+ if (!readfds || !readfds2)
+ return -1;
- for (i = self->sup_size_waits + 1; i <= size; i++)
- indices[i] = -1 - i;
- }
+ writefds = su_realloc(self->sup_home, writefds, bytes);
+ if (writefds) self->sup_writefds = writefds;
+ writefds2 = su_realloc(self->sup_home, writefds2, bytes);
+ if (writefds2) self->sup_writefds2 = writefds2;
+ if (!writefds || !writefds2)
+ return -1;
+
+ memset((char *)readfds + bytes0, 0, bytes - bytes0);
+ memset((char *)writefds + bytes0, 0, bytes - bytes0);
+
+ self->sup_allocfd = allocfd;
+ }
- reverses = realloc(self->sup_reverses, size * sizeof(*waits));
- if (reverses) {
- for (i = self->sup_size_waits; i < size; i++)
- reverses[i] = -1;
- self->sup_reverses = reverses;
+ ser = indices[0];
+
+ if (!ser) {
+ su_home_t *h = su_port_home(self);
+
+ i = self->sup_max_index, j = i == 0 ? 15 : i + 16;
+
+ if (j >= self->sup_size_indices) {
+ /* Reallocate index table */
+ n = n < 1024 ? 2 * n : n + 1024;
+ indices = su_realloc(h, indices, n * sizeof(indices[0]));
+ if (!indices)
+ return -1;
+ self->sup_indices = indices;
+ self->sup_size_indices = n;
}
-
- waits = realloc(self->sup_waits, size * sizeof(*waits));
- if (waits)
- self->sup_waits = waits;
-
- wait_cbs = realloc(self->sup_wait_cbs, size * sizeof(*wait_cbs));
- if (wait_cbs)
- self->sup_wait_cbs = wait_cbs;
-
- wait_args = realloc(self->sup_wait_args, size * sizeof(*wait_args));
- if (wait_args)
- self->sup_wait_args = wait_args;
-
- /* Add sup_wait_roots array, if needed */
- wait_tasks = realloc(self->sup_wait_roots, size * sizeof(*wait_tasks));
- if (wait_tasks)
- self->sup_wait_roots = wait_tasks;
- if (!(indices &&
- reverses && waits && wait_cbs && wait_args && wait_tasks)) {
+ /* Allocate registrations */
+ ser = su_zalloc(h, (j - i) * (sizeof *ser));
+ if (!ser)
return -1;
+
+ indices[0] = ser;
+
+ for (i++; i <= j; i++) {
+ ser->ser_id = i;
+ ser->ser_next = i < j ? ser + 1 : NULL;
+ indices[i] = ser++;
}
- self->sup_size_waits = size;
+ self->sup_max_index = j;
+
+ ser = indices[0];
}
- i = -self->sup_indices[0]; assert(i <= self->sup_size_waits);
+ i = ser->ser_id;
- if (priority > 0) {
- /* Insert */
- for (n = self->sup_n_waits; n > 0; n--) {
- j = self->sup_reverses[n-1]; assert(self->sup_indices[j] == n - 1);
- self->sup_indices[j] = n;
- self->sup_reverses[n] = j;
- self->sup_waits[n] = self->sup_waits[n-1];
- self->sup_wait_cbs[n] = self->sup_wait_cbs[n-1];
- self->sup_wait_args[n] = self->sup_wait_args[n-1];
- self->sup_wait_roots[n] = self->sup_wait_roots[n-1];
- }
+ indices[0] = ser->ser_next;
+
+ ser->ser_next = NULL;
+ *ser->ser_wait = *wait;
+ ser->ser_cb = callback;
+ ser->ser_arg = arg;
+ ser->ser_root = root;
- self->sup_pri_offset++;
- }
- else {
- /* Append - no need to move anything */
- n = self->sup_n_waits;
- }
+ if (wait->events & SU_WAIT_IN)
+ FD_SET(wait->fd, readfds);
+ if (wait->events & SU_WAIT_OUT)
+ FD_SET(wait->fd, writefds);
- self->sup_n_waits++;
+ if (wait->fd >= self->sup_maxfd)
+ self->sup_maxfd = wait->fd + 1;
- self->sup_indices[0] = self->sup_indices[i]; /* Free index */
- self->sup_indices[i] = n;
+ self->sup_n_registrations++;
- self->sup_reverses[n] = i;
- self->sup_waits[n] = *wait;
- self->sup_wait_cbs[n] = callback;
- self->sup_wait_args[n] = arg;
- self->sup_wait_roots[n] = root;
+ return i; /* return index */
+}
- self->sup_registers++;
+static void su_select_port_update_maxfd(su_port_t *self)
+{
+ int i;
+ su_socket_t maxfd = 0;
- /* We return -1 or positive integer */
+ for (i = 1; i <= self->sup_max_index; i++) {
+ if (!self->sup_indices[i]->ser_cb)
+ continue;
+ if (maxfd <= self->sup_indices[i]->ser_wait->fd)
+ maxfd = self->sup_indices[i]->ser_wait->fd + 1;
+ }
- return i;
+ self->sup_maxfd = maxfd;
}
/** Deregister a su_wait_t object. */
static int su_select_port_deregister0(su_port_t *self, int i, int destroy_wait)
{
- int n, N, *indices, *reverses;
+ struct su_select_register **indices = self->sup_indices;
+ struct su_select_register *ser;
- indices = self->sup_indices;
- reverses = self->sup_reverses;
+ ser = self->sup_indices[i];
+ if (ser == NULL || ser->ser_cb == NULL) {
+ su_seterrno(ENOENT);
+ return -1;
+ }
- n = indices[i]; assert(n >= 0);
+ assert(ser->ser_id == i);
- if (destroy_wait)
- su_wait_destroy(&self->sup_waits[n]);
-
- N = --self->sup_n_waits;
-
- if (n < self->sup_pri_offset) {
- int j = --self->sup_pri_offset;
- if (n != j) {
- assert(reverses[j] > 0);
- assert(indices[reverses[j]] == j);
- indices[reverses[j]] = n;
- reverses[n] = reverses[j];
-
- self->sup_waits[n] = self->sup_waits[j];
- self->sup_wait_cbs[n] = self->sup_wait_cbs[j];
- self->sup_wait_args[n] = self->sup_wait_args[j];
- self->sup_wait_roots[n] = self->sup_wait_roots[j];
- n = j;
- }
- }
+ FD_CLR(ser->ser_wait->fd, self->sup_readfds);
+ FD_CLR(ser->ser_wait->fd, self->sup_writefds);
- if (n < N) {
- assert(reverses[N] > 0);
- assert(indices[reverses[N]] == N);
-
- indices[reverses[N]] = n;
- reverses[n] = reverses[N];
-
- self->sup_waits[n] = self->sup_waits[N];
- self->sup_wait_cbs[n] = self->sup_wait_cbs[N];
- self->sup_wait_args[n] = self->sup_wait_args[N];
- self->sup_wait_roots[n] = self->sup_wait_roots[N];
- n = N;
- }
+ if (ser->ser_wait->fd + 1 >= self->sup_maxfd)
+ self->sup_maxfd = 0;
- reverses[n] = -1;
- memset(&self->sup_waits[n], 0, sizeof self->sup_waits[n]);
- self->sup_wait_cbs[n] = NULL;
- self->sup_wait_args[n] = NULL;
- self->sup_wait_roots[n] = NULL;
-
- indices[i] = indices[0];
- indices[0] = -i;
+ memset(ser, 0, sizeof *ser);
+ ser->ser_id = i;
+ ser->ser_next = indices[0], indices[0] = ser;
+ self->sup_n_registrations--;
self->sup_registers++;
return i;
@@ -383,9 +361,9 @@
/** Unregister a su_wait_t object.
*
- * The function su_select_port_unregister() unregisters a su_wait_t object. The
- * wait object, a callback function and a argument are removed from the
- * port object.
+ * The function su_select_port_unregister() unregisters a su_wait_t object.
+ * The registration defined by the wait object, the callback function and
+ * the argument pointer are removed from the port object.
*
* @param self - pointer to port object
* @param root - pointer to root object
@@ -399,22 +377,27 @@
* @return Nonzero index of the wait object, or -1 upon an error.
*/
int su_select_port_unregister(su_port_t *self,
- su_root_t *root,
- su_wait_t *wait,
- su_wakeup_f callback, /* XXX - ignored */
- su_wakeup_arg_t *arg)
+ su_root_t *root,
+ su_wait_t *wait,
+ su_wakeup_f callback, /* XXX - ignored */
+ su_wakeup_arg_t *arg)
{
- int n, N;
+ int i, I;
+
+ struct su_select_register *ser;
assert(self);
assert(su_port_own_thread(self));
- N = self->sup_n_waits;
+ I = self->sup_max_index;
- for (n = 0; n < N; n++) {
- if (SU_WAIT_CMP(wait[0], self->sup_waits[n]) == 0) {
- return su_select_port_deregister0(self, self->sup_reverses[n], 0);
- }
+ for (i = 1; i <= I; i++) {
+ ser = self->sup_indices[i];
+
+ if (ser->ser_cb &&
+ arg == ser->ser_arg &&
+ SU_WAIT_CMP(wait[0], ser->ser_wait[0]) == 0)
+ return su_select_port_deregister0(self, ser->ser_id, 0);
}
su_seterrno(ENOENT);
@@ -435,100 +418,56 @@
*/
int su_select_port_deregister(su_port_t *self, int i)
{
- su_wait_t wait[1] = { SU_WAIT_INIT };
- int retval;
+ struct su_select_register *ser;
- assert(self);
- assert(su_port_own_thread(self));
-
- if (i <= 0 || i > self->sup_size_waits)
+ if (i <= 0 || i > self->sup_max_index)
return su_seterrno(EBADF);
- if (self->sup_indices[i] < 0)
+ ser = self->sup_indices[i];
+ if (!ser->ser_cb)
return su_seterrno(EBADF);
-
- retval = su_select_port_deregister0(self, i, 1);
-
- su_wait_destroy(wait);
- return retval;
+ return su_select_port_deregister0(self, i, 1);
}
/** @internal
- * Unregister all su_wait_t objects.
+ * Unregister all su_wait_t objects of given su_root_t instance.
*
- * The function su_select_port_unregister_all() unregisters all su_wait_t objects
- * and destroys all queued timers associated with given root object.
+ * The function su_select_port_unregister_all() unregisters all su_wait_t
+ * objects associated with given root object.
*
* @param self - pointer to port object
* @param root - pointer to root object
*
* @return Number of wait objects removed.
*/
-int su_select_port_unregister_all(su_port_t *self,
- su_root_t *root)
+int su_select_port_unregister_all(su_port_t *self, su_root_t *root)
{
- int i, j, index, N;
- int *indices, *reverses;
- su_wait_t *waits;
- su_wakeup_f *wait_cbs;
- su_wakeup_arg_t**wait_args;
- su_root_t **wait_roots;
+ int i, I, n;
- assert(su_port_own_thread(self));
+ struct su_select_register *ser;
- N = self->sup_n_waits;
- indices = self->sup_indices;
- reverses = self->sup_reverses;
- waits = self->sup_waits;
- wait_cbs = self->sup_wait_cbs;
- wait_args = self->sup_wait_args;
- wait_roots = self->sup_wait_roots;
-
- for (i = j = 0; i < N; i++) {
- index = reverses[i]; assert(index > 0 && indices[index] == i);
+ assert(self); assert(root);
+ assert(su_port_own_thread(self));
- if (wait_roots[i] == root) {
- /* XXX - we should free all resources associated with this, too */
- if (i < self->sup_pri_offset)
- self->sup_pri_offset--;
+ I = self->sup_max_index;
- indices[index] = indices[0];
- indices[0] = -index;
+ for (i = 1, n = 0; i <= I; i++) {
+ ser = self->sup_indices[i];
+ if (ser->ser_root != root)
continue;
- }
-
- if (i != j) {
- indices[index] = j;
- reverses[j] = reverses[i];
- waits[j] = waits[i];
- wait_cbs[j] = wait_cbs[i];
- wait_args[j] = wait_args[i];
- wait_roots[j] = wait_roots[i];
- }
-
- j++;
- }
-
- for (i = j; i < N; i++) {
- reverses[i] = -1;
- wait_cbs[i] = NULL;
- wait_args[i] = NULL;
- wait_roots[i] = NULL;
+ su_select_port_deregister0(self, ser->ser_id, 0);
+ n++;
}
- memset(&waits[j], 0, (char *)&waits[N] - (char *)&waits[j]);
- self->sup_n_waits = j;
- self->sup_registers++;
-
- return N - j;
+ return n;
}
/**Set mask for a registered event. @internal
*
- * The function su_select_port_eventmask() sets the mask describing events that can
- * signal the registered callback.
+ * The function su_select_port_eventmask() sets the mask describing events
+ * that can signal the registered callback.
*
* @param port pointer to port object
* @param index registration index
@@ -538,19 +477,41 @@
* @retval 0 when successful,
* @retval -1 upon an error.
*/
-int su_select_port_eventmask(su_port_t *self, int index, int socket, int events)
+int su_select_port_eventmask(su_port_t *self,
+ int index,
+ int socket, int events)
{
- int n;
- assert(self);
- assert(su_port_own_thread(self));
+ struct su_select_register *ser;
- if (index <= 0 || index > self->sup_size_waits)
+ if (index <= 0 || index > self->sup_max_index)
return su_seterrno(EBADF);
- n = self->sup_indices[index];
- if (n < 0)
+
+ ser = self->sup_indices[index];
+ if (!ser->ser_cb)
+ return su_seterrno(EBADF);
+
+ if (self->sup_maxfd == 0)
+ su_select_port_update_maxfd(self);
+
+ if (socket >= self->sup_maxfd)
return su_seterrno(EBADF);
- return su_wait_mask(&self->sup_waits[n], socket, events);
+ if (su_wait_mask(ser->ser_wait, socket, events) < 0)
+ return -1;
+
+ assert(socket < self->sup_maxfd);
+
+ if (events & SU_WAIT_IN)
+ FD_SET(socket, self->sup_readfds);
+ else
+ FD_CLR(socket, self->sup_readfds);
+
+ if (events & SU_WAIT_OUT)
+ FD_SET(socket, self->sup_writefds);
+ else
+ FD_CLR(socket, self->sup_writefds);
+
+ return 0;
}
/** @internal Enable multishot mode.
@@ -580,7 +541,7 @@
/** @internal
- * Wait (select()) for wait objects in port.
+ * Wait (poll()) for wait objects in port.
*
* @param self pointer to port
* @param tout timeout in milliseconds
@@ -590,78 +551,107 @@
static
int su_select_port_wait_events(su_port_t *self, su_duration_t tout)
{
- /* NOT IMPLEMENTED */
- (void)su_select_port_deinit;
+ int j, n, events = 0;
+ unsigned version = self->sup_registers;
+ size_t bytes;
+ struct timeval tv;
+ fd_set *rset = NULL, *wset = NULL;
+
+ if (self->sup_maxfd == 0)
+ su_select_port_update_maxfd(self);
+
+ bytes = self->sup_maxfd ? FDSETSIZE(self->sup_maxfd - 1) : 0;
+
+ if (bytes) {
+ rset = memcpy(self->sup_readfds2, self->sup_readfds, bytes);
+ wset = memcpy(self->sup_writefds2, self->sup_writefds, bytes);
+ }
+
+ tv.tv_sec = tout / 1000;
+ tv.tv_usec = (tout % 1000) * 1000;
+
+ n = select(self->sup_maxfd, rset, wset, NULL, &tv);
+
+ if (n <= 0) {
+ SU_DEBUG_0(("su_select_port_wait_events(%p): %s (%d)\n",
+ (void *)self, su_strerror(su_errno()), su_errno()));
+ return 0;
+ }
- return -1;
-}
+ for (j = 1; j < self->sup_max_index; j++) {
+ struct su_select_register *ser;
+ su_root_magic_t *magic;
+ int fd;
-#if 0
-/** @internal
- * Prints out the contents of the port.
- *
- * @param self pointer to a port
- * @param f pointer to a file (if @c NULL, uses @c stdout).
- */
-void su_port_dump(su_port_t const *self, FILE *f)
-{
- int i;
-#define IS_WAIT_IN(x) (((x)->events & SU_WAIT_IN) ? "IN" : "")
-#define IS_WAIT_OUT(x) (((x)->events & SU_WAIT_OUT) ? "OUT" : "")
-#define IS_WAIT_ACCEPT(x) (((x)->events & SU_WAIT_ACCEPT) ? "ACCEPT" : "")
-
- if (f == NULL)
- f = stdout;
-
- fprintf(f, "su_port_t at %p:\n", self);
- fprintf(f, "\tport is%s running\n", self->sup_running ? "" : "not ");
-#if SU_HAVE_PTHREADS
- fprintf(f, "\tport tid %p\n", (void *)self->sup_tid);
- fprintf(f, "\tport mbox %d (%s%s%s)\n", self->sup_mbox[0],
- IS_WAIT_IN(&self->sup_mbox_wait),
- IS_WAIT_OUT(&self->sup_mbox_wait),
- IS_WAIT_ACCEPT(&self->sup_mbox_wait));
-#endif
- fprintf(f, "\t%d wait objects\n", self->sup_n_waits);
- for (i = 0; i < self->sup_n_waits; i++) {
-
- }
-}
+ ser = self->sup_indices[j];
+ if (!ser->ser_cb)
+ continue;
-#endif
+ fd = ser->ser_wait->fd;
+ ser->ser_wait->revents = 0;
+
+ if (ser->ser_wait->events & SU_WAIT_IN)
+ if (FD_ISSET(fd, rset)) ser->ser_wait->revents |= SU_WAIT_IN, n--;
+ if (ser->ser_wait->events & SU_WAIT_OUT)
+ if (FD_ISSET(fd, wset)) ser->ser_wait->revents |= SU_WAIT_OUT, n--;
+
+ if (ser->ser_wait->revents) {
+ magic = ser->ser_root ? su_root_magic(ser->ser_root) : NULL;
+ ser->ser_cb(magic, ser->ser_wait, ser->ser_arg);
+ events++;
+ if (version != self->sup_registers)
+ /* Callback function used su_register()/su_deregister() */
+ return events;
+ if (!self->sup_multishot)
+ /* Callback function used su_register()/su_deregister() */
+ return events;
+ }
-/** Create a port using select().
+ if (n == 0)
+ break;
+ }
+
+ assert(n == 0);
+
+ return events;
+}
+
+/** Create a port using epoll() or poll().
*/
su_port_t *su_select_port_create(void)
{
-#if notyet
- su_port_t *self = su_home_new(sizeof *self);
+ su_port_t *self;
+ self = su_home_new(sizeof *self);
if (!self)
- return self;
+ return NULL;
- if (su_home_destructor(su_port_home(self), su_select_port_deinit) < 0)
- return su_home_unref(su_port_home(self)), NULL;
+ if (su_home_destructor(su_port_home(self), su_select_port_deinit) < 0 ||
+ !(self->sup_indices =
+ su_zalloc(su_port_home(self),
+ (sizeof self->sup_indices[0]) *
+ (self->sup_size_indices = __NFDBITS)))) {
+ su_home_unref(su_port_home(self));
+ return NULL;
+ }
self->sup_multishot = SU_ENABLE_MULTISHOT_POLL;
- if (su_pthread_port_init(self, su_select_port_vtable) < 0)
+ if (su_socket_port_init(self->sup_base, su_select_port_vtable) < 0)
return su_home_unref(su_port_home(self)), NULL;
return self;
-#else
- return NULL;
-#endif
}
int su_select_clone_start(su_root_t *parent,
- su_clone_r return_clone,
- su_root_magic_t *magic,
- su_root_init_f init,
- su_root_deinit_f deinit)
+ su_clone_r return_clone,
+ su_root_magic_t *magic,
+ su_root_init_f init,
+ su_root_deinit_f deinit)
{
return su_pthreaded_port_start(su_select_port_create,
parent, return_clone, magic, init, deinit);
}
+
#endif
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_timer.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_timer.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_timer.c Fri Feb 9 12:32:17 2007
@@ -193,7 +193,10 @@
IS_RED, SET_RED, IS_BLACK, SET_BLACK, COPY_COLOR,
CMP, INSERT, REMOVE);
-/** Set the timer. */
+/**@internal Set the timer.
+ *
+ * @retval 0 when successful (always)
+ */
static inline int
su_timer_set0(su_timer_t **timers,
su_timer_t *t,
@@ -212,7 +215,10 @@
return timers_append(timers, t);
}
-/** Reset the timer. */
+/**@internal Reset the timer.
+ *
+ * @retval 0 when successful (always)
+ */
static inline int
su_timer_reset0(su_timer_t **timers,
su_timer_t *t)
@@ -229,6 +235,40 @@
return 0;
}
+/**@internal Validate timer @a t and return pointer to per-port timer tree.
+ *
+ * @retval pointer to pointer to timer tree when successful
+ * @retval NULL upon an error
+ */
+static
+su_timer_t **su_timer_tree(su_timer_t const *t,
+ int use_sut_duration,
+ char const *caller)
+{
+ su_timer_t **timers;
+
+ if (t == NULL) {
+ SU_DEBUG_1(("%s(%p): %s\n", caller, (void *)t,
+ "NULL argument"));
+ return NULL;
+ }
+
+ timers = su_task_timers(t->sut_task);
+
+ if (timers == NULL)
+ SU_DEBUG_1(("%s(%p): %s\n", caller, (void *)t,
+ "invalid timer"));
+
+ if (use_sut_duration && t->sut_duration == 0) {
+ assert(t->sut_duration > 0);
+ SU_DEBUG_1(("%s(%p): %s\n", caller, (void *)t,
+ "timer without default duration"));
+ return NULL;
+ }
+
+ return timers;
+}
+
/**Create a timer.
*
@@ -291,23 +331,12 @@
su_timer_arg_t *arg,
su_duration_t interval)
{
- char const *func = "su_timer_set_interval";
- su_timer_t **timers;
+ su_timer_t **timers = su_timer_tree(t, 0, "su_timer_set_interval");
- if (t == NULL) {
- SU_DEBUG_1(("%s(%p): %s\n", func, (void *)t, "NULL argument"));
+ if (t == NULL)
return -1;
- }
- timers = su_task_timers(t->sut_task);
- if (timers == NULL) {
- SU_DEBUG_1(("%s(%p): %s\n", func, (void *)t, "invalid timer"));
- return -1;
- }
-
- su_timer_set0(timers, t, wakeup, arg, su_now(), interval);
-
- return 0;
+ return su_timer_set0(timers, t, wakeup, arg, su_now(), interval);
}
/** Set the timer for the default interval.
@@ -326,19 +355,12 @@
su_timer_f wakeup,
su_timer_arg_t *arg)
{
- char const *func = "su_timer_set";
-
- if (t == NULL)
- return -1;
+ su_timer_t **timers = su_timer_tree(t, 1, "su_timer_set");
- assert(t->sut_duration > 0);
- if (t->sut_duration == 0) {
- SU_DEBUG_0(("%s(%p): %s\n", func, (void *)t,
- "timer without default duration"));
+ if (timers == NULL)
return -1;
- }
- return su_timer_set_interval(t, wakeup, arg, t->sut_duration);
+ return su_timer_set0(timers, t, wakeup, arg, su_now(), t->sut_duration);
}
/** Set timer at known time.
@@ -357,23 +379,12 @@
su_wakeup_arg_t *arg,
su_time_t when)
{
- char const *func = "su_timer_set_at";
- su_timer_t **timers;
-
- if (t == NULL) {
- SU_DEBUG_1(("%s(%p): %s\n", func, (void *)t, "NULL argument"));
- return -1;
- }
+ su_timer_t **timers = su_timer_tree(t, 0, "su_timer_set_at");
- timers = su_task_timers(t->sut_task);
- if (timers == NULL) {
- SU_DEBUG_1(("%s(%p): %s\n", func, (void *)t, "invalid timer"));
+ if (timers == NULL)
return -1;
- }
-
- su_timer_set0(timers, t, wakeup, arg, when, 0);
- return 0;
+ return su_timer_set0(timers, t, wakeup, arg, when, 0);
}
/** Set the timer for regular intervals.
@@ -398,35 +409,17 @@
su_timer_f wakeup,
su_timer_arg_t *arg)
{
- char const *func = "su_timer_run";
- su_timer_t **timers;
- su_time_t now = su_now();
+ su_timer_t **timers = su_timer_tree(t, 1, "su_timer_run");
+ su_time_t now;
- if (t == NULL) {
- SU_DEBUG_1(("%s(%p): %s\n", func, (void *)t, "NULL argument"));
+ if (timers == NULL)
return -1;
- }
-
- assert(t->sut_duration > 0);
- if (t->sut_duration == 0) {
- SU_DEBUG_1(("%s(%p): %s\n", func, (void *)t,
- "timer without default duration"));
- return -1;
- }
-
- timers = su_task_timers(t->sut_task);
- if (timers == NULL) {
- SU_DEBUG_1(("%s(%p): %s\n", func, (void *)t, "invalid timer"));
- return -1;
- }
t->sut_running = run_at_intervals;
- t->sut_run = now;
+ t->sut_run = now = su_now();
t->sut_woken = 0;
- su_timer_set0(timers, t, wakeup, arg, now, t->sut_duration);
-
- return 0;
+ return su_timer_set0(timers, t, wakeup, arg, now, t->sut_duration);
}
/**Set the timer for regular intervals.
@@ -449,35 +442,17 @@
su_timer_f wakeup,
su_timer_arg_t *arg)
{
- char const *func = "su_timer_set_for_ever";
- su_timer_t **timers;
- su_time_t now = su_now();
+ su_timer_t **timers = su_timer_tree(t, 1, "su_timer_set_for_ever");
+ su_time_t now;
- if (t == NULL) {
- SU_DEBUG_1(("%s(%p): %s\n", func, (void *)t, "NULL argument"));
+ if (timers == NULL)
return -1;
- }
-
- assert(t->sut_duration > 0);
- if (t->sut_duration == 0) {
- SU_DEBUG_1(("%s(%p): %s\n", func, (void *)t,
- "timer without default duration"));
- return -1;
- }
-
- timers = su_task_timers(t->sut_task);
- if (timers == NULL) {
- SU_DEBUG_1(("%s(%p): %s\n", func, (void *)t, "invalid timer"));
- return -1;
- }
t->sut_running = run_for_ever;
- t->sut_run = now;
+ t->sut_run = now = su_now();
t->sut_woken = 0;
- su_timer_set0(timers, t, wakeup, arg, now, t->sut_duration);
-
- return 0;
+ return su_timer_set0(timers, t, wakeup, arg, now, t->sut_duration);
}
/**Reset the timer.
@@ -490,19 +465,12 @@
*/
int su_timer_reset(su_timer_t *t)
{
- char const *func = "su_timer_reset";
- su_timer_t **timers;
+ su_timer_t **timers = su_timer_tree(t, 0, "su_timer_reset");
- if (t == NULL) {
- SU_DEBUG_1(("%s(%p): %s\n", func, (void *)t, "NULL argument"));
+ if (timers == NULL)
return -1;
- }
- timers = su_task_timers(t->sut_task);
-
- su_timer_reset0(timers, t);
-
- return 0;
+ return su_timer_reset0(timers, t);
}
/** @internal Check for expired timers in queue.
@@ -576,6 +544,7 @@
}
+/** Calculate duration in milliseconds until next timer expires. */
su_duration_t su_timer_next_expires(su_timer_t const * t, su_time_t now)
{
su_duration_t tout;
@@ -625,14 +594,13 @@
/** Get the root object owning the timer.
*
- * The function su_timer_root() return pointer to the root object owning the
- * timer.
+ * Return pointer to the root object owning the timer.
*
* @param t pointer to the timer
*
- * @return Pointer to the root object owning the timer.
+ * @return Pointer to the root object.
*/
su_root_t *su_timer_root(su_timer_t const *t)
{
- return su_task_root(t->sut_task);
+ return t ? su_task_root(t->sut_task) : NULL;
}
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_win32_port.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_win32_port.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_win32_port.c Fri Feb 9 12:32:17 2007
@@ -23,19 +23,24 @@
*/
/**@ingroup su_wait
- * @CFILE su_poll_port.c
+ * @CFILE su_win32_port.c
*
- * Port implementation using poll()
+ * Port implementation using WSAEVENTs
*
* @author Pekka Pessi <Pekka.Pessi(a)nokia.com>
* @author Kai Vehmanen <kai.vehmanen(a)nokia.com>
*
- * @date Created: Tue Sep 14 15:51:04 1999 ppessi
+ * @date Created: Mon Feb 5 20:29:21 2007 ppessi
+ * @date Original: Tue Sep 14 15:51:04 1999 ppessi
*/
#include "config.h"
-#if HAVE_POLL || HAVE_WIN32
+#define su_port_s su_wsaevent_port_s
+
+#include "sofia-sip/su.h"
+#include "su_port.h"
+#include "sofia-sip/su_alloc.h"
#include <stdlib.h>
#include <assert.h>
@@ -45,18 +50,14 @@
#include <limits.h>
#include <errno.h>
-#define su_port_s su_poll_port_s
+/** Port based on su_wait() aka WSAWaitForMultipleEvents. */
-#include "sofia-sip/su.h"
-#include "su_port.h"
-#include "sofia-sip/su_alloc.h"
-
-/** Port based on poll(). */
+#define INDEX_MAX (64)
-struct su_poll_port_s {
- su_pthread_port_t sup_base[1];
+struct su_wsaevent_port_s {
+ su_socket_port_t sup_base[1];
-#define sup_home sup_base->sup_base->sup_home
+#define sup_home sup_base->sup_base->sup_base->sup_home
unsigned sup_multishot; /**< Multishot operation? */
@@ -69,13 +70,6 @@
int sup_size_waits; /**< Size of allocated su_waits */
int sup_pri_offset; /**< Offset to prioritized waits */
-#if !SU_HAVE_WINSOCK
-#define INDEX_MAX (0x7fffffff)
-#else
- /* We use WSAWaitForMultipleEvents() */
-#define INDEX_MAX (64)
-#endif
-
/** Indices from index returned by su_root_register() to tables below.
*
* Free elements are negative. Free elements form a list, value of free
@@ -93,43 +87,43 @@
};
-static void su_poll_port_decref(su_port_t *, int blocking, char const *who);
+static void su_wsevent_port_decref(su_port_t *, int blocking, char const *who);
-static int su_poll_port_register(su_port_t *self,
+static int su_wsevent_port_register(su_port_t *self,
su_root_t *root,
su_wait_t *wait,
su_wakeup_f callback,
su_wakeup_arg_t *arg,
int priority);
-static int su_poll_port_unregister(su_port_t *port,
+static int su_wsevent_port_unregister(su_port_t *port,
su_root_t *root,
su_wait_t *wait,
su_wakeup_f callback,
su_wakeup_arg_t *arg);
-static int su_poll_port_deregister(su_port_t *self, int i);
-static int su_poll_port_unregister_all(su_port_t *self, su_root_t *root);
-static int su_poll_port_eventmask(su_port_t *self,
+static int su_wsevent_port_deregister(su_port_t *self, int i);
+static int su_wsevent_port_unregister_all(su_port_t *self, su_root_t *root);
+static int su_wsevent_port_eventmask(su_port_t *self,
int index,
int socket,
int events);
-static int su_poll_port_multishot(su_port_t *self, int multishot);
-static int su_poll_port_wait_events(su_port_t *self, su_duration_t tout);
-static char const *su_poll_port_name(su_port_t const *self);
+static int su_wsevent_port_multishot(su_port_t *self, int multishot);
+static int su_wsevent_port_wait_events(su_port_t *self, su_duration_t tout);
+static char const *su_wsevent_port_name(su_port_t const *self);
-su_port_vtable_t const su_poll_port_vtable[1] =
+su_port_vtable_t const su_wsevent_port_vtable[1] =
{{
- /* su_vtable_size: */ sizeof su_poll_port_vtable,
+ /* su_vtable_size: */ sizeof su_wsevent_port_vtable,
su_pthread_port_lock,
su_pthread_port_unlock,
su_base_port_incref,
- su_poll_port_decref,
+ su_wsevent_port_decref,
su_base_port_gsource,
- su_pthread_port_send,
- su_poll_port_register,
- su_poll_port_unregister,
- su_poll_port_deregister,
- su_poll_port_unregister_all,
- su_poll_port_eventmask,
+ su_socket_port_send,
+ su_wsevent_port_register,
+ su_wsevent_port_unregister,
+ su_wsevent_port_deregister,
+ su_wsevent_port_unregister_all,
+ su_wsevent_port_eventmask,
su_base_port_run,
su_base_port_break,
su_base_port_step,
@@ -137,33 +131,33 @@
su_base_port_add_prepoll,
su_base_port_remove_prepoll,
su_base_port_timers,
- su_poll_port_multishot,
+ su_wsevent_port_multishot,
su_base_port_threadsafe,
su_base_port_yield,
- su_poll_port_wait_events,
+ su_wsevent_port_wait_events,
su_base_port_getmsgs,
su_base_port_getmsgs_from,
- su_poll_port_name,
+ su_wsevent_port_name,
su_base_port_start_shared,
su_pthread_port_wait,
su_pthread_port_execute,
}};
-static char const *su_poll_port_name(su_port_t const *self)
+static char const *su_wsevent_port_name(su_port_t const *self)
{
return "poll";
}
-static void su_poll_port_deinit(void *arg)
+static void su_wsevent_port_deinit(void *arg)
{
su_port_t *self = arg;
- SU_DEBUG_9(("%s(%p) called\n", "su_poll_port_deinit", self));
+ SU_DEBUG_9(("%s(%p) called\n", "su_wsevent_port_deinit", self));
- su_pthread_port_deinit(self);
+ su_socket_port_deinit(self->sup_base);
}
-static void su_poll_port_decref(su_port_t *self, int blocking, char const *who)
+static void su_wsevent_port_decref(su_port_t *self, int blocking, char const *who)
{
su_base_port_decref(self, blocking, who);
}
@@ -189,7 +183,7 @@
* Positive index of the wait object,
* or -1 upon an error.
*/
-int su_poll_port_register(su_port_t *self,
+int su_wsevent_port_register(su_port_t *self,
su_root_t *root,
su_wait_t *wait,
su_wakeup_f callback,
@@ -311,7 +305,7 @@
}
/** Deregister a su_wait_t object. */
-static int su_poll_port_deregister0(su_port_t *self, int i, int destroy_wait)
+static int su_wsevent_port_deregister0(su_port_t *self, int i, int destroy_wait)
{
int n, N, *indices, *reverses;
@@ -372,9 +366,8 @@
/** Unregister a su_wait_t object.
*
- * The function su_poll_port_unregister() unregisters a su_wait_t object. The
- * wait object, a callback function and a argument are removed from the
- * port object.
+ * Unregisters a su_wait_t object. The wait object, a callback function and
+ * a argument are removed from the port object.
*
* @param self - pointer to port object
* @param root - pointer to root object
@@ -383,11 +376,11 @@
* @param arg - argument given to callback function when it is invoked
* (may be NULL)
*
- * @deprecated Use su_poll_port_deregister() instead.
+ * @deprecated Use su_wsevent_port_deregister() instead.
*
* @return Nonzero index of the wait object, or -1 upon an error.
*/
-int su_poll_port_unregister(su_port_t *self,
+int su_wsevent_port_unregister(su_port_t *self,
su_root_t *root,
su_wait_t *wait,
su_wakeup_f callback, /* XXX - ignored */
@@ -402,7 +395,7 @@
for (n = 0; n < N; n++) {
if (SU_WAIT_CMP(wait[0], self->sup_waits[n]) == 0) {
- return su_poll_port_deregister0(self, self->sup_reverses[n], 0);
+ return su_wsevent_port_deregister0(self, self->sup_reverses[n], 0);
}
}
@@ -422,7 +415,7 @@
*
* @return Index of the wait object, or -1 upon an error.
*/
-int su_poll_port_deregister(su_port_t *self, int i)
+int su_wsevent_port_deregister(su_port_t *self, int i)
{
su_wait_t wait[1] = { SU_WAIT_INIT };
int retval;
@@ -436,7 +429,7 @@
if (self->sup_indices[i] < 0)
return su_seterrno(EBADF);
- retval = su_poll_port_deregister0(self, i, 1);
+ retval = su_wsevent_port_deregister0(self, i, 1);
su_wait_destroy(wait);
@@ -447,15 +440,15 @@
/** @internal
* Unregister all su_wait_t objects.
*
- * The function su_poll_port_unregister_all() unregisters all su_wait_t objects
- * and destroys all queued timers associated with given root object.
+ * Unregisters all su_wait_t objects and destroys all queued timers
+ * associated with given root object.
*
* @param self - pointer to port object
* @param root - pointer to root object
*
* @return Number of wait objects removed.
*/
-int su_poll_port_unregister_all(su_port_t *self,
+int su_wsevent_port_unregister_all(su_port_t *self,
su_root_t *root)
{
int i, j, index, N;
@@ -516,8 +509,7 @@
/**Set mask for a registered event. @internal
*
- * The function su_poll_port_eventmask() sets the mask describing events that can
- * signal the registered callback.
+ * Sets the mask describing events that can signal the registered callback.
*
* @param port pointer to port object
* @param index registration index
@@ -527,7 +519,7 @@
* @retval 0 when successful,
* @retval -1 upon an error.
*/
-int su_poll_port_eventmask(su_port_t *self, int index, int socket, int events)
+int su_wsevent_port_eventmask(su_port_t *self, int index, int socket, int events)
{
int n;
assert(self);
@@ -557,7 +549,7 @@
* @retval -1 an error occurred
*/
static
-int su_poll_port_multishot(su_port_t *self, int multishot)
+int su_wsevent_port_multishot(su_port_t *self, int multishot)
{
if (multishot < 0)
return self->sup_multishot;
@@ -577,7 +569,7 @@
* @return number of events handled
*/
static
-int su_poll_port_wait_events(su_port_t *self, su_duration_t tout)
+int su_wsevent_port_wait_events(su_port_t *self, su_duration_t tout)
{
int i, events = 0;
su_wait_t *waits = self->sup_waits;
@@ -620,68 +612,32 @@
return events;
}
-#if 0
-/** @internal
- * Prints out the contents of the port.
- *
- * @param self pointer to a port
- * @param f pointer to a file (if @c NULL, uses @c stdout).
- */
-void su_port_dump(su_port_t const *self, FILE *f)
-{
- int i;
-#define IS_WAIT_IN(x) (((x)->events & SU_WAIT_IN) ? "IN" : "")
-#define IS_WAIT_OUT(x) (((x)->events & SU_WAIT_OUT) ? "OUT" : "")
-#define IS_WAIT_ACCEPT(x) (((x)->events & SU_WAIT_ACCEPT) ? "ACCEPT" : "")
-
- if (f == NULL)
- f = stdout;
-
- fprintf(f, "su_port_t at %p:\n", self);
- fprintf(f, "\tport is%s running\n", self->sup_running ? "" : "not ");
-#if SU_HAVE_PTHREADS
- fprintf(f, "\tport tid %p\n", (void *)self->sup_tid);
- fprintf(f, "\tport mbox %d (%s%s%s)\n", self->sup_mbox[0],
- IS_WAIT_IN(&self->sup_mbox_wait),
- IS_WAIT_OUT(&self->sup_mbox_wait),
- IS_WAIT_ACCEPT(&self->sup_mbox_wait));
-#endif
- fprintf(f, "\t%d wait objects\n", self->sup_n_waits);
- for (i = 0; i < self->sup_n_waits; i++) {
-
- }
-}
-
-#endif
-
-/** Create a port using epoll() or poll().
- */
-su_port_t *su_poll_port_create(void)
+/** Create a port using WSAEVENTs and WSAWaitForMultipleEvents. */
+su_port_t *su_wsaevent_port_create(void)
{
su_port_t *self = su_home_new(sizeof *self);
if (!self)
return self;
- if (su_home_destructor(su_port_home(self), su_poll_port_deinit) < 0)
+ if (su_home_destructor(su_port_home(self), su_wsevent_port_deinit) < 0)
return su_home_unref(su_port_home(self)), NULL;
self->sup_multishot = SU_ENABLE_MULTISHOT_POLL;
- if (su_pthread_port_init(self, su_poll_port_vtable) < 0)
+ if (su_socket_port_init(self->sup_base, su_wsevent_port_vtable) < 0)
return su_home_unref(su_port_home(self)), NULL;
return self;
}
-int su_poll_clone_start(su_root_t *parent,
- su_clone_r return_clone,
- su_root_magic_t *magic,
- su_root_init_f init,
- su_root_deinit_f deinit)
+int su_wsaevent_clone_start(su_root_t *parent,
+ su_clone_r return_clone,
+ su_root_magic_t *magic,
+ su_root_init_f init,
+ su_root_deinit_f deinit)
{
- return su_pthreaded_port_start(su_poll_port_create,
+ return su_pthreaded_port_start(su_wsaevent_port_create,
parent, return_clone, magic, init, deinit);
}
-#endif /* HAVE_POLL */
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_su.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_su.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_su.c Fri Feb 9 12:32:17 2007
@@ -100,7 +100,7 @@
TEST(su_setblocking(s, 1), 0);
TEST(su_close(s), 0);
- su_freelocalinfo(res);
+ su_freelocalinfo(res), res = NULL;
#if SU_HAVE_IN6
hints->li_family = AF_INET6;
@@ -111,16 +111,17 @@
for (li = res; li; li = li->li_next)
TEST(li->li_family, AF_INET6);
- su_freelocalinfo(res);
+ su_freelocalinfo(res), res = NULL;
#endif
hints->li_flags |= LI_NUMERIC;
TEST(su_getlocalinfo(hints, &res), 0);
+ su_freelocalinfo(res), res = NULL;
- hints->li_flags |= LI_NAMEREQD;
res = NULL;
+ hints->li_flags |= LI_NAMEREQD;
su_getlocalinfo(hints, &res);
- su_freelocalinfo(res);
+ su_freelocalinfo(res), res = NULL;
memset(a, 0, sizeof *a);
memset(b, 0, sizeof *b);
@@ -161,7 +162,7 @@
int test_sendrecv(void)
{
- int s, l, a;
+ su_socket_t s, l, a;
int n;
su_sockaddr_t su, csu;
socklen_t sulen = sizeof su.su_sin, csulen = sizeof csu.su_sin;
@@ -260,6 +261,120 @@
END();
}
+#if HAVE_SELECT
+
+#if HAVE_WIN32
+int test_select(void)
+{
+ return 0;
+}
+#else
+
+#if HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#elif HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+
+#include <sys/types.h>
+#include <unistd.h>
+
+#ifndef __NFDBITS
+#define __NFDBITS (8 * sizeof (long int))
+#endif
+
+#undef howmany
+/* Size of fd set in bytes. Sorry, octets. */
+#define howmany(n) (((n) + __NFDBITS - 1) / __NFDBITS * (__NFDBITS / 8))
+
+#define FD_ZERO_TO(maxfd, set) \
+ memset((set), 0, howmany(maxfd))
+
+/* Test assumptions in su_select_port implementation */
+int test_select(void)
+{
+ su_socket_t s;
+ su_sockaddr_t su;
+ socklen_t sulen = sizeof su.su_sin;
+ size_t bytes;
+ fd_set *rset, *wset;
+ struct timeval tv;
+
+ BEGIN();
+
+ s = su_socket(AF_INET, SOCK_DGRAM, 0); TEST_1(s != -1);
+
+ memset(&su, 0, sulen);
+ su.su_len = sulen;
+ su.su_family = AF_INET;
+ TEST(inet_pton(AF_INET, "127.0.0.1", &su.su_sin.sin_addr), 1);
+ TEST(bind(s, &su.su_sa, sulen), 0);
+ TEST(getsockname(s, &su.su_sa, &sulen), 0);
+
+ tv.tv_sec = 0; tv.tv_usec = 1000;
+ TEST(select(0, NULL, NULL, NULL, &tv), 0);
+
+ bytes = howmany(s);
+ TEST_1(rset = malloc(bytes));
+ TEST_1(wset = malloc(bytes));
+
+ FD_ZERO_TO(s, rset); FD_ZERO_TO(s, wset); FD_SET(s, wset);
+ tv.tv_sec = 0, tv.tv_usec = 1000;
+ TEST(select(s + 1, NULL, wset, NULL, &tv), 1);
+ TEST_1(FD_ISSET(s, wset));
+
+ FD_ZERO_TO(s, rset); FD_ZERO_TO(s, wset);
+ FD_SET(s, rset); FD_SET(s, wset);
+ tv.tv_sec = 0, tv.tv_usec = 1000;
+ TEST(select(s + 1, rset, wset, NULL, &tv), 1);
+ TEST_1(!FD_ISSET(s, rset));
+ TEST_1(FD_ISSET(s, wset));
+
+ FD_ZERO_TO(s, rset); FD_ZERO_TO(s, wset);
+ FD_SET(s, rset); FD_SET(s, wset);
+ tv.tv_sec = 0, tv.tv_usec = 1000;
+ TEST(select(s + 1, rset, NULL, NULL, &tv), 0);
+ TEST_1(!FD_ISSET(s, rset));
+
+ FD_ZERO_TO(s, rset); FD_ZERO_TO(s, wset);
+ FD_SET(s, rset); FD_CLR(s, wset);
+ tv.tv_sec = 0, tv.tv_usec = 1000;
+ TEST(select(s + 1, rset, wset, NULL, &tv), 0);
+ TEST_1(!FD_ISSET(s, rset));
+ TEST_1(!FD_ISSET(s, wset));
+
+ TEST(su_sendto(s, "foo", 3, 0, &su, sulen), 3);
+
+ FD_ZERO_TO(s, rset); FD_ZERO_TO(s, wset);
+ FD_SET(s, rset); FD_CLR(s, wset);
+ tv.tv_sec = 0, tv.tv_usec = 1000;
+ TEST(select(s + 1, rset, wset, NULL, &tv), 1);
+ TEST_1(FD_ISSET(s, rset));
+ TEST_1(!FD_ISSET(s, wset));
+
+ FD_ZERO_TO(s, rset); FD_ZERO_TO(s, wset);
+ FD_SET(s, rset); FD_SET(s, wset);
+ tv.tv_sec = 0, tv.tv_usec = 1000;
+ TEST(select(s + 1, rset, wset, NULL, &tv), 2);
+ TEST_1(FD_ISSET(s, rset));
+ TEST_1(FD_ISSET(s, wset));
+
+ su_close(s);
+
+ free(wset);
+ free(rset);
+
+ END();
+}
+#endif
+
+#else
+int test_select(void)
+{
+ return 0;
+}
+#endif
+
#include <sofia-sip/su_md5.h>
int test_md5(void)
@@ -395,10 +510,10 @@
retval |= test_sockaddr();
retval |= test_sendrecv();
+ retval |= test_select();
retval |= test_md5(); fflush(stdout);
su_deinit();
return retval;
}
-
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_su_root.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_su_root.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_su_root.c Fri Feb 9 12:32:17 2007
@@ -533,10 +533,30 @@
int main(int argc, char *argv[])
{
- root_test_t rt[1] = {{{ SU_HOME_INIT(rt) }}};
+ root_test_t *rt, rt0[1] = {{{ SU_HOME_INIT(rt0) }}}, rt1[1];
int retval = 0;
int i;
+ struct {
+ su_port_create_f *create;
+ su_clone_start_f *start;
+ char const *preference;
+ } prefer[] =
+ {
+ { NULL, NULL, "default" },
+#if HAVE_POLL_PORT
+#if HAVE_EPOLL
+ { su_epoll_port_create, su_epoll_clone_start, "epoll", },
+#endif
+ { su_poll_port_create, su_poll_clone_start, "poll" },
+#endif
+#if HAVE_SELECT
+ { su_select_port_create, su_select_clone_start, "select" },
+#endif
+ { NULL, NULL }
+ };
+
+ rt = rt0;
rt->rt_family = AF_INET;
for (i = 1; argv[i]; i++) {
@@ -550,14 +570,23 @@
usage();
}
- retval |= init_test(rt);
- retval |= register_test(rt);
- retval |= event_test(rt);
- su_root_threading(rt->rt_root, 1);
- retval |= clone_test(rt);
- su_root_threading(rt->rt_root, 0);
- retval |= clone_test(rt);
- retval |= deinit_test(rt);
+ i = 0;
+
+ do {
+ rt = rt1, *rt = *rt0;
+ printf("%s: testing %s implementation\n",
+ name, prefer[i].preference);
+ su_port_prefer(prefer[i].create, prefer[i].start);
+
+ retval |= init_test(rt);
+ retval |= register_test(rt);
+ retval |= event_test(rt);
+ su_root_threading(rt->rt_root, 1);
+ retval |= clone_test(rt);
+ su_root_threading(rt->rt_root, 0);
+ retval |= clone_test(rt);
+ retval |= deinit_test(rt);
+ } while (prefer[++i].create);
return retval;
}
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport.c Fri Feb 9 12:32:17 2007
@@ -1117,7 +1117,7 @@
|| !tport_is_primary(self) || !tport_is_dgram(self);
n = tl_tgets(ta_args(ta),
- TPTAG_MTU(tpp->tpp_mtu),
+ TPTAG_MTU((usize_t)tpp->tpp_mtu),
TPTAG_REUSE(self->tp_reusable),
TPTAG_CONNECT(connect),
TPTAG_QUEUESIZE(tpp->tpp_qsize),
@@ -1153,14 +1153,16 @@
ta_list ta;
int n;
tport_params_t tpp[1], *tpp0;
-
+
+ usize_t mtu;
int connect, sdwn_error, reusable, stun_server;
-
+
if (self == NULL)
return su_seterrno(EINVAL);
memcpy(tpp, tpp0 = self->tp_params, sizeof *tpp);
+ mtu = tpp->tpp_mtu;
connect = tpp->tpp_conn_orient;
sdwn_error = tpp->tpp_sdwn_error;
reusable = self->tp_reusable;
@@ -1169,7 +1171,7 @@
ta_start(ta, tag, value);
n = tl_gets(ta_args(ta),
- TPTAG_MTU_REF(tpp->tpp_mtu),
+ TPTAG_MTU_REF(mtu),
TAG_IF(!self->tp_queue, TPTAG_QUEUESIZE_REF(tpp->tpp_qsize)),
TPTAG_IDLE_REF(tpp->tpp_idle),
TPTAG_TIMEOUT_REF(tpp->tpp_timeout),
@@ -1202,6 +1204,9 @@
if (tpp->tpp_qsize >= 1000)
tpp->tpp_qsize = 1000;
+ if (mtu > UINT_MAX)
+ mtu = UINT_MAX;
+ tpp->tpp_mtu = (unsigned)mtu;
/* Currently only primary UDP transport can *not* be connection oriented */
tpp->tpp_conn_orient = connect;
tpp->tpp_sdwn_error = sdwn_error;
Modified: freeswitch/trunk/libs/sofia-sip/win32/config.h.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/win32/config.h.in (original)
+++ freeswitch/trunk/libs/sofia-sip/win32/config.h.in Fri Feb 9 12:32:17 2007
@@ -151,8 +151,12 @@
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <iphlpapi.h> header file. */
-// XXX: vehmanek-win32-fix:
+#if _MSC_VER > 1200
+#define HAVE_IPHLPAPI_H 1
+#else
+// XXX: vehmanek-win32-fix for VC6
#undef HAVE_IPHLPAPI_H
+#endif
/* Define to 1 if you have IPV6_RECVERR in <netinet/in6.h> */
#undef HAVE_IPV6_RECVERR
@@ -224,7 +228,7 @@
#undef HAVE_POLL
/* Define to 1 if you use poll in su_port. */
-#define HAVE_POLL_PORT 1
+#undef HAVE_POLL_PORT
/* Define to 1 if you have /proc/net/if_inet6 control file */
#undef HAVE_PROC_NET_IF_INET6
Modified: freeswitch/trunk/libs/sofia-sip/win32/libsofia-sip-ua-static/libsofia_sip_ua_static.vcproj
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/win32/libsofia-sip-ua-static/libsofia_sip_ua_static.vcproj (original)
+++ freeswitch/trunk/libs/sofia-sip/win32/libsofia-sip-ua-static/libsofia_sip_ua_static.vcproj Fri Feb 9 12:32:17 2007
@@ -57,6 +57,7 @@
SuppressStartupBanner="true"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
+ CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -135,6 +136,7 @@
WarnAsError="true"
SuppressStartupBanner="true"
Detect64BitPortabilityProblems="true"
+ CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -543,6 +545,10 @@
</FileConfiguration>
</File>
<File
+ RelativePath="..\..\libsofia-sip-ua\su\su_socket_port.c"
+ >
+ </File>
+ <File
RelativePath="..\..\libsofia-sip-ua\su\su_sprintf.c"
>
<FileConfiguration
Modified: freeswitch/trunk/libs/sofia-sip/win32/libsofia-sip-ua/libsofia_sip_ua.vcproj
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/win32/libsofia-sip-ua/libsofia_sip_ua.vcproj (original)
+++ freeswitch/trunk/libs/sofia-sip/win32/libsofia-sip-ua/libsofia_sip_ua.vcproj Fri Feb 9 12:32:17 2007
@@ -63,6 +63,7 @@
SuppressStartupBanner="true"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
+ CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -77,7 +78,7 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib advapi32.lib"
+ AdditionalDependencies="ws2_32.lib advapi32.lib iphlpapi.lib"
OutputFile=".\Debug/libsofia_sip_ua.dll"
LinkIncremental="2"
SuppressStartupBanner="true"
@@ -164,6 +165,7 @@
WarnAsError="true"
SuppressStartupBanner="true"
Detect64BitPortabilityProblems="true"
+ CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -178,7 +180,7 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib"
+ AdditionalDependencies="ws2_32.lib advapi32.lib iphlpapi.lib"
OutputFile=".\Release/libsofia_sip_ua.dll"
LinkIncremental="1"
SuppressStartupBanner="true"
@@ -586,6 +588,10 @@
</FileConfiguration>
</File>
<File
+ RelativePath="..\..\libsofia-sip-ua\su\su_socket_port.c"
+ >
+ </File>
+ <File
RelativePath="..\..\libsofia-sip-ua\su\su_sprintf.c"
>
<FileConfiguration
Modified: freeswitch/trunk/libs/sofia-sip/win32/utils/localinfo/localinfo.vcproj
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/win32/utils/localinfo/localinfo.vcproj (original)
+++ freeswitch/trunk/libs/sofia-sip/win32/utils/localinfo/localinfo.vcproj Fri Feb 9 12:32:17 2007
@@ -62,6 +62,7 @@
SuppressStartupBanner="true"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
+ CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -160,6 +161,7 @@
WarnAsError="true"
SuppressStartupBanner="true"
Detect64BitPortabilityProblems="true"
+ CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
Modified: freeswitch/trunk/libs/sofia-sip/win32/utils/sip_options_static/sip_options_static.vcproj
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/win32/utils/sip_options_static/sip_options_static.vcproj (original)
+++ freeswitch/trunk/libs/sofia-sip/win32/utils/sip_options_static/sip_options_static.vcproj Fri Feb 9 12:32:17 2007
@@ -76,7 +76,7 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib"
+ AdditionalDependencies="ws2_32.lib advapi32.lib iphlpapi.lib"
OutputFile=".\Release/sip_options_static.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
@@ -173,7 +173,7 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib advapi32.lib"
+ AdditionalDependencies="ws2_32.lib advapi32.lib iphlpapi.lib"
OutputFile=".\Debug/sip_options_static.exe"
LinkIncremental="2"
SuppressStartupBanner="true"
1
0
Author: mikej
Date: Thu Feb 8 21:36:03 2007
New Revision: 4176
Modified:
freeswitch/trunk/libs/libdingaling/src/ldl_compat.h
freeswitch/trunk/libs/libdingaling/src/libdingaling.c
freeswitch/trunk/libs/libdingaling/src/libdingaling.h
freeswitch/trunk/libs/libdingaling/src/sha1.c
freeswitch/trunk/libs/libteletone/src/libteletone.h
freeswitch/trunk/libs/libteletone/src/libteletone_detect.c
freeswitch/trunk/libs/libteletone/src/libteletone_detect.h
freeswitch/trunk/libs/libteletone/src/libteletone_generate.c
freeswitch/trunk/libs/libteletone/src/libteletone_generate.h
freeswitch/trunk/src/include/switch.h
freeswitch/trunk/src/include/switch_apr.h
freeswitch/trunk/src/include/switch_buffer.h
freeswitch/trunk/src/include/switch_caller.h
freeswitch/trunk/src/include/switch_channel.h
freeswitch/trunk/src/include/switch_config.h
freeswitch/trunk/src/include/switch_console.h
freeswitch/trunk/src/include/switch_core.h
freeswitch/trunk/src/include/switch_event.h
freeswitch/trunk/src/include/switch_frame.h
freeswitch/trunk/src/include/switch_ivr.h
freeswitch/trunk/src/include/switch_loadable_module.h
freeswitch/trunk/src/include/switch_log.h
freeswitch/trunk/src/include/switch_module_interfaces.h
freeswitch/trunk/src/include/switch_platform.h
freeswitch/trunk/src/include/switch_resample.h
freeswitch/trunk/src/include/switch_rtp.h
freeswitch/trunk/src/include/switch_sqlite.h
freeswitch/trunk/src/include/switch_stun.h
freeswitch/trunk/src/include/switch_types.h
freeswitch/trunk/src/include/switch_utils.h
freeswitch/trunk/src/include/switch_xml.h
freeswitch/trunk/src/mod/applications/mod_bridgecall/mod_bridgecall.c
freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c
freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c
freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c
freeswitch/trunk/src/mod/applications/mod_echo/mod_echo.c
freeswitch/trunk/src/mod/applications/mod_ivrtest/mod_ivrtest.c
freeswitch/trunk/src/mod/applications/mod_park/mod_park.c
freeswitch/trunk/src/mod/applications/mod_playback/mod_playback.c
freeswitch/trunk/src/mod/applications/mod_rss/mod_rss.c
freeswitch/trunk/src/mod/asr_tts/mod_cepstral/mod_cepstral.c
freeswitch/trunk/src/mod/codecs/mod_g711/mod_g711.c
freeswitch/trunk/src/mod/codecs/mod_g722/mod_g722.c
freeswitch/trunk/src/mod/codecs/mod_g723_1/mod_g723_1.c
freeswitch/trunk/src/mod/codecs/mod_g726/mod_g726.c
freeswitch/trunk/src/mod/codecs/mod_g729/mod_g729.c
freeswitch/trunk/src/mod/codecs/mod_gsm/mod_gsm.c
freeswitch/trunk/src/mod/codecs/mod_ilbc/mod_ilbc.c
freeswitch/trunk/src/mod/codecs/mod_l16/mod_l16.c
freeswitch/trunk/src/mod/codecs/mod_speex/mod_speex.c
freeswitch/trunk/src/mod/dialplans/mod_dialplan_directory/mod_dialplan_directory.c
freeswitch/trunk/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c
freeswitch/trunk/src/mod/directories/mod_ldap/mod_ldap.c
freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c
freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c
freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c
freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
freeswitch/trunk/src/mod/endpoints/mod_woomera/mod_woomera.c
freeswitch/trunk/src/mod/event_handlers/mod_cdr/basecdr.cpp
freeswitch/trunk/src/mod/event_handlers/mod_cdr/basecdr.h
freeswitch/trunk/src/mod/event_handlers/mod_cdr/baseregistry.cpp
freeswitch/trunk/src/mod/event_handlers/mod_cdr/baseregistry.h
freeswitch/trunk/src/mod/event_handlers/mod_cdr/cdrcontainer.cpp
freeswitch/trunk/src/mod/event_handlers/mod_cdr/cdrcontainer.h
freeswitch/trunk/src/mod/event_handlers/mod_cdr/csvcdr.cpp
freeswitch/trunk/src/mod/event_handlers/mod_cdr/csvcdr.h
freeswitch/trunk/src/mod/event_handlers/mod_cdr/mod_cdr.cpp
freeswitch/trunk/src/mod/event_handlers/mod_cdr/mysqlcdr.cpp
freeswitch/trunk/src/mod/event_handlers/mod_cdr/mysqlcdr.h
freeswitch/trunk/src/mod/event_handlers/mod_cdr/pddcdr.cpp
freeswitch/trunk/src/mod/event_handlers/mod_cdr/pddcdr.h
freeswitch/trunk/src/mod/event_handlers/mod_cdr/xmlcdr.cpp
freeswitch/trunk/src/mod/event_handlers/mod_cdr/xmlcdr.h
freeswitch/trunk/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.c
freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c
freeswitch/trunk/src/mod/event_handlers/mod_event_test/mod_event_test.c
freeswitch/trunk/src/mod/event_handlers/mod_xmpp_event/mod_xmpp_event.c
freeswitch/trunk/src/mod/event_handlers/mod_zeroconf/mod_zeroconf.c
freeswitch/trunk/src/mod/formats/mod_native_file/mod_native_file.c
freeswitch/trunk/src/mod/formats/mod_sndfile/mod_sndfile.c
freeswitch/trunk/src/mod/languages/mod_perl/mod_perl.c
freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
freeswitch/trunk/src/mod/languages/mod_spidermonkey_core_db/mod_spidermonkey_core_db.c
freeswitch/trunk/src/mod/languages/mod_spidermonkey_etpan/mod_spidermonkey_etpan.c
freeswitch/trunk/src/mod/languages/mod_spidermonkey_odbc/mod_spidermonkey_odbc.c
freeswitch/trunk/src/mod/languages/mod_spidermonkey_teletone/mod_spidermonkey_teletone.c
freeswitch/trunk/src/mod/loggers/mod_console/mod_console.c
freeswitch/trunk/src/mod/timers/mod_softtimer/mod_softtimer.c
freeswitch/trunk/src/mod/xml_int/mod_xml_curl/mod_xml_curl.c
freeswitch/trunk/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c
freeswitch/trunk/src/switch.c
freeswitch/trunk/src/switch_buffer.c
freeswitch/trunk/src/switch_caller.c
freeswitch/trunk/src/switch_channel.c
freeswitch/trunk/src/switch_config.c
freeswitch/trunk/src/switch_console.c
freeswitch/trunk/src/switch_core.c
freeswitch/trunk/src/switch_event.c
freeswitch/trunk/src/switch_ivr.c
freeswitch/trunk/src/switch_loadable_module.c
freeswitch/trunk/src/switch_log.c
freeswitch/trunk/src/switch_resample.c
freeswitch/trunk/src/switch_rtp.c
freeswitch/trunk/src/switch_stun.c
freeswitch/trunk/src/switch_utils.c
freeswitch/trunk/src/switch_xml.c
Log:
fix magic emacs and vi formatting comments in the bottom of our source files to use tabs instead of spaces
Modified: freeswitch/trunk/libs/libdingaling/src/ldl_compat.h
==============================================================================
--- freeswitch/trunk/libs/libdingaling/src/ldl_compat.h (original)
+++ freeswitch/trunk/libs/libdingaling/src/ldl_compat.h Thu Feb 8 21:36:03 2007
@@ -65,7 +65,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/libs/libdingaling/src/libdingaling.c
==============================================================================
--- freeswitch/trunk/libs/libdingaling/src/libdingaling.c (original)
+++ freeswitch/trunk/libs/libdingaling/src/libdingaling.c Thu Feb 8 21:36:03 2007
@@ -2164,7 +2164,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/libs/libdingaling/src/libdingaling.h
==============================================================================
--- freeswitch/trunk/libs/libdingaling/src/libdingaling.h (original)
+++ freeswitch/trunk/libs/libdingaling/src/libdingaling.h Thu Feb 8 21:36:03 2007
@@ -570,7 +570,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/libs/libdingaling/src/sha1.c
==============================================================================
--- freeswitch/trunk/libs/libdingaling/src/sha1.c (original)
+++ freeswitch/trunk/libs/libdingaling/src/sha1.c Thu Feb 8 21:36:03 2007
@@ -215,7 +215,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/libs/libteletone/src/libteletone.h
==============================================================================
--- freeswitch/trunk/libs/libteletone/src/libteletone.h (original)
+++ freeswitch/trunk/libs/libteletone/src/libteletone.h Thu Feb 8 21:36:03 2007
@@ -78,7 +78,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/libs/libteletone/src/libteletone_detect.c
==============================================================================
--- freeswitch/trunk/libs/libteletone/src/libteletone_detect.c (original)
+++ freeswitch/trunk/libs/libteletone/src/libteletone_detect.c Thu Feb 8 21:36:03 2007
@@ -404,7 +404,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/libs/libteletone/src/libteletone_detect.h
==============================================================================
--- freeswitch/trunk/libs/libteletone/src/libteletone_detect.h (original)
+++ freeswitch/trunk/libs/libteletone/src/libteletone_detect.h Thu Feb 8 21:36:03 2007
@@ -229,7 +229,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/libs/libteletone/src/libteletone_generate.c
==============================================================================
--- freeswitch/trunk/libs/libteletone/src/libteletone_generate.c (original)
+++ freeswitch/trunk/libs/libteletone/src/libteletone_generate.c Thu Feb 8 21:36:03 2007
@@ -418,7 +418,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/libs/libteletone/src/libteletone_generate.h
==============================================================================
--- freeswitch/trunk/libs/libteletone/src/libteletone_generate.h (original)
+++ freeswitch/trunk/libs/libteletone/src/libteletone_generate.h Thu Feb 8 21:36:03 2007
@@ -167,7 +167,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/include/switch.h
==============================================================================
--- freeswitch/trunk/src/include/switch.h (original)
+++ freeswitch/trunk/src/include/switch.h Thu Feb 8 21:36:03 2007
@@ -167,7 +167,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/include/switch_apr.h
==============================================================================
--- freeswitch/trunk/src/include/switch_apr.h (original)
+++ freeswitch/trunk/src/include/switch_apr.h Thu Feb 8 21:36:03 2007
@@ -1467,7 +1467,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/include/switch_buffer.h
==============================================================================
--- freeswitch/trunk/src/include/switch_buffer.h (original)
+++ freeswitch/trunk/src/include/switch_buffer.h Thu Feb 8 21:36:03 2007
@@ -135,7 +135,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/include/switch_caller.h
==============================================================================
--- freeswitch/trunk/src/include/switch_caller.h (original)
+++ freeswitch/trunk/src/include/switch_caller.h Thu Feb 8 21:36:03 2007
@@ -210,7 +210,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/include/switch_channel.h
==============================================================================
--- freeswitch/trunk/src/include/switch_channel.h (original)
+++ freeswitch/trunk/src/include/switch_channel.h Thu Feb 8 21:36:03 2007
@@ -463,7 +463,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/include/switch_config.h
==============================================================================
--- freeswitch/trunk/src/include/switch_config.h (original)
+++ freeswitch/trunk/src/include/switch_config.h Thu Feb 8 21:36:03 2007
@@ -113,7 +113,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/include/switch_console.h
==============================================================================
--- freeswitch/trunk/src/include/switch_console.h (original)
+++ freeswitch/trunk/src/include/switch_console.h Thu Feb 8 21:36:03 2007
@@ -75,7 +75,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/include/switch_core.h
==============================================================================
--- freeswitch/trunk/src/include/switch_core.h (original)
+++ freeswitch/trunk/src/include/switch_core.h Thu Feb 8 21:36:03 2007
@@ -1441,7 +1441,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/include/switch_event.h
==============================================================================
--- freeswitch/trunk/src/include/switch_event.h (original)
+++ freeswitch/trunk/src/include/switch_event.h Thu Feb 8 21:36:03 2007
@@ -317,7 +317,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/include/switch_frame.h
==============================================================================
--- freeswitch/trunk/src/include/switch_frame.h (original)
+++ freeswitch/trunk/src/include/switch_frame.h Thu Feb 8 21:36:03 2007
@@ -75,7 +75,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/include/switch_ivr.h
==============================================================================
--- freeswitch/trunk/src/include/switch_ivr.h (original)
+++ freeswitch/trunk/src/include/switch_ivr.h Thu Feb 8 21:36:03 2007
@@ -630,7 +630,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/include/switch_loadable_module.h
==============================================================================
--- freeswitch/trunk/src/include/switch_loadable_module.h (original)
+++ freeswitch/trunk/src/include/switch_loadable_module.h Thu Feb 8 21:36:03 2007
@@ -264,7 +264,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/include/switch_log.h
==============================================================================
--- freeswitch/trunk/src/include/switch_log.h (original)
+++ freeswitch/trunk/src/include/switch_log.h Thu Feb 8 21:36:03 2007
@@ -124,7 +124,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/include/switch_module_interfaces.h
==============================================================================
--- freeswitch/trunk/src/include/switch_module_interfaces.h (original)
+++ freeswitch/trunk/src/include/switch_module_interfaces.h Thu Feb 8 21:36:03 2007
@@ -618,7 +618,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/include/switch_platform.h
==============================================================================
--- freeswitch/trunk/src/include/switch_platform.h (original)
+++ freeswitch/trunk/src/include/switch_platform.h Thu Feb 8 21:36:03 2007
@@ -168,7 +168,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/include/switch_resample.h
==============================================================================
--- freeswitch/trunk/src/include/switch_resample.h (original)
+++ freeswitch/trunk/src/include/switch_resample.h Thu Feb 8 21:36:03 2007
@@ -171,7 +171,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/include/switch_rtp.h
==============================================================================
--- freeswitch/trunk/src/include/switch_rtp.h (original)
+++ freeswitch/trunk/src/include/switch_rtp.h Thu Feb 8 21:36:03 2007
@@ -384,7 +384,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/include/switch_sqlite.h
==============================================================================
--- freeswitch/trunk/src/include/switch_sqlite.h (original)
+++ freeswitch/trunk/src/include/switch_sqlite.h Thu Feb 8 21:36:03 2007
@@ -1812,7 +1812,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/include/switch_stun.h
==============================================================================
--- freeswitch/trunk/src/include/switch_stun.h (original)
+++ freeswitch/trunk/src/include/switch_stun.h Thu Feb 8 21:36:03 2007
@@ -247,7 +247,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/include/switch_types.h
==============================================================================
--- freeswitch/trunk/src/include/switch_types.h (original)
+++ freeswitch/trunk/src/include/switch_types.h Thu Feb 8 21:36:03 2007
@@ -976,7 +976,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/include/switch_utils.h
==============================================================================
--- freeswitch/trunk/src/include/switch_utils.h (original)
+++ freeswitch/trunk/src/include/switch_utils.h Thu Feb 8 21:36:03 2007
@@ -289,7 +289,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/include/switch_xml.h
==============================================================================
--- freeswitch/trunk/src/include/switch_xml.h (original)
+++ freeswitch/trunk/src/include/switch_xml.h Thu Feb 8 21:36:03 2007
@@ -353,7 +353,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/applications/mod_bridgecall/mod_bridgecall.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_bridgecall/mod_bridgecall.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_bridgecall/mod_bridgecall.c Thu Feb 8 21:36:03 2007
@@ -144,7 +144,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c Thu Feb 8 21:36:03 2007
@@ -854,7 +854,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c Thu Feb 8 21:36:03 2007
@@ -4852,10 +4852,10 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
* For VIM:
- * vim:set softtabstop = 4 shiftwidth = 4 tabstop = 4 expandtab:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
*/
Modified: freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c Thu Feb 8 21:36:03 2007
@@ -684,7 +684,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/applications/mod_echo/mod_echo.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_echo/mod_echo.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_echo/mod_echo.c Thu Feb 8 21:36:03 2007
@@ -76,7 +76,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/applications/mod_ivrtest/mod_ivrtest.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_ivrtest/mod_ivrtest.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_ivrtest/mod_ivrtest.c Thu Feb 8 21:36:03 2007
@@ -544,7 +544,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/applications/mod_park/mod_park.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_park/mod_park.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_park/mod_park.c Thu Feb 8 21:36:03 2007
@@ -69,7 +69,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/applications/mod_playback/mod_playback.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_playback/mod_playback.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_playback/mod_playback.c Thu Feb 8 21:36:03 2007
@@ -240,7 +240,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/applications/mod_rss/mod_rss.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_rss/mod_rss.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_rss/mod_rss.c Thu Feb 8 21:36:03 2007
@@ -688,7 +688,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/asr_tts/mod_cepstral/mod_cepstral.c
==============================================================================
--- freeswitch/trunk/src/mod/asr_tts/mod_cepstral/mod_cepstral.c (original)
+++ freeswitch/trunk/src/mod/asr_tts/mod_cepstral/mod_cepstral.c Thu Feb 8 21:36:03 2007
@@ -442,7 +442,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/codecs/mod_g711/mod_g711.c
==============================================================================
--- freeswitch/trunk/src/mod/codecs/mod_g711/mod_g711.c (original)
+++ freeswitch/trunk/src/mod/codecs/mod_g711/mod_g711.c Thu Feb 8 21:36:03 2007
@@ -392,7 +392,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/codecs/mod_g722/mod_g722.c
==============================================================================
--- freeswitch/trunk/src/mod/codecs/mod_g722/mod_g722.c (original)
+++ freeswitch/trunk/src/mod/codecs/mod_g722/mod_g722.c Thu Feb 8 21:36:03 2007
@@ -187,7 +187,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/codecs/mod_g723_1/mod_g723_1.c
==============================================================================
--- freeswitch/trunk/src/mod/codecs/mod_g723_1/mod_g723_1.c (original)
+++ freeswitch/trunk/src/mod/codecs/mod_g723_1/mod_g723_1.c Thu Feb 8 21:36:03 2007
@@ -226,7 +226,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/codecs/mod_g726/mod_g726.c
==============================================================================
--- freeswitch/trunk/src/mod/codecs/mod_g726/mod_g726.c (original)
+++ freeswitch/trunk/src/mod/codecs/mod_g726/mod_g726.c Thu Feb 8 21:36:03 2007
@@ -452,7 +452,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/codecs/mod_g729/mod_g729.c
==============================================================================
--- freeswitch/trunk/src/mod/codecs/mod_g729/mod_g729.c (original)
+++ freeswitch/trunk/src/mod/codecs/mod_g729/mod_g729.c Thu Feb 8 21:36:03 2007
@@ -332,7 +332,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/codecs/mod_gsm/mod_gsm.c
==============================================================================
--- freeswitch/trunk/src/mod/codecs/mod_gsm/mod_gsm.c (original)
+++ freeswitch/trunk/src/mod/codecs/mod_gsm/mod_gsm.c Thu Feb 8 21:36:03 2007
@@ -177,7 +177,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/codecs/mod_ilbc/mod_ilbc.c
==============================================================================
--- freeswitch/trunk/src/mod/codecs/mod_ilbc/mod_ilbc.c (original)
+++ freeswitch/trunk/src/mod/codecs/mod_ilbc/mod_ilbc.c Thu Feb 8 21:36:03 2007
@@ -336,7 +336,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/codecs/mod_l16/mod_l16.c
==============================================================================
--- freeswitch/trunk/src/mod/codecs/mod_l16/mod_l16.c (original)
+++ freeswitch/trunk/src/mod/codecs/mod_l16/mod_l16.c Thu Feb 8 21:36:03 2007
@@ -438,7 +438,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/codecs/mod_speex/mod_speex.c
==============================================================================
--- freeswitch/trunk/src/mod/codecs/mod_speex/mod_speex.c (original)
+++ freeswitch/trunk/src/mod/codecs/mod_speex/mod_speex.c Thu Feb 8 21:36:03 2007
@@ -355,7 +355,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/dialplans/mod_dialplan_directory/mod_dialplan_directory.c
==============================================================================
--- freeswitch/trunk/src/mod/dialplans/mod_dialplan_directory/mod_dialplan_directory.c (original)
+++ freeswitch/trunk/src/mod/dialplans/mod_dialplan_directory/mod_dialplan_directory.c Thu Feb 8 21:36:03 2007
@@ -185,7 +185,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c
==============================================================================
--- freeswitch/trunk/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c (original)
+++ freeswitch/trunk/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c Thu Feb 8 21:36:03 2007
@@ -387,7 +387,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/directories/mod_ldap/mod_ldap.c
==============================================================================
--- freeswitch/trunk/src/mod/directories/mod_ldap/mod_ldap.c (original)
+++ freeswitch/trunk/src/mod/directories/mod_ldap/mod_ldap.c Thu Feb 8 21:36:03 2007
@@ -232,7 +232,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c Thu Feb 8 21:36:03 2007
@@ -2730,7 +2730,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c Thu Feb 8 21:36:03 2007
@@ -1232,7 +1232,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c Thu Feb 8 21:36:03 2007
@@ -1763,7 +1763,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c Thu Feb 8 21:36:03 2007
@@ -5775,7 +5775,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/endpoints/mod_woomera/mod_woomera.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_woomera/mod_woomera.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_woomera/mod_woomera.c Thu Feb 8 21:36:03 2007
@@ -1419,7 +1419,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/event_handlers/mod_cdr/basecdr.cpp
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_cdr/basecdr.cpp (original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_cdr/basecdr.cpp Thu Feb 8 21:36:03 2007
@@ -409,7 +409,7 @@
/* For Emacs:
* Local Variables:
* mode:c++
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/event_handlers/mod_cdr/basecdr.h
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_cdr/basecdr.h (original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_cdr/basecdr.h Thu Feb 8 21:36:03 2007
@@ -121,7 +121,7 @@
/* For Emacs:
* Local Variables:
* mode:c++
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/event_handlers/mod_cdr/baseregistry.cpp
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_cdr/baseregistry.cpp (original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_cdr/baseregistry.cpp Thu Feb 8 21:36:03 2007
@@ -83,7 +83,7 @@
/* For Emacs:
* Local Variables:
* mode:c++
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/event_handlers/mod_cdr/baseregistry.h
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_cdr/baseregistry.h (original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_cdr/baseregistry.h Thu Feb 8 21:36:03 2007
@@ -80,7 +80,7 @@
/* For Emacs:
* Local Variables:
* mode:c++
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/event_handlers/mod_cdr/cdrcontainer.cpp
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_cdr/cdrcontainer.cpp (original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_cdr/cdrcontainer.cpp Thu Feb 8 21:36:03 2007
@@ -250,7 +250,7 @@
/* For Emacs:
* Local Variables:
* mode:c++
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/event_handlers/mod_cdr/cdrcontainer.h
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_cdr/cdrcontainer.h (original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_cdr/cdrcontainer.h Thu Feb 8 21:36:03 2007
@@ -83,7 +83,7 @@
/* For Emacs:
* Local Variables:
* mode:c++
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/event_handlers/mod_cdr/csvcdr.cpp
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_cdr/csvcdr.cpp (original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_cdr/csvcdr.cpp Thu Feb 8 21:36:03 2007
@@ -340,7 +340,7 @@
/* For Emacs:
* Local Variables:
* mode:c++
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/event_handlers/mod_cdr/csvcdr.h
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_cdr/csvcdr.h (original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_cdr/csvcdr.h Thu Feb 8 21:36:03 2007
@@ -83,7 +83,7 @@
/* For Emacs:
* Local Variables:
* mode:c++
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/event_handlers/mod_cdr/mod_cdr.cpp
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_cdr/mod_cdr.cpp (original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_cdr/mod_cdr.cpp Thu Feb 8 21:36:03 2007
@@ -205,7 +205,7 @@
/* For Emacs:
* Local Variables:
* mode:c++
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/event_handlers/mod_cdr/mysqlcdr.cpp
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_cdr/mysqlcdr.cpp (original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_cdr/mysqlcdr.cpp Thu Feb 8 21:36:03 2007
@@ -659,7 +659,7 @@
/* For Emacs:
* Local Variables:
* mode:c++
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/event_handlers/mod_cdr/mysqlcdr.h
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_cdr/mysqlcdr.h (original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_cdr/mysqlcdr.h Thu Feb 8 21:36:03 2007
@@ -108,7 +108,7 @@
/* For Emacs:
* Local Variables:
* mode:c++
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/event_handlers/mod_cdr/pddcdr.cpp
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_cdr/pddcdr.cpp (original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_cdr/pddcdr.cpp Thu Feb 8 21:36:03 2007
@@ -255,7 +255,7 @@
/* For Emacs:
* Local Variables:
* mode:c++
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/event_handlers/mod_cdr/pddcdr.h
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_cdr/pddcdr.h (original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_cdr/pddcdr.h Thu Feb 8 21:36:03 2007
@@ -77,7 +77,7 @@
/* For Emacs:
* Local Variables:
* mode:c++
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/event_handlers/mod_cdr/xmlcdr.cpp
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_cdr/xmlcdr.cpp (original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_cdr/xmlcdr.cpp Thu Feb 8 21:36:03 2007
@@ -257,7 +257,7 @@
/* For Emacs:
* Local Variables:
* mode:c++
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/event_handlers/mod_cdr/xmlcdr.h
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_cdr/xmlcdr.h (original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_cdr/xmlcdr.h Thu Feb 8 21:36:03 2007
@@ -78,7 +78,7 @@
/* For Emacs:
* Local Variables:
* mode:c++
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.c
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.c (original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.c Thu Feb 8 21:36:03 2007
@@ -334,7 +334,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c (original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c Thu Feb 8 21:36:03 2007
@@ -1288,7 +1288,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/event_handlers/mod_event_test/mod_event_test.c
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_event_test/mod_event_test.c (original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_event_test/mod_event_test.c Thu Feb 8 21:36:03 2007
@@ -157,7 +157,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/event_handlers/mod_xmpp_event/mod_xmpp_event.c
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_xmpp_event/mod_xmpp_event.c (original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_xmpp_event/mod_xmpp_event.c Thu Feb 8 21:36:03 2007
@@ -443,7 +443,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/event_handlers/mod_zeroconf/mod_zeroconf.c
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_zeroconf/mod_zeroconf.c (original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_zeroconf/mod_zeroconf.c Thu Feb 8 21:36:03 2007
@@ -322,7 +322,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/formats/mod_native_file/mod_native_file.c
==============================================================================
--- freeswitch/trunk/src/mod/formats/mod_native_file/mod_native_file.c (original)
+++ freeswitch/trunk/src/mod/formats/mod_native_file/mod_native_file.c Thu Feb 8 21:36:03 2007
@@ -184,7 +184,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/formats/mod_sndfile/mod_sndfile.c
==============================================================================
--- freeswitch/trunk/src/mod/formats/mod_sndfile/mod_sndfile.c (original)
+++ freeswitch/trunk/src/mod/formats/mod_sndfile/mod_sndfile.c Thu Feb 8 21:36:03 2007
@@ -354,7 +354,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/languages/mod_perl/mod_perl.c
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_perl/mod_perl.c (original)
+++ freeswitch/trunk/src/mod/languages/mod_perl/mod_perl.c Thu Feb 8 21:36:03 2007
@@ -141,7 +141,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c (original)
+++ freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c Thu Feb 8 21:36:03 2007
@@ -2521,7 +2521,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/languages/mod_spidermonkey_core_db/mod_spidermonkey_core_db.c
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_spidermonkey_core_db/mod_spidermonkey_core_db.c (original)
+++ freeswitch/trunk/src/mod/languages/mod_spidermonkey_core_db/mod_spidermonkey_core_db.c Thu Feb 8 21:36:03 2007
@@ -304,7 +304,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/languages/mod_spidermonkey_etpan/mod_spidermonkey_etpan.c
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_spidermonkey_etpan/mod_spidermonkey_etpan.c (original)
+++ freeswitch/trunk/src/mod/languages/mod_spidermonkey_etpan/mod_spidermonkey_etpan.c Thu Feb 8 21:36:03 2007
@@ -525,7 +525,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/languages/mod_spidermonkey_odbc/mod_spidermonkey_odbc.c
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_spidermonkey_odbc/mod_spidermonkey_odbc.c (original)
+++ freeswitch/trunk/src/mod/languages/mod_spidermonkey_odbc/mod_spidermonkey_odbc.c Thu Feb 8 21:36:03 2007
@@ -544,7 +544,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/languages/mod_spidermonkey_teletone/mod_spidermonkey_teletone.c
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_spidermonkey_teletone/mod_spidermonkey_teletone.c (original)
+++ freeswitch/trunk/src/mod/languages/mod_spidermonkey_teletone/mod_spidermonkey_teletone.c Thu Feb 8 21:36:03 2007
@@ -390,7 +390,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/loggers/mod_console/mod_console.c
==============================================================================
--- freeswitch/trunk/src/mod/loggers/mod_console/mod_console.c (original)
+++ freeswitch/trunk/src/mod/loggers/mod_console/mod_console.c Thu Feb 8 21:36:03 2007
@@ -161,7 +161,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/timers/mod_softtimer/mod_softtimer.c
==============================================================================
--- freeswitch/trunk/src/mod/timers/mod_softtimer/mod_softtimer.c (original)
+++ freeswitch/trunk/src/mod/timers/mod_softtimer/mod_softtimer.c Thu Feb 8 21:36:03 2007
@@ -231,7 +231,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/xml_int/mod_xml_curl/mod_xml_curl.c
==============================================================================
--- freeswitch/trunk/src/mod/xml_int/mod_xml_curl/mod_xml_curl.c (original)
+++ freeswitch/trunk/src/mod/xml_int/mod_xml_curl/mod_xml_curl.c Thu Feb 8 21:36:03 2007
@@ -247,7 +247,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c
==============================================================================
--- freeswitch/trunk/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c (original)
+++ freeswitch/trunk/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c Thu Feb 8 21:36:03 2007
@@ -268,7 +268,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/switch.c
==============================================================================
--- freeswitch/trunk/src/switch.c (original)
+++ freeswitch/trunk/src/switch.c Thu Feb 8 21:36:03 2007
@@ -395,7 +395,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/switch_buffer.c
==============================================================================
--- freeswitch/trunk/src/switch_buffer.c (original)
+++ freeswitch/trunk/src/switch_buffer.c Thu Feb 8 21:36:03 2007
@@ -258,7 +258,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/switch_caller.c
==============================================================================
--- freeswitch/trunk/src/switch_caller.c (original)
+++ freeswitch/trunk/src/switch_caller.c Thu Feb 8 21:36:03 2007
@@ -252,7 +252,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/switch_channel.c
==============================================================================
--- freeswitch/trunk/src/switch_channel.c (original)
+++ freeswitch/trunk/src/switch_channel.c Thu Feb 8 21:36:03 2007
@@ -1285,7 +1285,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/switch_config.c
==============================================================================
--- freeswitch/trunk/src/switch_config.c (original)
+++ freeswitch/trunk/src/switch_config.c Thu Feb 8 21:36:03 2007
@@ -209,7 +209,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/switch_console.c
==============================================================================
--- freeswitch/trunk/src/switch_console.c (original)
+++ freeswitch/trunk/src/switch_console.c Thu Feb 8 21:36:03 2007
@@ -262,7 +262,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/switch_core.c
==============================================================================
--- freeswitch/trunk/src/switch_core.c (original)
+++ freeswitch/trunk/src/switch_core.c Thu Feb 8 21:36:03 2007
@@ -4397,7 +4397,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/switch_event.c
==============================================================================
--- freeswitch/trunk/src/switch_event.c (original)
+++ freeswitch/trunk/src/switch_event.c Thu Feb 8 21:36:03 2007
@@ -904,7 +904,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/switch_ivr.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr.c (original)
+++ freeswitch/trunk/src/switch_ivr.c Thu Feb 8 21:36:03 2007
@@ -4780,7 +4780,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/switch_loadable_module.c
==============================================================================
--- freeswitch/trunk/src/switch_loadable_module.c (original)
+++ freeswitch/trunk/src/switch_loadable_module.c Thu Feb 8 21:36:03 2007
@@ -860,7 +860,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/switch_log.c
==============================================================================
--- freeswitch/trunk/src/switch_log.c (original)
+++ freeswitch/trunk/src/switch_log.c Thu Feb 8 21:36:03 2007
@@ -290,7 +290,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/switch_resample.c
==============================================================================
--- freeswitch/trunk/src/switch_resample.c (original)
+++ freeswitch/trunk/src/switch_resample.c Thu Feb 8 21:36:03 2007
@@ -219,7 +219,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/switch_rtp.c
==============================================================================
--- freeswitch/trunk/src/switch_rtp.c (original)
+++ freeswitch/trunk/src/switch_rtp.c Thu Feb 8 21:36:03 2007
@@ -1322,7 +1322,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/switch_stun.c
==============================================================================
--- freeswitch/trunk/src/switch_stun.c (original)
+++ freeswitch/trunk/src/switch_stun.c Thu Feb 8 21:36:03 2007
@@ -374,7 +374,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/switch_utils.c
==============================================================================
--- freeswitch/trunk/src/switch_utils.c (original)
+++ freeswitch/trunk/src/switch_utils.c Thu Feb 8 21:36:03 2007
@@ -650,7 +650,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
Modified: freeswitch/trunk/src/switch_xml.c
==============================================================================
--- freeswitch/trunk/src/switch_xml.c (original)
+++ freeswitch/trunk/src/switch_xml.c Thu Feb 8 21:36:03 2007
@@ -1567,7 +1567,7 @@
/* For Emacs:
* Local Variables:
* mode:c
- * indent-tabs-mode:nil
+ * indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
1
0
09 Feb '07
Author: mikej
Date: Thu Feb 8 21:05:46 2007
New Revision: 4175
Modified:
freeswitch/trunk/src/mod/endpoints/mod_portaudio/pa_ringbuffer.c
Log:
tweak the defines for memory barriers. This should fix the freebsd build, and adds proper memory barrier defines for msvc build.
Modified: freeswitch/trunk/src/mod/endpoints/mod_portaudio/pa_ringbuffer.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_portaudio/pa_ringbuffer.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_portaudio/pa_ringbuffer.c Thu Feb 8 21:05:46 2007
@@ -71,7 +71,17 @@
*
****************/
-#if defined(__APPLE__) || defined(__FreeBSD__)
+#if defined(__VIA_HACK__)
+#define NO_BARRIER
+#endif
+
+#if defined(NO_BARRIER)
+# define PaUtil_FullMemoryBarrier()
+# define PaUtil_ReadMemoryBarrier()
+# define PaUtil_WriteMemoryBarrier()
+#else
+
+#if defined(__APPLE__) //|| defined(__FreeBSD__)
# include <libkern/OSAtomic.h>
/* Here are the memory barrier functions. Mac OS X and FreeBSD only provide
full memory barriers, so the three types of barriers are the same. */
@@ -85,39 +95,29 @@
# define PaUtil_FullMemoryBarrier() asm volatile("sync":::"memory")
# define PaUtil_ReadMemoryBarrier() asm volatile("sync":::"memory")
# define PaUtil_WriteMemoryBarrier() asm volatile("sync":::"memory")
-# elif defined(__VIA_HACK__)
-# define PaUtil_FullMemoryBarrier()
-# define PaUtil_ReadMemoryBarrier()
-# define PaUtil_WriteMemoryBarrier()
# elif defined( __i386__ ) || defined( __i486__ ) || defined( __i586__ ) || defined( __i686__ ) || defined(__x86_64__)
# define PaUtil_FullMemoryBarrier() asm volatile("mfence":::"memory")
# define PaUtil_ReadMemoryBarrier() asm volatile("lfence":::"memory")
# define PaUtil_WriteMemoryBarrier() asm volatile("sfence":::"memory")
# else
-# ifdef ALLOW_SMP_DANGERS
-# warning Memory barriers not defined on this system or system unknown
-# warning For SMP safety, you should fix this.
-# define PaUtil_FullMemoryBarrier()
-# define PaUtil_ReadMemoryBarrier()
-# define PaUtil_WriteMemoryBarrier()
-# else
-# error Memory barriers are not defined on this system. You can still compile by defining ALLOW_SMP_DANGERS, but SMP safety will not be guaranteed.
-# endif
-# endif
-#else
-# ifdef ALLOW_SMP_DANGERS
-# ifndef _MSC_VER
-# warning Memory barriers not defined on this system or system unknown
-# warning For SMP safety, you should fix this.
-# endif
# define PaUtil_FullMemoryBarrier()
# define PaUtil_ReadMemoryBarrier()
# define PaUtil_WriteMemoryBarrier()
-# else
-# error Memory barriers are not defined on this system. You can still compile by defining ALLOW_SMP_DANGERS, but SMP safety will not be guaranteed.
# endif
+#elif defined(_MSC_VER)
+# include <intrin.h>
+# pragma intrinsic(_ReadWriteBarrier)
+# pragma intrinsic(_ReadBarrier)
+# pragma intrinsic(_WriteBarrier)
+# define PaUtil_FullMemoryBarrier() _ReadWriteBarrier()
+# define PaUtil_ReadMemoryBarrier() _ReadBarrier()
+# define PaUtil_WriteMemoryBarrier() _WriteBarrier()
+#else
+# define PaUtil_FullMemoryBarrier()
+# define PaUtil_ReadMemoryBarrier()
+# define PaUtil_WriteMemoryBarrier()
+#endif
#endif
-
/***************************************************************************
* Initialize FIFO.
* numBytes must be power of 2, returns -1 if not.
1
0
[commit] r4174 - in freeswitch/trunk/src: . include mod/endpoints/mod_iax mod/endpoints/mod_sofia mod/endpoints/mod_wanpipe
by Freeswitch SVN 09 Feb '07
by Freeswitch SVN 09 Feb '07
09 Feb '07
Author: anthm
Date: Thu Feb 8 20:34:01 2007
New Revision: 4174
Modified:
freeswitch/trunk/src/include/switch_channel.h
freeswitch/trunk/src/include/switch_core.h
freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c
freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
freeswitch/trunk/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c
freeswitch/trunk/src/switch_channel.c
freeswitch/trunk/src/switch_core.c
freeswitch/trunk/src/switch_ivr.c
Log:
improve core and basic flow
Modified: freeswitch/trunk/src/include/switch_channel.h
==============================================================================
--- freeswitch/trunk/src/include/switch_channel.h (original)
+++ freeswitch/trunk/src/include/switch_channel.h Thu Feb 8 20:34:01 2007
@@ -294,6 +294,13 @@
*/
#define switch_channel_mark_answered(channel) switch_channel_perform_mark_answered(channel, __FILE__, __SWITCH_FUNC__, __LINE__)
+/*!
+ \brief Mark a channel pre_answered (early media) with no indication (for outbound calls)
+ \param channel channel to mark pre_answered
+ \return SWITCH_STATUS_SUCCESS if channel was pre_answered successfully
+*/
+#define switch_channel_mark_pre_answered(channel) switch_channel_perform_mark_pre_answered(channel, __FILE__, __SWITCH_FUNC__, __LINE__)
+
SWITCH_DECLARE(switch_status_t) switch_channel_perform_ringback(switch_channel_t *channel,
const char *file,
const char *func,
@@ -310,6 +317,12 @@
const char *file,
const char *func,
int line);
+
+SWITCH_DECLARE(switch_status_t) switch_channel_perform_mark_pre_answered(switch_channel_t *channel,
+ const char *file,
+ const char *func,
+ int line);
+
/*!
\brief Indicate progress on a channel to attempt early media
\param channel channel to pre-answer
Modified: freeswitch/trunk/src/include/switch_core.h
==============================================================================
--- freeswitch/trunk/src/include/switch_core.h (original)
+++ freeswitch/trunk/src/include/switch_core.h Thu Feb 8 20:34:01 2007
@@ -523,6 +523,13 @@
SWITCH_DECLARE(switch_status_t) switch_core_session_dequeue_message(switch_core_session_t *session, switch_core_session_message_t **message);
/*!
+ \brief Flush a message queue on a given session
+ \param session the session to de-queue the message on
+ \return the SWITCH_STATUS_SUCCESS if the message was de-queued
+*/
+SWITCH_DECLARE(switch_status_t) switch_core_session_flush_message(switch_core_session_t *session);
+
+/*!
\brief Queue an event on another session using its uuid
\param uuid_str the unique id of the session you want to send a message to
\param event the event to send
Modified: freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c Thu Feb 8 20:34:01 2007
@@ -1035,7 +1035,7 @@
case IAX_EVENT_ACCEPT:
if (channel && !switch_channel_test_flag(channel, CF_ANSWERED)) {
if (tech_media(tech_pvt, iaxevent) == SWITCH_STATUS_SUCCESS) {
- switch_channel_set_flag(channel, CF_EARLY_MEDIA);
+ switch_channel_mark_pre_answered(channel);
} else {
switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
}
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c Thu Feb 8 20:34:01 2007
@@ -1580,7 +1580,7 @@
activate_rtp(tech_pvt);
switch_channel_set_variable(channel, "endpoint_disposition", "EARLY MEDIA");
switch_set_flag_locked(tech_pvt, TFLAG_EARLY_MEDIA);
- switch_channel_set_flag(channel, CF_EARLY_MEDIA);
+ switch_channel_mark_pre_answered(channel);
return SWITCH_STATUS_SUCCESS;
}
@@ -2784,7 +2784,7 @@
if (r_sdp) {
if (switch_test_flag(tech_pvt, TFLAG_NOMEDIA)) {
switch_set_flag_locked(tech_pvt, TFLAG_EARLY_MEDIA);
- switch_channel_set_flag(channel, CF_EARLY_MEDIA);
+ switch_channel_mark_pre_answered(channel);
if ((uuid = switch_channel_get_variable(channel, SWITCH_BRIDGE_VARIABLE)) && (other_session = switch_core_session_locate(uuid))) {
other_channel = switch_core_session_get_channel(other_session);
switch_channel_pre_answer(other_channel);
Modified: freeswitch/trunk/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c Thu Feb 8 20:34:01 2007
@@ -84,6 +84,7 @@
char *dialplan;
switch_hash_t *call_hash;
switch_mutex_t *hash_mutex;
+ switch_mutex_t *channel_mutex;
} globals;
struct wanpipe_pri_span {
@@ -138,12 +139,13 @@
int fd2;
#endif
};
+typedef struct private_object private_object_t;
struct channel_map {
- switch_core_session_t *map[36];
+ char map[SANGOMA_MAX_CHAN_PER_SPAN][SWITCH_UUID_FORMATTED_LENGTH + 1];
};
-static int wp_close(struct private_object *tech_pvt)
+static int wp_close(private_object_t *tech_pvt)
{
int ret = 0;
@@ -157,7 +159,7 @@
return ret;
}
-static int wp_open(struct private_object *tech_pvt, int span, int chan)
+static int wp_open(private_object_t *tech_pvt, int span, int chan)
{
sng_fd_t fd;
wpsock_t *sock;
@@ -317,7 +319,7 @@
*/
static switch_status_t wanpipe_on_init(switch_core_session_t *session)
{
- struct private_object *tech_pvt;
+ private_object_t *tech_pvt;
switch_channel_t *channel = NULL;
wanpipe_tdm_api_t tdm_api = {{0}};
int err = 0;
@@ -391,7 +393,7 @@
teletone_dtmf_detect_init (&tech_pvt->dtmf_detect, rate);
if (switch_test_flag(tech_pvt, TFLAG_NOSIG)) {
- switch_channel_answer(channel);
+ switch_channel_mark_answered(channel);
}
@@ -403,7 +405,7 @@
static switch_status_t wanpipe_on_ring(switch_core_session_t *session)
{
switch_channel_t *channel = NULL;
- struct private_object *tech_pvt = NULL;
+ private_object_t *tech_pvt = NULL;
channel = switch_core_session_get_channel(session);
assert(channel != NULL);
@@ -420,7 +422,7 @@
static switch_status_t wanpipe_on_hangup(switch_core_session_t *session)
{
- struct private_object *tech_pvt;
+ private_object_t *tech_pvt;
switch_channel_t *channel = NULL;
struct channel_map *chanmap = NULL;
@@ -451,7 +453,7 @@
pri_destroycall(tech_pvt->spri->pri, tech_pvt->call);
if (chanmap->map[tech_pvt->callno]) {
- chanmap->map[tech_pvt->callno] = NULL;
+ chanmap->map[tech_pvt->callno][0] = '\0';
}
/*
pri_hangup(tech_pvt->spri->pri,
@@ -477,7 +479,7 @@
static switch_status_t wanpipe_on_transmit(switch_core_session_t *session)
{
- struct private_object *tech_pvt;
+ private_object_t *tech_pvt;
switch_channel_t *channel;
channel = switch_core_session_get_channel(session);
@@ -495,7 +497,7 @@
static switch_status_t wanpipe_answer_channel(switch_core_session_t *session)
{
- struct private_object *tech_pvt;
+ private_object_t *tech_pvt;
switch_channel_t *channel = NULL;
channel = switch_core_session_get_channel(session);
@@ -515,7 +517,7 @@
static switch_status_t wanpipe_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
switch_io_flag_t flags, int stream_id)
{
- struct private_object *tech_pvt;
+ private_object_t *tech_pvt;
switch_channel_t *channel = NULL;
uint8_t *bp;
uint32_t bytes = 0;
@@ -598,7 +600,7 @@
static switch_status_t wanpipe_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
switch_io_flag_t flags, int stream_id)
{
- struct private_object *tech_pvt;
+ private_object_t *tech_pvt;
switch_channel_t *channel = NULL;
uint32_t result = 0;
uint32_t bytes = frame->datalen;
@@ -707,7 +709,7 @@
static switch_status_t wanpipe_send_dtmf(switch_core_session_t *session, char *digits)
{
- struct private_object *tech_pvt;
+ private_object_t *tech_pvt;
switch_channel_t *channel = NULL;
switch_status_t status = SWITCH_STATUS_SUCCESS;
int wrote = 0;
@@ -741,12 +743,44 @@
static switch_status_t wanpipe_receive_message(switch_core_session_t *session, switch_core_session_message_t *msg)
{
- return SWITCH_STATUS_FALSE;
+ switch_channel_t *channel;
+ private_object_t *tech_pvt;
+ switch_status_t status;
+
+ channel = switch_core_session_get_channel(session);
+ assert(channel != NULL);
+
+ tech_pvt = (private_object_t *) switch_core_session_get_private(session);
+ assert(tech_pvt != NULL);
+
+
+ switch (msg->message_id) {
+ case SWITCH_MESSAGE_INDICATE_NOMEDIA:
+ break;
+ case SWITCH_MESSAGE_INDICATE_MEDIA:
+ break;
+ case SWITCH_MESSAGE_INDICATE_HOLD:
+ break;
+ case SWITCH_MESSAGE_INDICATE_UNHOLD:
+ break;
+ case SWITCH_MESSAGE_INDICATE_BRIDGE:
+ break;
+ case SWITCH_MESSAGE_INDICATE_UNBRIDGE:
+ break;
+ case SWITCH_MESSAGE_INDICATE_REDIRECT:
+ break;
+ case SWITCH_MESSAGE_INDICATE_PROGRESS:
+ break;
+ case SWITCH_MESSAGE_INDICATE_RINGING:
+ break;
+ }
+
+ return SWITCH_STATUS_SUCCESS;
}
static switch_status_t wanpipe_kill_channel(switch_core_session_t *session, int sig)
{
- struct private_object *tech_pvt;
+ private_object_t *tech_pvt;
switch_channel_t *channel = NULL;
channel = switch_core_session_get_channel(session);
@@ -838,11 +872,11 @@
if ((*new_session = switch_core_session_request(&wanpipe_endpoint_interface, pool))) {
- struct private_object *tech_pvt;
+ private_object_t *tech_pvt;
switch_channel_t *channel;
switch_core_session_add_stream(*new_session, NULL);
- if ((tech_pvt = (struct private_object *) switch_core_session_alloc(*new_session, sizeof(struct private_object)))) {
+ if ((tech_pvt = (private_object_t *) switch_core_session_alloc(*new_session, sizeof(private_object_t)))) {
memset(tech_pvt, 0, sizeof(*tech_pvt));
switch_mutex_init(&tech_pvt->flag_mutex, SWITCH_MUTEX_NESTED, switch_core_session_get_pool(*new_session));
channel = switch_core_session_get_channel(*new_session);
@@ -924,6 +958,7 @@
return SWITCH_STATUS_GENERR;
}
} else {
+ switch_mutex_lock(globals.channel_mutex);
do {
if (autospan) {
span++;
@@ -933,23 +968,23 @@
if (channo == 0) {
if (autochan > 0) {
for(channo = 1; channo < SANGOMA_MAX_CHAN_PER_SPAN; channo++) {
- if ((SPANS[span]->bchans & (1 << channo)) && !chanmap->map[channo]) {
+ if ((SPANS[span]->bchans & (1 << channo)) && !chanmap->map[channo][0]) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Choosing channel %d\n", channo);
break;
}
}
} else if (autochan < 0) {
for(channo = SANGOMA_MAX_CHAN_PER_SPAN; channo > 0; channo--) {
- if ((SPANS[span]->bchans & (1 << channo)) && !chanmap->map[channo]) {
+ if ((SPANS[span]->bchans & (1 << channo)) && !chanmap->map[channo][0]) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Choosing channel %d\n", channo);
break;
}
}
}
- if (channo <= 0 || channo == (SANGOMA_MAX_CHAN_PER_SPAN)) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "No Free Channels!\n");
+ if (channo <= 0 || channo == (SANGOMA_MAX_CHAN_PER_SPAN)) {
channo = 0;
+ break;
}
}
if (channo) {
@@ -957,7 +992,8 @@
}
}
} while(autospan && span < MAX_SPANS && !spri && !channo);
-
+ switch_mutex_unlock(globals.channel_mutex);
+
if (!spri || channo == 0 || channo == (SANGOMA_MAX_CHAN_PER_SPAN)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "No Free Channels!\n");
switch_core_session_destroy(new_session);
@@ -998,7 +1034,9 @@
return SWITCH_STATUS_GENERR;
}
pri_sr_free(sr);
- chanmap->map[channo] = *new_session;
+ switch_copy_string(chanmap->map[channo],
+ switch_core_session_get_uuid(*new_session),
+ sizeof(chanmap->map[channo]));
tech_pvt->spri = spri;
}
}
@@ -1058,6 +1096,7 @@
memset(&globals, 0, sizeof(globals));
switch_core_hash_init(&globals.call_hash, module_pool);
switch_mutex_init(&globals.hash_mutex, SWITCH_MUTEX_NESTED, module_pool);
+ switch_mutex_init(&globals.channel_mutex, SWITCH_MUTEX_NESTED, module_pool);
/* start the pri's */
if ((status = config_wanpipe(0)) != SWITCH_STATUS_SUCCESS) {
@@ -1071,10 +1110,6 @@
return status;
}
-
-
-
-
/*event Handlers */
static int on_info(struct sangoma_pri *spri, sangoma_pri_event_t event_type, pri_event *pevent)
@@ -1091,10 +1126,10 @@
{
struct channel_map *chanmap;
switch_core_session_t *session;
- struct private_object *tech_pvt;
+ private_object_t *tech_pvt;
chanmap = spri->private_info;
- if ((session = chanmap->map[pevent->hangup.channel])) {
+ if ((session = switch_core_session_locate(chanmap->map[pevent->hangup.channel]))) {
switch_channel_t *channel = NULL;
channel = switch_core_session_get_channel(session);
@@ -1111,7 +1146,8 @@
switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING);
- chanmap->map[pevent->hangup.channel] = NULL;
+ chanmap->map[pevent->hangup.channel][0] = '\0';
+ switch_core_session_rwunlock(session);
}
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "-- Hanging up channel s%dc%d\n", spri->span, pevent->hangup.channel);
@@ -1127,11 +1163,12 @@
chanmap = spri->private_info;
- if ((session = chanmap->map[pevent->answer.channel])) {
+ if ((session = switch_core_session_locate(chanmap->map[pevent->answer.channel]))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "-- Answer on channel s%dc%d\n", spri->span, pevent->answer.channel);
channel = switch_core_session_get_channel(session);
assert(channel != NULL);
- switch_channel_answer(channel);
+ switch_channel_mark_answered(channel);
+ switch_core_session_rwunlock(session);
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "-- Answer on channel s%dc%d but it's not in use?\n", spri->span, pevent->answer.channel);
}
@@ -1148,65 +1185,68 @@
chanmap = spri->private_info;
- if ((session = chanmap->map[pevent->proceeding.channel])) {
- switch_caller_profile_t *originator;
+ if ((session = switch_core_session_locate(chanmap->map[pevent->proceeding.channel]))) {
+ char *uuid;
+ switch_core_session_message_t *msg;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "-- Proceeding on channel s%dc%d\n", spri->span, pevent->proceeding.channel);
channel = switch_core_session_get_channel(session);
assert(channel != NULL);
- if ((originator = switch_channel_get_originator_caller_profile(channel))) {
- switch_core_session_message_t msg;
-
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "-- Passing progress to Originator %s\n", originator->chan_name);
-
- msg.message_id = SWITCH_MESSAGE_INDICATE_PROGRESS;
- msg.from = switch_channel_get_name(channel);
-
- switch_core_session_message_send(originator->uuid, &msg);
-
- switch_channel_set_flag(channel, CF_EARLY_MEDIA);
+ if ((msg = malloc(sizeof(*msg)))) {
+ memset(msg, 0, sizeof(*msg));
+ msg->message_id = SWITCH_MESSAGE_INDICATE_PROGRESS;
+ msg->from = __FILE__;
+ switch_core_session_queue_message(session, msg);
+ switch_set_flag(msg, SCSMF_DYNAMIC);
+ switch_channel_mark_pre_answered(channel);
+ } else {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Memory Error!\n");
}
- //switch_channel_answer(channel);
+ switch_core_session_rwunlock(session);
} else {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "-- Proceeding on channel s%dc%d but it's not in use?\n", spri->span, pevent->proceeding.channel);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "-- Proceeding on channel s%dc%d but it's not in use?\n",
+ spri->span, pevent->proceeding.channel);
}
return 0;
}
-#if 0
+
static int on_ringing(struct sangoma_pri *spri, sangoma_pri_event_t event_type, pri_event *pevent)
{
switch_core_session_t *session;
switch_channel_t *channel;
struct channel_map *chanmap;
- struct private_object *tech_pvt;
+ private_object_t *tech_pvt;
+ switch_core_session_message_t *msg;
chanmap = spri->private_info;
- if ((session = chanmap->map[pevent->ringing.channel])) {
+ if ((session = switch_core_session_locate(chanmap->map[pevent->ringing.channel]))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "-- Ringing on channel s%dc%d\n", spri->span, pevent->ringing.channel);
channel = switch_core_session_get_channel(session);
assert(channel != NULL);
- pri_proceeding(spri->pri, pevent->ringing.call, pevent->ringing.channel, 0);
- pri_acknowledge(spri->pri, pevent->ringing.call, pevent->ringing.channel, 0);
-
- tech_pvt = switch_core_session_get_private(session);
- if (!tech_pvt->call) {
- tech_pvt->call = pevent->ringing.call;
+ if ((msg = malloc(sizeof(*msg)))) {
+ memset(msg, 0, sizeof(*msg));
+ msg->message_id = SWITCH_MESSAGE_INDICATE_RINGING;
+ msg->from = __FILE__;
+ switch_core_session_queue_message(session, msg);
+ switch_set_flag(msg, SCSMF_DYNAMIC);
+ } else {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Memory Error!\n");
}
- tech_pvt->callno = pevent->ring.channel;
- tech_pvt->span = spri->span;
+
+ switch_core_session_rwunlock(session);
} else {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "-- Ringing on channel s%dc%d but it's not in use?\n", spri->span, pevent->ringing.channel);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "-- Ringing on channel s%dc%d %s but it's not in use?\n", spri->span, pevent->ringing.channel, chanmap->map[pevent->ringing.channel]);
}
return 0;
}
-#endif
+
static int on_ring(struct sangoma_pri *spri, sangoma_pri_event_t event_type, pri_event *pevent)
{
@@ -1214,14 +1254,17 @@
switch_core_session_t *session;
switch_channel_t *channel;
struct channel_map *chanmap;
-
-
+ int ret = 0;
+
+ switch_mutex_lock(globals.channel_mutex);
chanmap = spri->private_info;
- if (chanmap->map[pevent->ring.channel]) {
+ if (switch_core_session_locate(chanmap->map[pevent->ring.channel])) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "--Duplicate Ring on channel s%dc%d (ignored)\n",
spri->span, pevent->ring.channel);
- return 0;
+ switch_core_session_rwunlock(session);
+ ret = 0;
+ goto done;
}
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "-- Ring on channel s%dc%d (from %s to %s)\n", spri->span, pevent->ring.channel,
@@ -1232,12 +1275,12 @@
pri_acknowledge(spri->pri, pevent->ring.call, pevent->ring.channel, 0);
if ((session = switch_core_session_request(&wanpipe_endpoint_interface, NULL))) {
- struct private_object *tech_pvt;
+ private_object_t *tech_pvt;
char ani2str[4] = "";
//wanpipe_tdm_api_t tdm_api;
switch_core_session_add_stream(session, NULL);
- if ((tech_pvt = (struct private_object *) switch_core_session_alloc(session, sizeof(struct private_object)))) {
+ if ((tech_pvt = (private_object_t *) switch_core_session_alloc(session, sizeof(private_object_t)))) {
memset(tech_pvt, 0, sizeof(*tech_pvt));
switch_mutex_init(&tech_pvt->flag_mutex, SWITCH_MUTEX_NESTED, switch_core_session_get_pool(session));
channel = switch_core_session_get_channel(session);
@@ -1248,7 +1291,8 @@
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Hey where is my memory pool?\n");
switch_core_session_destroy(&session);
- return 0;
+ ret = 0;
+ goto done;
}
if (pevent->ring.ani2 >= 0) {
@@ -1288,18 +1332,19 @@
if (!wp_open(tech_pvt, spri->span, pevent->ring.channel)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't open fd!\n");
}
- //sangoma_tdm_set_hw_period(fd, &tdm_api, 480);
-
- chanmap->map[pevent->ring.channel] = session;
+ switch_copy_string(chanmap->map[pevent->ring.channel], switch_core_session_get_uuid(session), sizeof(chanmap->map[pevent->ring.channel]));
+
switch_channel_set_state(channel, CS_INIT);
switch_core_session_thread_launch(session);
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot Create new Inbound Channel!\n");
}
-
- return 0;
+ done:
+ switch_mutex_unlock(globals.channel_mutex);
+
+ return ret;
}
static int check_flags(struct sangoma_pri *spri)
@@ -1323,11 +1368,12 @@
chanmap = spri->private_info;
- if ((session = chanmap->map[pevent->restart.channel])) {
+ if ((session = switch_core_session_locate(chanmap->map[pevent->restart.channel]))) {
switch_channel_t *channel;
channel = switch_core_session_get_channel(session);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Hanging Up channel %s\n", switch_channel_get_name(channel));
switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING);
+ switch_core_session_rwunlock(session);
}
wp_restart(spri->span, pevent->restart.channel);
@@ -1369,12 +1415,12 @@
static void *SWITCH_THREAD_FUNC pri_thread_run(switch_thread_t *thread, void *obj)
{
struct sangoma_pri *spri = obj;
- struct channel_map chanmap;
+ struct channel_map chanmap = {0};
switch_event_t *s_event;
SANGOMA_MAP_PRI_EVENT((*spri), SANGOMA_PRI_EVENT_ANY, on_anything);
SANGOMA_MAP_PRI_EVENT((*spri), SANGOMA_PRI_EVENT_RING, on_ring);
- //SANGOMA_MAP_PRI_EVENT((*spri), SANGOMA_PRI_EVENT_RINGING, on_ringing);
+ SANGOMA_MAP_PRI_EVENT((*spri), SANGOMA_PRI_EVENT_RINGING, on_ringing);
//SANGOMA_MAP_PRI_EVENT((*spri), SANGOMA_PRI_EVENT_SETUP_ACK, on_proceed);
SANGOMA_MAP_PRI_EVENT((*spri), SANGOMA_PRI_EVENT_PROCEEDING, on_proceed);
SANGOMA_MAP_PRI_EVENT((*spri), SANGOMA_PRI_EVENT_ANSWER, on_answer);
@@ -1450,7 +1496,7 @@
for (span = switch_xml_child(cfg, "span"); span; span = span->next) {
- char *id = switch_xml_attr(span, "id");
+ char *id = (char *) switch_xml_attr(span, "id");
int32_t i = 0;
current_span = 0;
Modified: freeswitch/trunk/src/switch_channel.c
==============================================================================
--- freeswitch/trunk/src/switch_channel.c (original)
+++ freeswitch/trunk/src/switch_channel.c Thu Feb 8 20:34:01 2007
@@ -978,6 +978,38 @@
return channel->state;
}
+SWITCH_DECLARE(switch_status_t) switch_channel_perform_mark_pre_answered(switch_channel_t *channel,
+ const char *file,
+ const char *func,
+ int line)
+{
+ switch_event_t *event;
+
+ if (!switch_channel_test_flag(channel, CF_EARLY_MEDIA)) {
+ char *uuid;
+ switch_core_session_t *other_session;
+
+ switch_log_printf(SWITCH_CHANNEL_ID_LOG, (char *) file, func, line, SWITCH_LOG_NOTICE, "Pre-Answer %s!\n", channel->name);
+ switch_channel_set_flag(channel, CF_EARLY_MEDIA);
+ switch_channel_set_variable(channel, "endpoint_disposition", "EARLY MEDIA");
+ if (switch_event_create(&event, SWITCH_EVENT_CHANNEL_PROGRESS) == SWITCH_STATUS_SUCCESS) {
+ switch_channel_event_set_data(channel, event);
+ switch_event_fire(&event);
+ }
+
+ /* if we're in a bridge and the other channel is in a blocking read they will never realize we have answered so send
+ a SWITCH_SIG_BREAK to interrupt any blocking reads on that channel
+ */
+ if ((uuid = switch_channel_get_variable(channel, SWITCH_BRIDGE_VARIABLE)) && (other_session = switch_core_session_locate(uuid))) {
+ switch_core_session_kill_channel(other_session, SWITCH_SIG_BREAK);
+ switch_core_session_rwunlock(other_session);
+ }
+ return SWITCH_STATUS_SUCCESS;
+ }
+
+ return SWITCH_STATUS_FALSE;
+}
+
SWITCH_DECLARE(switch_status_t) switch_channel_perform_pre_answer(switch_channel_t *channel,
const char *file,
const char *func,
@@ -1006,15 +1038,7 @@
status = switch_core_session_message_send(uuid, &msg);
if (status == SWITCH_STATUS_SUCCESS) {
- switch_event_t *event;
-
- switch_log_printf(SWITCH_CHANNEL_ID_LOG, (char *) file, func, line, SWITCH_LOG_NOTICE, "Pre-Answer %s!\n", channel->name);
- switch_channel_set_flag(channel, CF_EARLY_MEDIA);
- switch_channel_set_variable(channel, "endpoint_disposition", "EARLY MEDIA");
- if (switch_event_create(&event, SWITCH_EVENT_CHANNEL_PROGRESS) == SWITCH_STATUS_SUCCESS) {
- switch_channel_event_set_data(channel, event);
- switch_event_fire(&event);
- }
+ status = switch_channel_perform_mark_pre_answered(channel, file, func, line);
}
return status;
@@ -1060,6 +1084,8 @@
int line)
{
switch_event_t *event;
+ char *uuid;
+ switch_core_session_t *other_session;
assert(channel != NULL);
@@ -1083,6 +1109,15 @@
switch_channel_event_set_data(channel, event);
switch_event_fire(&event);
}
+
+ /* if we're in a bridge and the other channel is in a blocking read they will never realize we have answered so send
+ a SWITCH_SIG_BREAK to interrupt any blocking reads on that channel
+ */
+ if ((uuid = switch_channel_get_variable(channel, SWITCH_BRIDGE_VARIABLE)) && (other_session = switch_core_session_locate(uuid))) {
+ switch_core_session_kill_channel(other_session, SWITCH_SIG_BREAK);
+ switch_core_session_rwunlock(other_session);
+ }
+
switch_channel_set_variable(channel, "endpoint_disposition", "ANSWER");
switch_log_printf(SWITCH_CHANNEL_ID_LOG, (char *) file, func, line, SWITCH_LOG_NOTICE, "Channel [%s] has been answered\n", channel->name);
Modified: freeswitch/trunk/src/switch_core.c
==============================================================================
--- freeswitch/trunk/src/switch_core.c (original)
+++ freeswitch/trunk/src/switch_core.c Thu Feb 8 20:34:01 2007
@@ -1766,6 +1766,22 @@
return status;
}
+SWITCH_DECLARE(switch_status_t) switch_core_session_flush_message(switch_core_session_t *session)
+{
+ switch_core_session_message_t *message;
+
+ if (switch_core_session_dequeue_message(session, &message) == SWITCH_STATUS_SUCCESS) {
+ if (switch_test_flag(message, SCSMF_DYNAMIC)) {
+ switch_safe_free(message);
+ } else {
+ message = NULL;
+ }
+ }
+
+ return SWITCH_STATUS_SUCCESS;
+}
+
+
SWITCH_DECLARE(switch_status_t) switch_core_session_receive_event(switch_core_session_t *session, switch_event_t **event)
{
@@ -2151,6 +2167,9 @@
session->read_resampler = NULL;
session->write_resampler = NULL;
+ /* clear indications */
+ switch_core_session_flush_message(session);
+
/* wipe theese, they will be recreated if need be */
switch_buffer_destroy(&session->raw_read_buffer);
switch_buffer_destroy(&session->raw_write_buffer);
Modified: freeswitch/trunk/src/switch_ivr.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr.c (original)
+++ freeswitch/trunk/src/switch_ivr.c Thu Feb 8 20:34:01 2007
@@ -2021,8 +2021,9 @@
message = NULL;
}
}
-
+
if (!ans_a && originator) {
+
if (!ans_b && switch_channel_test_flag(chan_b, CF_ANSWERED)) {
switch_channel_answer(chan_a);
ans_a++;
1
0
08 Feb '07
Author: mikej
Date: Thu Feb 8 16:21:12 2007
New Revision: 4173
Modified:
freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c
Log:
don't use a few more blocks either.
Modified: freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c Thu Feb 8 16:21:12 2007
@@ -2551,6 +2551,8 @@
(strncasecmp(candidates[x].address, "10.", 3) &&
strncasecmp(candidates[x].address, "192.168.", 8) &&
strncasecmp(candidates[x].address, "127.", 4) &&
+ strncasecmp(candidates[x].address, "255.", 4) &&
+ strncasecmp(candidates[x].address, "0.", 2) &&
strncasecmp(candidates[x].address, "1.", 2) &&
strncasecmp(candidates[x].address, "2.", 2) &&
strncasecmp(candidates[x].address, "172.16.", 7) &&
@@ -2560,6 +2562,7 @@
strncasecmp(candidates[x].address, "172.2", 5) &&
strncasecmp(candidates[x].address, "172.30.", 7) &&
strncasecmp(candidates[x].address, "172.31.", 7) &&
+ strncasecmp(candidates[x].address, "192.0.2.", 8) && // 192.0.0.0 - 192.0.127.255 is marked as reserved, should we filter all of them?
strncasecmp(candidates[x].address, "169.254.", 8)
))) {
ldl_payload_t payloads[5];
1
0
08 Feb '07
Author: mikej
Date: Thu Feb 8 16:16:27 2007
New Revision: 4172
Modified:
freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c
Log:
don't use 169.254. auto ip's either.
Modified: freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c Thu Feb 8 16:16:27 2007
@@ -2559,7 +2559,8 @@
strncasecmp(candidates[x].address, "172.19.", 7) &&
strncasecmp(candidates[x].address, "172.2", 5) &&
strncasecmp(candidates[x].address, "172.30.", 7) &&
- strncasecmp(candidates[x].address, "172.31.", 7)
+ strncasecmp(candidates[x].address, "172.31.", 7) &&
+ strncasecmp(candidates[x].address, "169.254.", 8)
))) {
ldl_payload_t payloads[5];
char *exten;
1
0