[asterisk-commits] mmichelson: trunk r386540 - in /trunk: ./ channels/ configs/ include/asterisk...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Apr 25 13:25:35 CDT 2013


Author: mmichelson
Date: Thu Apr 25 13:25:31 2013
New Revision: 386540

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=386540
Log:
Merge the pimp_my_sip branch into trunk.

The pimp_my_sip branch is being merged at this point because
it offers basic functionality, and from an API standpoint, things
are complete.

SIP work is *not* feature-complete; however, with the completion
of the SUBSCRIBE/NOTIFY API, all APIs (except a PUBLISH API) have
been created, and thus it is possible for developers to attempt
to create new SIP work.

API documentation can be found in the doxygen in the code, but
usability documentation is still lacking.


Added:
    trunk/channels/chan_gulp.c
      - copied unchanged from r386532, team/group/pimp_my_sip/channels/chan_gulp.c
    trunk/configs/res_sip.conf.sample
      - copied unchanged from r386532, team/group/pimp_my_sip/configs/res_sip.conf.sample
    trunk/include/asterisk/res_sip.h
      - copied unchanged from r386532, team/group/pimp_my_sip/include/asterisk/res_sip.h
    trunk/include/asterisk/res_sip_pubsub.h
      - copied unchanged from r386532, team/group/pimp_my_sip/include/asterisk/res_sip_pubsub.h
    trunk/include/asterisk/res_sip_session.h
      - copied unchanged from r386532, team/group/pimp_my_sip/include/asterisk/res_sip_session.h
    trunk/res/res_sip/
      - copied from r386532, team/group/pimp_my_sip/res/res_sip/
    trunk/res/res_sip.c
      - copied unchanged from r386532, team/group/pimp_my_sip/res/res_sip.c
    trunk/res/res_sip.exports.in
      - copied unchanged from r386532, team/group/pimp_my_sip/res/res_sip.exports.in
    trunk/res/res_sip/config_auth.c
      - copied unchanged from r386532, team/group/pimp_my_sip/res/res_sip/config_auth.c
    trunk/res/res_sip/config_domain_aliases.c
      - copied unchanged from r386532, team/group/pimp_my_sip/res/res_sip/config_domain_aliases.c
    trunk/res/res_sip/config_transport.c
      - copied unchanged from r386532, team/group/pimp_my_sip/res/res_sip/config_transport.c
    trunk/res/res_sip/include/
      - copied from r386532, team/group/pimp_my_sip/res/res_sip/include/
    trunk/res/res_sip/include/res_sip_private.h
      - copied unchanged from r386532, team/group/pimp_my_sip/res/res_sip/include/res_sip_private.h
    trunk/res/res_sip/location.c
      - copied unchanged from r386532, team/group/pimp_my_sip/res/res_sip/location.c
    trunk/res/res_sip/sip_configuration.c
      - copied unchanged from r386532, team/group/pimp_my_sip/res/res_sip/sip_configuration.c
    trunk/res/res_sip/sip_distributor.c
      - copied unchanged from r386532, team/group/pimp_my_sip/res/res_sip/sip_distributor.c
    trunk/res/res_sip/sip_options.c
      - copied unchanged from r386532, team/group/pimp_my_sip/res/res_sip/sip_options.c
    trunk/res/res_sip/sip_outbound_auth.c
      - copied unchanged from r386532, team/group/pimp_my_sip/res/res_sip/sip_outbound_auth.c
    trunk/res/res_sip_acl.c
      - copied unchanged from r386532, team/group/pimp_my_sip/res/res_sip_acl.c
    trunk/res/res_sip_authenticator_digest.c
      - copied unchanged from r386532, team/group/pimp_my_sip/res/res_sip_authenticator_digest.c
    trunk/res/res_sip_caller_id.c
      - copied unchanged from r386532, team/group/pimp_my_sip/res/res_sip_caller_id.c
    trunk/res/res_sip_dtmf_info.c
      - copied unchanged from r386532, team/group/pimp_my_sip/res/res_sip_dtmf_info.c
    trunk/res/res_sip_endpoint_identifier_constant.c
      - copied unchanged from r386532, team/group/pimp_my_sip/res/res_sip_endpoint_identifier_constant.c
    trunk/res/res_sip_endpoint_identifier_ip.c
      - copied unchanged from r386532, team/group/pimp_my_sip/res/res_sip_endpoint_identifier_ip.c
    trunk/res/res_sip_endpoint_identifier_user.c
      - copied unchanged from r386532, team/group/pimp_my_sip/res/res_sip_endpoint_identifier_user.c
    trunk/res/res_sip_logger.c
      - copied unchanged from r386532, team/group/pimp_my_sip/res/res_sip_logger.c
    trunk/res/res_sip_mwi.c
      - copied unchanged from r386532, team/group/pimp_my_sip/res/res_sip_mwi.c
    trunk/res/res_sip_nat.c
      - copied unchanged from r386532, team/group/pimp_my_sip/res/res_sip_nat.c
    trunk/res/res_sip_outbound_authenticator_digest.c
      - copied unchanged from r386532, team/group/pimp_my_sip/res/res_sip_outbound_authenticator_digest.c
    trunk/res/res_sip_outbound_registration.c
      - copied unchanged from r386532, team/group/pimp_my_sip/res/res_sip_outbound_registration.c
    trunk/res/res_sip_pubsub.c
      - copied unchanged from r386532, team/group/pimp_my_sip/res/res_sip_pubsub.c
    trunk/res/res_sip_pubsub.exports.in
      - copied unchanged from r386532, team/group/pimp_my_sip/res/res_sip_pubsub.exports.in
    trunk/res/res_sip_registrar.c
      - copied unchanged from r386532, team/group/pimp_my_sip/res/res_sip_registrar.c
    trunk/res/res_sip_rfc3326.c
      - copied unchanged from r386532, team/group/pimp_my_sip/res/res_sip_rfc3326.c
    trunk/res/res_sip_sdp_rtp.c   (props changed)
      - copied unchanged from r386532, team/group/pimp_my_sip/res/res_sip_sdp_rtp.c
    trunk/res/res_sip_session.c
      - copied unchanged from r386532, team/group/pimp_my_sip/res/res_sip_session.c
    trunk/res/res_sip_session.exports.in
      - copied unchanged from r386532, team/group/pimp_my_sip/res/res_sip_session.exports.in
