add wrapper code to fully encapsulate apr, apr-utils, pcre, and sqlite. fully use switch_ namespace in modules, create our own format and type defines. follow up commit for unix autotools coming soon after this. PLEASE NOTE: you will NEED to do a make megaclean and run configure again after this update (and the following commit) or it will not build.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4494 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris
2007-03-09 20:44:13 +00:00
parent 2d78da120a
commit 42e78242a3
46 changed files with 4027 additions and 2067 deletions
@@ -363,7 +363,7 @@ static void pres_event_handler(switch_event_t *event)
type, rpid, status, proto, from);
for (hi = switch_hash_first(apr_hash_pool_get(globals.profile_hash), globals.profile_hash); hi; hi = switch_hash_next(hi)) {
for (hi = switch_hash_first(switch_hash_pool_get(globals.profile_hash), globals.profile_hash); hi; hi = switch_hash_next(hi)) {
char *errmsg;
switch_hash_this(hi, NULL, NULL, &val);
profile = (struct mdl_profile *) val;
@@ -462,7 +462,7 @@ static void roster_event_handler(switch_event_t *event)
sql = switch_mprintf("select *,'%q' from subscriptions", status ? status : "");
}
for (hi = switch_hash_first(apr_hash_pool_get(globals.profile_hash), globals.profile_hash); hi; hi = switch_hash_next(hi)) {
for (hi = switch_hash_first(switch_hash_pool_get(globals.profile_hash), globals.profile_hash); hi; hi = switch_hash_next(hi)) {
char *errmsg;
switch_hash_this(hi, NULL, NULL, &val);
profile = (struct mdl_profile *) val;
@@ -537,7 +537,7 @@ static void sign_off(void)
sql = switch_mprintf("select * from subscriptions");
for (hi = switch_hash_first(apr_hash_pool_get(globals.profile_hash), globals.profile_hash); hi; hi = switch_hash_next(hi)) {
for (hi = switch_hash_first(switch_hash_pool_get(globals.profile_hash), globals.profile_hash); hi; hi = switch_hash_next(hi)) {
char *errmsg;
switch_hash_this(hi, NULL, NULL, &val);
profile = (struct mdl_profile *) val;
+6 -6
View File
@@ -717,7 +717,7 @@ static void set_local_sdp(private_object_t *tech_pvt, char *ip, uint32_t port, c
snprintf(buf, sizeof(buf),
"v=0\n"
"o=FreeSWITCH %d%"APR_TIME_T_FMT" %d%"APR_TIME_T_FMT" IN IP4 %s\n"
"o=FreeSWITCH %d%"SWITCH_TIME_T_FMT" %d%"SWITCH_TIME_T_FMT" IN IP4 %s\n"
"s=FreeSWITCH\n"
"c=IN IP4 %s\n"
"t=0 0\n"
@@ -3219,13 +3219,13 @@ static char *get_auth_data(char *dbname, char *nonce, char *npassword, size_t le
while (running < 5000) {
int result = switch_core_db_step(stmt);
if (result == SQLITE_ROW) {
if (result == SWITCH_CORE_DB_ROW) {
if ((colcount = switch_core_db_column_count(stmt))) {
switch_copy_string(npassword, (char *)switch_core_db_column_text(stmt, 0), len);
ret = npassword;
}
break;
} else if (result == SQLITE_BUSY) {
} else if (result == SWITCH_CORE_DB_BUSY) {
running++;
switch_yield(1000);
continue;
@@ -5639,7 +5639,7 @@ static void cancel_presence(void)
void *val;
if ((sql = switch_mprintf("select 0,'unavailable','unavailable',* from sip_subscriptions where event='presence'"))) {
for (hi = switch_hash_first(apr_hash_pool_get(globals.profile_hash), globals.profile_hash); hi; hi = switch_hash_next(hi)) {
for (hi = switch_hash_first(switch_hash_pool_get(globals.profile_hash), globals.profile_hash); hi; hi = switch_hash_next(hi)) {
switch_hash_this(hi, NULL, NULL, &val);
profile = (sofia_profile_t *) val;
if (!(profile->pflags & PFLAG_PRESENCE)) {
@@ -5773,7 +5773,7 @@ static void pres_event_handler(switch_event_t *event)
sql = switch_mprintf("select 1,'%q','%q',* from sip_subscriptions where event='presence'", status, rpid);
}
for (hi = switch_hash_first(apr_hash_pool_get(globals.profile_hash), globals.profile_hash); hi; hi = switch_hash_next(hi)) {
for (hi = switch_hash_first(switch_hash_pool_get(globals.profile_hash), globals.profile_hash); hi; hi = switch_hash_next(hi)) {
switch_hash_this(hi, NULL, NULL, &val);
profile = (sofia_profile_t *) val;
if (!(profile->pflags & PFLAG_PRESENCE)) {
@@ -5872,7 +5872,7 @@ static void pres_event_handler(switch_event_t *event)
break;
}
for (hi = switch_hash_first(apr_hash_pool_get(globals.profile_hash), globals.profile_hash); hi; hi = switch_hash_next(hi)) {
for (hi = switch_hash_first(switch_hash_pool_get(globals.profile_hash), globals.profile_hash); hi; hi = switch_hash_next(hi)) {
switch_hash_this(hi, NULL, NULL, &val);
profile = (sofia_profile_t *) val;
if (!(profile->pflags & PFLAG_PRESENCE)) {
+7 -7
View File
@@ -117,7 +117,7 @@ struct woomera_event_queue {
struct woomera_profile {
char *name;
switch_socket_t *woomera_socket;
apr_thread_mutex_t *iolock;
switch_mutex_t *iolock;
char woomera_host[WOOMERA_STRLEN];
switch_port_t woomera_port;
char audio_ip[WOOMERA_STRLEN];
@@ -134,9 +134,9 @@ struct private_object {
switch_codec_t read_codec;
switch_codec_t write_codec;
switch_core_session_t *session;
switch_pollfd_t read_poll;
switch_pollfd_t write_poll;
switch_pollfd_t command_poll;
switch_pollfd_t *read_poll;
switch_pollfd_t *write_poll;
switch_pollfd_t *command_poll;
char databuf[SWITCH_RECCOMMENDED_BUFFER_SIZE];
switch_mutex_t *iolock;
switch_sockaddr_t *udpread;
@@ -306,7 +306,7 @@ static void woomera_socket_close(switch_socket_t **socket)
static void udp_socket_close(struct private_object *tech_pvt)
{
if (tech_pvt->udp_socket) {
apr_socket_shutdown(tech_pvt->udp_socket, APR_SHUTDOWN_READWRITE);
switch_socket_shutdown(tech_pvt->udp_socket, SWITCH_SHUTDOWN_READWRITE);
woomera_socket_close(&tech_pvt->udp_socket);
}
}
@@ -364,7 +364,7 @@ static switch_status_t woomera_waitfor_read(switch_core_session_t *session, int
tech_pvt = switch_core_session_get_private(session);
assert(tech_pvt != NULL);
return switch_socket_waitfor(&tech_pvt->read_poll, ms) ? SWITCH_STATUS_FALSE : SWITCH_STATUS_SUCCESS;
return switch_socket_waitfor(tech_pvt->read_poll, ms) ? SWITCH_STATUS_FALSE : SWITCH_STATUS_SUCCESS;
}
static switch_status_t woomera_waitfor_write(switch_core_session_t *session, int ms, int stream_id)
@@ -375,7 +375,7 @@ static switch_status_t woomera_waitfor_write(switch_core_session_t *session, int
assert(tech_pvt != NULL);
return SWITCH_STATUS_SUCCESS;
// return switch_socket_waitfor(&tech_pvt->write_poll, ms);
// return switch_socket_waitfor(tech_pvt->write_poll, ms);
}
static switch_status_t woomera_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,