提交 07a7b6e5 authored 作者: Anthony Minessale's avatar Anthony Minessale

update dingaling to be able to use TLS jabber servers such as googletalk

see sample config for new options.

the dingaling library has changed so you must rebuild it 
rm libs/libdingaling/.complete
make installall



git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2251 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 a53f2b0c
......@@ -254,6 +254,13 @@
<param name="message" value="Jingle all the way"/>
<param name="rtp-ip" value="10.0.0.1"/>
<param name="auto-login" value="true"/>
<!-- SASL "plain" or "md5" -->
<param name="sasl" value="plain"/>
<!-- if the server where the jabber is hosted is not the same
as the one in the jid -->
<!--<param name="server" value="alternate.server.com"/>-->
<!-- Enable TLS or not -->
<param name="tls" value="true"/>
<!-- disable to trade async for more calls -->
<param name="use-rtp-timer" value="true"/>
<!-- or -->
......
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# Makefile.in generated by automake 1.9.2 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
......@@ -15,6 +15,8 @@
@SET_MAKE@
SOURCES = $(libdingaling_la_SOURCES)
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
......@@ -69,11 +71,11 @@ depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
LINK = $(LIBTOOL) --mode=link --tag=CC $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(libdingaling_la_SOURCES)
DIST_SOURCES = $(libdingaling_la_SOURCES)
......@@ -313,11 +315,11 @@ distclean-compile:
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
libdingaling_la-libdingaling.lo: src/libdingaling.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdingaling_la_CFLAGS) $(CFLAGS) -MT libdingaling_la-libdingaling.lo -MD -MP -MF "$(DEPDIR)/libdingaling_la-libdingaling.Tpo" -c -o libdingaling_la-libdingaling.lo `test -f 'src/libdingaling.c' || echo '$(srcdir)/'`src/libdingaling.c; \
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdingaling_la_CFLAGS) $(CFLAGS) -MT libdingaling_la-libdingaling.lo -MD -MP -MF "$(DEPDIR)/libdingaling_la-libdingaling.Tpo" -c -o libdingaling_la-libdingaling.lo `test -f 'src/libdingaling.c' || echo '$(srcdir)/'`src/libdingaling.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdingaling_la-libdingaling.Tpo" "$(DEPDIR)/libdingaling_la-libdingaling.Plo"; else rm -f "$(DEPDIR)/libdingaling_la-libdingaling.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/libdingaling.c' object='libdingaling_la-libdingaling.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdingaling_la_CFLAGS) $(CFLAGS) -c -o libdingaling_la-libdingaling.lo `test -f 'src/libdingaling.c' || echo '$(srcdir)/'`src/libdingaling.c
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdingaling_la_CFLAGS) $(CFLAGS) -c -o libdingaling_la-libdingaling.lo `test -f 'src/libdingaling.c' || echo '$(srcdir)/'`src/libdingaling.c
mostlyclean-libtool:
-rm -f *.lo
......@@ -353,13 +355,7 @@ uninstall-library_includeHEADERS:
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
......@@ -371,7 +367,7 @@ $(RECURSIVE_TARGETS):
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
......@@ -379,13 +375,7 @@ $(RECURSIVE_TARGETS):
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
......@@ -406,7 +396,7 @@ maintainer-clean-recursive:
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -100,9 +100,16 @@ typedef enum {
LDL_FLAG_RUNNING = (1 << 1),
LDL_FLAG_AUTHORIZED = (1 << 2),
LDL_FLAG_READY = (1 << 3),
LDL_FLAG_CONNECTED = (1 << 4)
LDL_FLAG_CONNECTED = (1 << 4),
LDL_FLAG_QUEUE_RUNNING = (1 << 5),
} ldl_flag_t;
typedef enum {
LDL_FLAG_TLS = (1 << 10),
LDL_FLAG_SASL_PLAIN = (1 << 11),
LDL_FLAG_SASL_MD5 = (1 << 12)
} ldl_user_flag_t;
typedef enum {
LDL_SIGNAL_NONE,
LDL_SIGNAL_INITIATE,
......@@ -171,6 +178,23 @@ typedef void (*ldl_logger_t)(char *file, const char *func, int line, int level,
*/
#define ldl_clear_flag(obj, flag) (obj)->flags &= ~(flag)
/*!
\brief Set a flag on an arbitrary object while locked
\param obj the object to set the flags on
\param flag the or'd list of flags to set
*/
#define ldl_set_flag_locked(obj, flag) assert(obj->flag_mutex != NULL);\
apr_thread_mutex_lock(obj->flag_mutex);\
(obj)->flags |= (flag);\
apr_thread_mutex_unlock(obj->flag_mutex);
/*!
\brief Clear a flag on an arbitrary object
\param obj the object to test
\param flag the or'd list of flags to clear
*/
#define ldl_clear_flag_locked(obj, flag) apr_thread_mutex_lock(obj->flag_mutex); (obj)->flags &= ~(flag); apr_thread_mutex_unlock(obj->flag_mutex);
/*!
\brief Copy flags from one arbitrary object to another
\param dest the object to copy the flags to
......@@ -389,6 +413,8 @@ int8_t ldl_handle_ready(ldl_handle_t *handle);
ldl_status ldl_handle_init(ldl_handle_t **handle,
char *login,
char *password,
char *server,
ldl_user_flag_t flags,
char *status_msg,
ldl_loop_callback_t loop_callback,
ldl_session_callback_t session_callback,
......
......@@ -97,10 +97,12 @@ struct mdl_profile {
char *ip;
char *extip;
char *lanaddr;
char *server;
char *exten;
char *context;
ldl_handle_t *handle;
unsigned int flags;
uint32_t flags;
uint32_t user_flags;
};
struct private_object {
......@@ -1146,6 +1148,8 @@ static switch_status_t init_profile(struct mdl_profile *profile, uint8_t login)
if (ldl_handle_init(&handle,
profile->login,
profile->password,
profile->server,
profile->user_flags,
profile->message,
handle_loop,
handle_signalling,
......@@ -1224,8 +1228,20 @@ static void set_profile_val(struct mdl_profile *profile, char *var, char *val)
profile->ip = switch_core_strdup(module_pool, val);
} else if (!strcasecmp(var, "ext-rtp-ip")) {
profile->extip = switch_core_strdup(module_pool, val);
} else if (!strcasecmp(var, "server")) {
profile->server = switch_core_strdup(module_pool, val);
} else if (!strcasecmp(var, "lanaddr")) {
profile->lanaddr = switch_core_strdup(module_pool, val);
} else if (!strcasecmp(var, "tls")) {
if (switch_true(val)) {
profile->user_flags |= LDL_FLAG_TLS;
}
} else if (!strcasecmp(var, "sasl")) {
if (!strcasecmp(val, "plain")) {
profile->user_flags |= LDL_FLAG_SASL_PLAIN;
} else if (!strcasecmp(val, "md5")) {
profile->user_flags |= LDL_FLAG_SASL_MD5;
}
} else if (!strcasecmp(var, "exten")) {
profile->exten = switch_core_strdup(module_pool, val);
} else if (!strcasecmp(var, "context")) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论