Modified:
    trunk/   (props changed)
    trunk/channels/Makefile
    trunk/configure
    trunk/include/asterisk/autoconfig.h.in
    trunk/include/asterisk/sorcery.h
    trunk/include/asterisk/threadpool.h
    trunk/main/astobj2.c
    trunk/main/loader.c
    trunk/main/sorcery.c
    trunk/main/taskprocessor.c
    trunk/main/threadpool.c
    trunk/res/Makefile
    trunk/res/res_sorcery_config.c
    trunk/tests/test_sorcery.c

Propchange: trunk/
------------------------------------------------------------------------------
    automerge = *

Propchange: trunk/
------------------------------------------------------------------------------
    automerge-email = mmichelson at digium.com

Propchange: trunk/
------------------------------------------------------------------------------
    svnmerge-integrated = /trunk:1-386489

Modified: trunk/channels/Makefile
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/Makefile?view=diff&rev=386540&r1=386539&r2=386540
==============================================================================
--- trunk/channels/Makefile (original)
+++ trunk/channels/Makefile Thu Apr 25 13:25:31 2013
@@ -113,3 +113,4 @@
 
 h323/libchanh323.a: h323/Makefile.ast
 	$(CMD_PREFIX) $(MAKE) -C h323 libchanh323.a
+

