From b378d355344dab546f6370fd884c51b14b3d70e1 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Sat, 7 Apr 2007 02:10:17 +0000 Subject: [PATCH] merge 2 git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4877 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- libs/apr/include/arch/unix/apr_private.h.in | 16 ++++++++-------- libs/libdingaling/src/libdingaling.c | 3 ++- src/mod/endpoints/mod_dingaling/mod_dingaling.c | 3 ++- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/libs/apr/include/arch/unix/apr_private.h.in b/libs/apr/include/arch/unix/apr_private.h.in index c3e90531b0..a63fa57b7d 100644 --- a/libs/apr/include/arch/unix/apr_private.h.in +++ b/libs/apr/include/arch/unix/apr_private.h.in @@ -632,16 +632,16 @@ /* */ #undef SIGWAIT_TAKES_ONE_ARG -/* The size of a `char', as computed by sizeof. */ +/* The size of `char', as computed by sizeof. */ #undef SIZEOF_CHAR -/* The size of a `int', as computed by sizeof. */ +/* The size of `int', as computed by sizeof. */ #undef SIZEOF_INT -/* The size of a `long', as computed by sizeof. */ +/* The size of `long', as computed by sizeof. */ #undef SIZEOF_LONG -/* The size of a `long long', as computed by sizeof. */ +/* The size of `long long', as computed by sizeof. */ #undef SIZEOF_LONG_LONG /* The size of off_t */ @@ -650,7 +650,7 @@ /* The size of pid_t */ #undef SIZEOF_PID_T -/* The size of a `short', as computed by sizeof. */ +/* The size of `short', as computed by sizeof. */ #undef SIZEOF_SHORT /* The size of size_t */ @@ -659,7 +659,7 @@ /* The size of ssize_t */ #undef SIZEOF_SSIZE_T -/* The size of a `void*', as computed by sizeof. */ +/* The size of `void*', as computed by sizeof. */ #undef SIZEOF_VOIDP /* Define to 1 if you have the ANSI C header files. */ @@ -752,13 +752,13 @@ #undef inline #endif -/* Define to `long' if does not define. */ +/* Define to `long int' if does not define. */ #undef off_t /* Define to `int' if does not define. */ #undef pid_t -/* Define to `unsigned' if does not define. */ +/* Define to `unsigned int' if does not define. */ #undef size_t /* Define to `int' if does not define. */ diff --git a/libs/libdingaling/src/libdingaling.c b/libs/libdingaling/src/libdingaling.c index fd290af5db..f60ab33d82 100644 --- a/libs/libdingaling/src/libdingaling.c +++ b/libs/libdingaling/src/libdingaling.c @@ -640,7 +640,7 @@ static int on_disco_default(void *user_data, ikspak *pak) iks *iq, *query, *tag; uint8_t send = 0; int x; - + printf("WTF ?????\n"); if (pak && pak->query) { ns = iks_find_attrib(pak->query, "xmlns"); node = iks_find_attrib(pak->query, "node"); @@ -766,6 +766,7 @@ static int on_presence(void *user_data, ikspak *pak) if (resource && strstr(resource, "talk") && (buffer = apr_hash_get(handle->probe_hash, id, APR_HASH_KEY_STRING))) { + printf("WTF Lookup %s\n", from); apr_cpystrn(buffer->buf, from, buffer->len); fflush(stderr); buffer->hit = 1; diff --git a/src/mod/endpoints/mod_dingaling/mod_dingaling.c b/src/mod/endpoints/mod_dingaling/mod_dingaling.c index 4791355847..d06dd13028 100644 --- a/src/mod/endpoints/mod_dingaling/mod_dingaling.c +++ b/src/mod/endpoints/mod_dingaling/mod_dingaling.c @@ -2543,7 +2543,7 @@ static ldl_status handle_signalling(ldl_handle_t * handle, ldl_session_t * dlses } } else { - if (dl_signal != LDL_SIGNAL_INITIATE) { + if (dl_signal != LDL_SIGNAL_INITIATE && !msg) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Session is already dead\n"); status = LDL_STATUS_FALSE; goto done; @@ -2551,6 +2551,7 @@ static ldl_status handle_signalling(ldl_handle_t * handle, ldl_session_t * dlses if ((session = switch_core_session_request(&channel_endpoint_interface, NULL)) != 0) { switch_core_session_add_stream(session, NULL); + if ((tech_pvt = (struct private_object *) switch_core_session_alloc(session, sizeof(struct private_object))) != 0) { memset(tech_pvt, 0, sizeof(*tech_pvt)); switch_mutex_init(&tech_pvt->flag_mutex, SWITCH_MUTEX_NESTED, switch_core_session_get_pool(session));