Modified: trunk/include/asterisk/autoconfig.h.in
URL: http://svnview.digium.com/svn/asterisk/trunk/include/asterisk/autoconfig.h.in?view=diff&rev=386540&r1=386539&r2=386540
==============================================================================
--- trunk/include/asterisk/autoconfig.h.in (original)
+++ trunk/include/asterisk/autoconfig.h.in Thu Apr 25 13:25:31 2013
@@ -294,7 +294,7 @@
 /* Define if your system has the GLOB_NOMAGIC headers. */
 #undef HAVE_GLOB_NOMAGIC
 
-/* Define if your system has the GMIME libraries. */
+/* Define to 1 if you have the GMime library. */
 #undef HAVE_GMIME
 
 /* Define to indicate the GSM library */
@@ -306,7 +306,7 @@
 /* Define to indicate that gsm.h has no prefix for its location */
 #undef HAVE_GSM_HEADER
 
-/* Define if your system has the GTK2 libraries. */
+/* Define to 1 if you have the gtk2 library. */
 #undef HAVE_GTK2
 
 /* Define to 1 if you have the Hoard Memory Allocator library. */
@@ -324,7 +324,7 @@
 /* Define to 1 if you have the Iksemel Jabber library. */
 #undef HAVE_IKSEMEL
 
-/* Define if your system has the ILBC libraries. */
+/* Define to 1 if you have the System iLBC library. */
 #undef HAVE_ILBC
 
 /* Define if your system has the UW IMAP Toolkit c-client library. */
@@ -376,7 +376,7 @@
 /* Define to 1 if you have the OpenLDAP library. */
 #undef HAVE_LDAP
 
-/* Define if your system has the LIBEDIT libraries. */
+/* Define to 1 if you have the NetBSD Editline library library. */
 #undef HAVE_LIBEDIT
 
 /* Define to 1 if you have the <libintl.h> header file. */
@@ -551,7 +551,7 @@
 /* Define to indicate presence of the pg_encoding_to_char API. */
 #undef HAVE_PGSQL_pg_encoding_to_char
 
-/* Define if your system has the PJPROJECT libraries. */
+/* Define to 1 if you have the PJPROJECT library. */
 #undef HAVE_PJPROJECT
 
 /* Define to 1 if your system defines IP_PKTINFO. */
@@ -854,19 +854,19 @@
 /* Define to 1 if you have the `strtoq' function. */
 #undef HAVE_STRTOQ
 
-/* Define to 1 if `ifr_ifru.ifru_hwaddr' is a member of `struct ifreq'. */
+/* Define to 1 if `ifr_ifru.ifru_hwaddr' is member of `struct ifreq'. */
 #undef HAVE_STRUCT_IFREQ_IFR_IFRU_IFRU_HWADDR
 
-/* Define to 1 if `uid' is a member of `struct sockpeercred'. */
+/* Define to 1 if `uid' is member of `struct sockpeercred'. */
 #undef HAVE_STRUCT_SOCKPEERCRED_UID
 
-/* Define to 1 if `st_blksize' is a member of `struct stat'. */
+/* Define to 1 if `st_blksize' is member of `struct stat'. */
 #undef HAVE_STRUCT_STAT_ST_BLKSIZE
 
-/* Define to 1 if `cr_uid' is a member of `struct ucred'. */
+/* Define to 1 if `cr_uid' is member of `struct ucred'. */
 #undef HAVE_STRUCT_UCRED_CR_UID
 
-/* Define to 1 if `uid' is a member of `struct ucred'. */
+/* Define to 1 if `uid' is member of `struct ucred'. */
 #undef HAVE_STRUCT_UCRED_UID
 
 /* Define to 1 if you have the mISDN Supplemental Services library. */
@@ -1144,11 +1144,11 @@
 /* Define to the one symbol short name of this package. */
 #undef PACKAGE_TARNAME
 
-/* Define to the home page for this package. */
-#undef PACKAGE_URL
-
 /* Define to the version of this package. */
 #undef PACKAGE_VERSION
+
+/* Define to 1 if the C compiler supports function prototypes. */
+#undef PROTOTYPES
 
 /* Define to necessary symbol if this constant uses a non-standard name on
    your system. */
@@ -1168,6 +1168,11 @@
 
 /* Define to the type of arg 5 for `select'. */
 #undef SELECT_TYPE_ARG5
+
+/* Define to 1 if the `setvbuf' function takes the buffering type as its
+   second argument and the buffer pointer as the third, as on System V before
+   release 3. */
+#undef SETVBUF_REVERSED
 
 /* The size of `char *', as computed by sizeof. */
 #undef SIZEOF_CHAR_P
@@ -1204,54 +1209,53 @@
 /* Define to a type of the same size as fd_set.fds_bits[[0]] */
 #undef TYPEOF_FD_SET_FDS_BITS
 
-/* Enable extensions on AIX 3, Interix.  */
+/* Define to 1 if on AIX 3.
+   System headers sometimes define this.
+   We just want to avoid a redefinition error message.  */
 #ifndef _ALL_SOURCE
 # undef _ALL_SOURCE
 #endif
+
+/* Define to 1 if running on Darwin. */
+#undef _DARWIN_UNLIMITED_SELECT
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+#undef _FILE_OFFSET_BITS
+
 /* Enable GNU extensions on systems that have them.  */
 #ifndef _GNU_SOURCE
 # undef _GNU_SOURCE
 #endif
-/* Enable threading extensions on Solaris.  */
+
+/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
+#undef _LARGEFILE_SOURCE
+
+/* Define for large files, on AIX-style hosts. */
+#undef _LARGE_FILES
+
+/* Define to 1 if on MINIX. */
+#undef _MINIX
+
+/* Define to 2 if the system does not provide POSIX.1 features except with
+   this defined. */
+#undef _POSIX_1_SOURCE
+
+/* Define to 1 if you need to in order for `stat' and other things to work. */
+#undef _POSIX_SOURCE
+
+/* Enable extensions on Solaris.  */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
 #ifndef _POSIX_PTHREAD_SEMANTICS
 # undef _POSIX_PTHREAD_SEMANTICS
 #endif
-/* Enable extensions on HP NonStop.  */
 #ifndef _TANDEM_SOURCE
 # undef _TANDEM_SOURCE
 #endif
-/* Enable general extensions on Solaris.  */
-#ifndef __EXTENSIONS__
-# undef __EXTENSIONS__
-#endif
-
-
-/* Define to 1 if running on Darwin. */
-#undef _DARWIN_UNLIMITED_SELECT
-
-/* Enable large inode numbers on Mac OS X 10.5.  */
-#ifndef _DARWIN_USE_64_BIT_INODE
-# define _DARWIN_USE_64_BIT_INODE 1
-#endif
-
-/* Number of bits in a file offset, on hosts where this is settable. */
-#undef _FILE_OFFSET_BITS
-
-/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
-#undef _LARGEFILE_SOURCE
-
-/* Define for large files, on AIX-style hosts. */
-#undef _LARGE_FILES
-
-/* Define to 1 if on MINIX. */
-#undef _MINIX
-
-/* Define to 2 if the system does not provide POSIX.1 features except with
-   this defined. */
-#undef _POSIX_1_SOURCE
-
-/* Define to 1 if you need to in order for `stat' and other things to work. */
-#undef _POSIX_SOURCE
+
+/* Define like PROTOTYPES; this can be used by system headers. */
+#undef __PROTOTYPES
 
 /* Define to empty if `const' does not conform to ANSI C. */
 #undef const

Modified: trunk/include/asterisk/sorcery.h
URL: http://svnview.digium.com/svn/asterisk/trunk/include/asterisk/sorcery.h?view=diff&rev=386540&r1=386539&r2=386540
==============================================================================
--- trunk/include/asterisk/sorcery.h (original)
+++ trunk/include/asterisk/sorcery.h Thu Apr 25 13:25:31 2013
@@ -157,10 +157,15 @@
 /*!
  * \brief A callback function for when an object set is successfully applied to an object
  *
+ * \note On a failure return, the state of the object is left undefined. It is a bad
+ * idea to try to use this object.
+ *
  * \param sorcery Sorcery structure in use
  * \param obj The object itself
- */
-typedef void (*sorcery_apply_handler)(const struct ast_sorcery *sorcery, void *obj);
+ * \retval 0 Success
+ * \retval non-zero Failure
+ */
+typedef int (*sorcery_apply_handler)(const struct ast_sorcery *sorcery, void *obj);
 
 /*!
  * \brief A callback function for copying the contents of one object to another

Modified: trunk/include/asterisk/threadpool.h
URL: http://svnview.digium.com/svn/asterisk/trunk/include/asterisk/threadpool.h?view=diff&rev=386540&r1=386539&r2=386540
==============================================================================
--- trunk/include/asterisk/threadpool.h (original)
+++ trunk/include/asterisk/threadpool.h Thu Apr 25 13:25:31 2013
@@ -108,6 +108,20 @@
 	 * maximum size.
 	 */
 	int max_size;
+	/*!
+	 * \brief Function to call when a thread starts
+	 *
+	 * This is useful if there is something common that all threads
+	 * in a threadpool need to do when they start.
+	 */
+	void (*thread_start)(void);
+	/*!
+	 * \brief Function to call when a thread ends
+	 *
+	 * This is useful if there is common cleanup to execute when
+	 * a thread completes
+	 */
+	void (*thread_end)(void);
 };
 
 /*!

Modified: trunk/main/astobj2.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/astobj2.c?view=diff&rev=386540&r1=386539&r2=386540
==============================================================================
--- trunk/main/astobj2.c (original)
+++ trunk/main/astobj2.c Thu Apr 25 13:25:31 2013
@@ -525,6 +525,7 @@
 	struct astobj2 *obj = INTERNAL_OBJ(user_data);
 
 	if (obj == NULL) {
+		ast_backtrace();
 		ast_assert(0);
 		return -1;
 	}

Modified: trunk/main/loader.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/loader.c?view=diff&rev=386540&r1=386539&r2=386540
==============================================================================
--- trunk/main/loader.c (original)
+++ trunk/main/loader.c Thu Apr 25 13:25:31 2013
@@ -842,6 +842,7 @@
 		return AST_MODULE_LOAD_FAILURE;
 	}
 
+	printf ("!!! Going to load %s\n", mod->resource);
 	res = mod->info->load();
 
 	switch (res) {

Modified: trunk/main/sorcery.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/sorcery.c?view=diff&rev=386540&r1=386539&r2=386540
==============================================================================
--- trunk/main/sorcery.c (original)
+++ trunk/main/sorcery.c Thu Apr 25 13:25:31 2013
@@ -740,7 +740,7 @@
 	}
 
 	if (!res && object_type->apply) {
-		object_type->apply(sorcery, object);
+		res = object_type->apply(sorcery, object);
 	}
 
 	return res;
@@ -940,6 +940,7 @@
 	unsigned int cached = 0;
 
 	if (!object_type) {
+		ast_log(LOG_NOTICE, "Can't find object type '%s'\n", type);
 		return NULL;
 	}
 

Modified: trunk/main/taskprocessor.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/taskprocessor.c?view=diff&rev=386540&r1=386539&r2=386540
==============================================================================
--- trunk/main/taskprocessor.c (original)
+++ trunk/main/taskprocessor.c Thu Apr 25 13:25:31 2013
@@ -602,7 +602,6 @@
 	/* Unref listener here since the taskprocessor has gained a reference to the listener */
 	ao2_ref(listener, -1);
 	return p;
-
 }
 
 struct ast_taskprocessor *ast_taskprocessor_create_with_listener(const char *name, struct ast_taskprocessor_listener *listener)

Modified: trunk/main/threadpool.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/threadpool.c?view=diff&rev=386540&r1=386539&r2=386540
==============================================================================
--- trunk/main/threadpool.c (original)
+++ trunk/main/threadpool.c Thu Apr 25 13:25:31 2013
@@ -983,7 +983,13 @@
 {
 	struct worker_thread *worker = arg;
 
+	if (worker->options.thread_start) {
+		worker->options.thread_start();
+	}
 	worker_active(worker);
+	if (worker->options.thread_end) {
+		worker->options.thread_end();
+	}
 	return NULL;
 }
 

Modified: trunk/res/Makefile
URL: http://svnview.digium.com/svn/asterisk/trunk/res/Makefile?view=diff&rev=386540&r1=386539&r2=386540
==============================================================================
--- trunk/res/Makefile (original)
+++ trunk/res/Makefile Thu Apr 25 13:25:31 2013
@@ -43,6 +43,9 @@
 $(if $(filter res_ael_share,$(EMBEDDED_MODS)),modules.link,res_ael_share.so): ael/ael_lex.o ael/ael.tab.o ael/pval.o
 ael/ael_lex.o ael/ael.tab.o ael/pval.o: _ASTCFLAGS+=$(call MOD_ASTCFLAGS,res_ael_share)
 
+$(if $(filter res_sip,$(EMBEDDED_MODS)),modules.link,res_sip.so): $(subst .c,.o,$(wildcard res_sip/*.c))
+$(subst .c,.o,$(wildcard res_sip/*.c)): _ASTCFLAGS+=$(call MOD_ASTCFLAGS,res_sip)
+
 ifneq ($(findstring REBUILD_PARSERS,$(MENUSELECT_CFLAGS)),)
 ael/ael_lex.c: ael/ael.flex
 else
@@ -67,7 +70,7 @@
 ael/pval.o: ael/pval.c
 
 clean::
-	rm -f snmp/*.[oi] ael/*.[oi] ais/*.[oi] stasis_http/*.[oi]
+	rm -f snmp/*.[oi] ael/*.[oi] ais/*.[oi] stasis_http/*.[oi] res_sip/*.[oi]
 
 # Dependencies for res_stasis_http_*.so are generated, so they're in this file
 include stasis_http.make

Propchange: trunk/res/res_sip_sdp_rtp.c
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: trunk/res/res_sip_sdp_rtp.c
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: trunk/res/res_sip_sdp_rtp.c
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: trunk/res/res_sorcery_config.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_sorcery_config.c?view=diff&rev=386540&r1=386539&r2=386540
==============================================================================
--- trunk/res/res_sorcery_config.c (original)
+++ trunk/res/res_sorcery_config.c Thu Apr 25 13:25:31 2013
@@ -199,7 +199,6 @@
 	if (!config_objects) {
 		return;
 	}
-
 	ao2_callback(config_objects, 0, sorcery_config_fields_cmp, &params);
 }
 

Modified: trunk/tests/test_sorcery.c
URL: http://svnview.digium.com/svn/asterisk/trunk/tests/test_sorcery.c?view=diff&rev=386540&r1=386539&r2=386540
==============================================================================
--- trunk/tests/test_sorcery.c (original)
+++ trunk/tests/test_sorcery.c Thu Apr 25 13:25:31 2013
@@ -130,9 +130,10 @@
 static int apply_handler_called;
 
 /*! \brief Simple apply handler which sets global scope integer to 1 if called */
-static void test_apply_handler(const struct ast_sorcery *sorcery, void *obj)
+static int test_apply_handler(const struct ast_sorcery *sorcery, void *obj)
 {
 	apply_handler_called = 1;
+	return 0;
 }
 
 /*! \brief Global scope caching structure for testing */




More information about the asterisk-commits mailing list