[asterisk-commits] oej: branch oej/bp-res_conf_ldap-1.4 r272641 - in /team/oej/bp-res_conf_ldap-...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Jun 27 07:03:38 CDT 2010


Author: oej
Date: Sun Jun 27 07:03:30 2010
New Revision: 272641

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=272641
Log:
Resolve conflict, reset automerge

Added:
    team/oej/bp-res_conf_ldap-1.4/doc/plc.txt
      - copied unchanged from r272562, branches/1.4/doc/plc.txt
Modified:
    team/oej/bp-res_conf_ldap-1.4/   (props changed)
    team/oej/bp-res_conf_ldap-1.4/Makefile
    team/oej/bp-res_conf_ldap-1.4/apps/app_meetme.c
    team/oej/bp-res_conf_ldap-1.4/apps/app_queue.c
    team/oej/bp-res_conf_ldap-1.4/apps/app_voicemail.c
    team/oej/bp-res_conf_ldap-1.4/autoconf/libcurl.m4
    team/oej/bp-res_conf_ldap-1.4/cdr/cdr_tds.c
    team/oej/bp-res_conf_ldap-1.4/channels/chan_agent.c
    team/oej/bp-res_conf_ldap-1.4/channels/chan_dahdi.c
    team/oej/bp-res_conf_ldap-1.4/channels/chan_iax2.c
    team/oej/bp-res_conf_ldap-1.4/channels/chan_oss.c
    team/oej/bp-res_conf_ldap-1.4/channels/chan_sip.c
    team/oej/bp-res_conf_ldap-1.4/channels/h323/Makefile.in
    team/oej/bp-res_conf_ldap-1.4/configs/extensions.conf.sample
    team/oej/bp-res_conf_ldap-1.4/configs/sip_notify.conf.sample
    team/oej/bp-res_conf_ldap-1.4/configs/voicemail.conf.sample
    team/oej/bp-res_conf_ldap-1.4/configure.ac
    team/oej/bp-res_conf_ldap-1.4/contrib/init.d/rc.debian.asterisk
    team/oej/bp-res_conf_ldap-1.4/doc/HOWTO_collect_debug_information.txt
    team/oej/bp-res_conf_ldap-1.4/doc/voicemail_odbc_postgresql.txt
    team/oej/bp-res_conf_ldap-1.4/include/asterisk/autoconfig.h.in
    team/oej/bp-res_conf_ldap-1.4/include/asterisk/lock.h
    team/oej/bp-res_conf_ldap-1.4/main/acl.c
    team/oej/bp-res_conf_ldap-1.4/main/asterisk.c
    team/oej/bp-res_conf_ldap-1.4/main/channel.c
    team/oej/bp-res_conf_ldap-1.4/main/cli.c
    team/oej/bp-res_conf_ldap-1.4/main/dnsmgr.c
    team/oej/bp-res_conf_ldap-1.4/main/frame.c
    team/oej/bp-res_conf_ldap-1.4/main/logger.c
    team/oej/bp-res_conf_ldap-1.4/main/pbx.c
    team/oej/bp-res_conf_ldap-1.4/main/term.c
    team/oej/bp-res_conf_ldap-1.4/makeopts.in
    team/oej/bp-res_conf_ldap-1.4/pbx/pbx_ael.c
    team/oej/bp-res_conf_ldap-1.4/pbx/pbx_dundi.c
    team/oej/bp-res_conf_ldap-1.4/res/res_musiconhold.c

Propchange: team/oej/bp-res_conf_ldap-1.4/
------------------------------------------------------------------------------
    automerge = http://www.codename-pineapple.org/

Propchange: team/oej/bp-res_conf_ldap-1.4/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sun Jun 27 07:03:30 2010
@@ -1,1 +1,1 @@
-/branches/1.4:1-267566
+/branches/1.4:1-272640

Modified: team/oej/bp-res_conf_ldap-1.4/Makefile
URL: http://svnview.digium.com/svn/asterisk/team/oej/bp-res_conf_ldap-1.4/Makefile?view=diff&rev=272641&r1=272640&r2=272641
==============================================================================
--- team/oej/bp-res_conf_ldap-1.4/Makefile (original)
+++ team/oej/bp-res_conf_ldap-1.4/Makefile Sun Jun 27 07:03:30 2010
@@ -57,6 +57,7 @@
 export AR
 export RANLIB
 export HOST_CC
+export BUILD_CC
 export STATIC_BUILD
 export INSTALL
 export DESTDIR
@@ -783,7 +784,7 @@
 	- at menuselect/nmenuselect menuselect.makeopts && (echo "menuselect changes saved!"; rm -f channels/h323/Makefile.ast main/asterisk) || echo "menuselect changes NOT saved!"
 
 # options for make in menuselect/
-MAKE_MENUSELECT=CC="$(HOST_CC)" CXX="$(CXX)" LD="" AR="" RANLIB="" CFLAGS="" $(MAKE) -C menuselect CONFIGURE_SILENT="--silent"
+MAKE_MENUSELECT=CC="$(BUILD_CC)" CXX="" LD="" AR="" RANLIB="" CFLAGS="" $(MAKE) -C menuselect CONFIGURE_SILENT="--silent"
 
 menuselect/menuselect: menuselect/makeopts
 	+$(MAKE_MENUSELECT) menuselect

Modified: team/oej/bp-res_conf_ldap-1.4/apps/app_meetme.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/bp-res_conf_ldap-1.4/apps/app_meetme.c?view=diff&rev=272641&r1=272640&r2=272641
==============================================================================
--- team/oej/bp-res_conf_ldap-1.4/apps/app_meetme.c (original)
+++ team/oej/bp-res_conf_ldap-1.4/apps/app_meetme.c Sun Jun 27 07:03:30 2010
@@ -2873,10 +2873,11 @@
 				if (allowretry)
 					confno[0] = '\0';
 			} else {
-				if ((!ast_strlen_zero(cnf->pin) &&
-				     !ast_test_flag(&confflags, CONFFLAG_ADMIN)) ||
+				if (((!ast_strlen_zero(cnf->pin) &&
+				    !ast_test_flag(&confflags, CONFFLAG_ADMIN)) ||
 				    (!ast_strlen_zero(cnf->pinadmin) &&
-				     ast_test_flag(&confflags, CONFFLAG_ADMIN))) {
+				    ast_test_flag(&confflags, CONFFLAG_ADMIN))) &&
+				    (!(cnf->users == 0 && cnf->isdynamic))) {
 					char pin[MAX_PIN] = "";
 					int j;
 

Modified: team/oej/bp-res_conf_ldap-1.4/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/bp-res_conf_ldap-1.4/apps/app_queue.c?view=diff&rev=272641&r1=272640&r2=272641
==============================================================================
--- team/oej/bp-res_conf_ldap-1.4/apps/app_queue.c (original)
+++ team/oej/bp-res_conf_ldap-1.4/apps/app_queue.c Sun Jun 27 07:03:30 2010
@@ -3286,6 +3286,20 @@
 				ast_queue_log(queuename, qe->chan->uniqueid, member->membername, "TRANSFER", "%s|%s|%ld|%ld",
 					qe->chan->exten, qe->chan->context, (long) (callstart - qe->start),
 					(long) (time(NULL) - callstart));
+				if (qe->parent->eventwhencalled)
+					manager_event(EVENT_FLAG_AGENT, "AgentComplete",
+							"Queue: %s\r\n"
+							"Uniqueid: %s\r\n"
+							"Channel: %s\r\n"
+							"Member: %s\r\n"
+							"MemberName: %s\r\n"
+							"HoldTime: %ld\r\n"
+							"TalkTime: %ld\r\n"
+							"Reason: transfer\r\n"
+							"%s",
+							queuename, qe->chan->uniqueid, peer->name, member->interface, member->membername,
+							(long)(callstart - qe->start), (long)(time(NULL) - callstart),
+							qe->parent->eventwhencalled == QUEUE_EVENT_VARIABLES ? vars2manager(qe->chan, vars, sizeof(vars)) : "");
 			} else if (qe->chan->_softhangup) {
 				ast_queue_log(queuename, qe->chan->uniqueid, member->membername, "COMPLETECALLER", "%ld|%ld|%d",
 					(long) (callstart - qe->start), (long) (time(NULL) - callstart), qe->opos);
@@ -3325,6 +3339,21 @@
 				ast_channel_datastore_remove(qe->chan, tds);
 			}
 			update_queue(qe->parent, member, callcompletedinsl);
+		} else {
+			if (qe->parent->eventwhencalled)
+				manager_event(EVENT_FLAG_AGENT, "AgentComplete",
+						"Queue: %s\r\n"
+						"Uniqueid: %s\r\n"
+						"Channel: %s\r\n"
+						"Member: %s\r\n"
+						"MemberName: %s\r\n"
+						"HoldTime: %ld\r\n"
+						"TalkTime: %ld\r\n"
+						"Reason: transfer\r\n"
+						"%s",
+						queuename, qe->chan->uniqueid, peer->name, member->interface, member->membername, (long)(callstart - qe->start),
+						(long)(time(NULL) - callstart),
+						qe->parent->eventwhencalled == QUEUE_EVENT_VARIABLES ? vars2manager(qe->chan, vars, sizeof(vars)) : "");
 		}
 
 		if (transfer_ds) {

Modified: team/oej/bp-res_conf_ldap-1.4/apps/app_voicemail.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/bp-res_conf_ldap-1.4/apps/app_voicemail.c?view=diff&rev=272641&r1=272640&r2=272641
==============================================================================
--- team/oej/bp-res_conf_ldap-1.4/apps/app_voicemail.c (original)
+++ team/oej/bp-res_conf_ldap-1.4/apps/app_voicemail.c Sun Jun 27 07:03:30 2010
@@ -1193,9 +1193,10 @@
 
 	fprintf(text_file_ptr, "%s\n", "[message]");
 
+	cid_name = get_header_by_tag(header_content, "X-Asterisk-VM-Caller-ID-Name:");
+	fprintf(text_file_ptr, "callerid=\"%s\" ", S_OR(cid_name, ""));
 	cid_num = get_header_by_tag(header_content, "X-Asterisk-VM-Caller-ID-Num:");
-	cid_name = get_header_by_tag(header_content, "X-Asterisk-VM-Caller-ID-Name:");
-	fprintf(text_file_ptr, "callerid=\"%s\" <%s>\n", S_OR(cid_name, ""), S_OR(cid_num, ""));
+	fprintf(text_file_ptr, "<%s>\n", S_OR(cid_num, ""));
 	context = get_header_by_tag(header_content, "X-Asterisk-VM-Context:");
 	fprintf(text_file_ptr, "context=%s\n", S_OR(context, ""));
 	origtime = get_header_by_tag(header_content, "X-Asterisk-VM-Orig-time:");

Modified: team/oej/bp-res_conf_ldap-1.4/autoconf/libcurl.m4
URL: http://svnview.digium.com/svn/asterisk/team/oej/bp-res_conf_ldap-1.4/autoconf/libcurl.m4?view=diff&rev=272641&r1=272640&r2=272641
==============================================================================
--- team/oej/bp-res_conf_ldap-1.4/autoconf/libcurl.m4 (original)
+++ team/oej/bp-res_conf_ldap-1.4/autoconf/libcurl.m4 Sun Jun 27 07:03:30 2010
@@ -55,6 +55,7 @@
   AH_TEMPLATE([LIBCURL_PROTOCOL_LDAP],[Defined if libcurl supports LDAP])
   AH_TEMPLATE([LIBCURL_PROTOCOL_DICT],[Defined if libcurl supports DICT])
   AH_TEMPLATE([LIBCURL_PROTOCOL_TFTP],[Defined if libcurl supports TFTP])
+  AC_SUBST(PBX_CURL)
 
   AC_ARG_WITH(libcurl,
      AC_HELP_STRING([--with-libcurl=DIR],[look for the curl library in DIR]),

Modified: team/oej/bp-res_conf_ldap-1.4/cdr/cdr_tds.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/bp-res_conf_ldap-1.4/cdr/cdr_tds.c?view=diff&rev=272641&r1=272640&r2=272641
==============================================================================
--- team/oej/bp-res_conf_ldap-1.4/cdr/cdr_tds.c (original)
+++ team/oej/bp-res_conf_ldap-1.4/cdr/cdr_tds.c Sun Jun 27 07:03:30 2010
@@ -477,7 +477,7 @@
 		goto connect_fail;
 	}
 
-	snprintf(query, sizeof(query), "SELECT 1 FROM %s", table);
+	snprintf(query, sizeof(query), "SELECT 1 FROM %s WHERE 1 = 0", table);
 #ifdef FREETDS_PRE_0_62
 	if ((tds_submit_query(tds, query) != TDS_SUCCEED) || (tds_process_simple_query(tds, &result_type) != TDS_SUCCEED || result_type != TDS_CMD_SUCCEED))
 #else

Modified: team/oej/bp-res_conf_ldap-1.4/channels/chan_agent.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/bp-res_conf_ldap-1.4/channels/chan_agent.c?view=diff&rev=272641&r1=272640&r2=272641
==============================================================================
--- team/oej/bp-res_conf_ldap-1.4/channels/chan_agent.c (original)
+++ team/oej/bp-res_conf_ldap-1.4/channels/chan_agent.c Sun Jun 27 07:03:30 2010
@@ -2790,7 +2790,9 @@
 		ast_copy_string(buf, agent->moh, len);
 	else if (!strcasecmp(args.item, "channel")) {
 		if (agent->chan) {
+			ast_channel_lock(agent->chan);
 			ast_copy_string(buf, agent->chan->name, len);
+			ast_channel_unlock(agent->chan);
 			tmp = strrchr(buf, '-');
 			if (tmp)
 				*tmp = '\0';

Modified: team/oej/bp-res_conf_ldap-1.4/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/bp-res_conf_ldap-1.4/channels/chan_dahdi.c?view=diff&rev=272641&r1=272640&r2=272641
==============================================================================
--- team/oej/bp-res_conf_ldap-1.4/channels/chan_dahdi.c (original)
+++ team/oej/bp-res_conf_ldap-1.4/channels/chan_dahdi.c Sun Jun 27 07:03:30 2010
@@ -3938,10 +3938,10 @@
 				dahdi_unlink(NULL, p, 0);
 			p->subs[x].owner = newchan;
 		}
+	update_conf(p);
+	ast_mutex_unlock(&p->lock);
 	if (newchan->_state == AST_STATE_RINGING) 
 		dahdi_indicate(newchan, AST_CONTROL_RINGING, NULL, 0);
-	update_conf(p);
-	ast_mutex_unlock(&p->lock);
 	return 0;
 }
 
@@ -4532,6 +4532,7 @@
 					p->subs[index].f.frametype = AST_FRAME_CONTROL;
 					p->subs[index].f.subclass = AST_CONTROL_ANSWER;
 					/* Make sure it stops ringing */
+					dahdi_set_hook(p->subs[index].dfd, DAHDI_OFFHOOK);
 					p->subs[SUB_REAL].needringing = 0;
 					ast_log(LOG_DEBUG, "channel %d answered\n", p->channel);
 					if (p->cidspill) {
@@ -6047,6 +6048,7 @@
 				ast_dsp_digitreset(p->dsp);
 			}
 			if (p->pri->overlapdial & DAHDI_OVERLAPDIAL_INCOMING) {
+				ast_mutex_lock(&p->lock);
 				if (p->pri->pri) {		
 					if (!pri_grab(p, p->pri)) {
 						pri_proceeding(p->pri->pri, p->call, PVT_TO_CHANNEL(p), 0);
@@ -6056,6 +6058,7 @@
 						ast_log(LOG_WARNING, "Unable to grab PRI on span %d\n", p->span);
 					}
 				}
+				ast_mutex_unlock(&p->lock);
 			}
 			dahdi_enable_ec(p);
 			ast_setstate(chan, AST_STATE_RING);

Modified: team/oej/bp-res_conf_ldap-1.4/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/bp-res_conf_ldap-1.4/channels/chan_iax2.c?view=diff&rev=272641&r1=272640&r2=272641
==============================================================================
--- team/oej/bp-res_conf_ldap-1.4/channels/chan_iax2.c (original)
+++ team/oej/bp-res_conf_ldap-1.4/channels/chan_iax2.c Sun Jun 27 07:03:30 2010
@@ -8299,6 +8299,7 @@
 			memcpy(&thread->ffinfo.sin, &thread->iosin, sizeof(thread->ffinfo.sin));
 			thread->ffinfo.type = fh->type;
 			thread->ffinfo.csub = fh->csub;
+			AST_LIST_INSERT_HEAD(&active_list, thread, list);
 		}
 		AST_LIST_UNLOCK(&active_list);
 	}
@@ -10034,11 +10035,6 @@
 		if (thread->iostate == IAX_IOSTATE_IDLE)
 			continue;
 
-		/* Add ourselves to the active list now */
-		AST_LIST_LOCK(&active_list);
-		AST_LIST_INSERT_HEAD(&active_list, thread, list);
-		AST_LIST_UNLOCK(&active_list);
-
 		/* See what we need to do */
 		switch(thread->iostate) {
 		case IAX_IOSTATE_READY:
@@ -10061,7 +10057,9 @@
 		thread->curfunc[0]='\0';
 #endif		
 
-		/* Now... remove ourselves from the active list, and return to the idle list */
+		/* The network thread added us to the active_thread list when we were given
+		 * frames to process, Now that we are done, we must remove ourselves from
+		 * the active list, and return to the idle list */
 		AST_LIST_LOCK(&active_list);
 		AST_LIST_REMOVE(&active_list, thread, list);
 		AST_LIST_UNLOCK(&active_list);

Modified: team/oej/bp-res_conf_ldap-1.4/channels/chan_oss.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/bp-res_conf_ldap-1.4/channels/chan_oss.c?view=diff&rev=272641&r1=272640&r2=272641
==============================================================================
--- team/oej/bp-res_conf_ldap-1.4/channels/chan_oss.c (original)
+++ team/oej/bp-res_conf_ldap-1.4/channels/chan_oss.c Sun Jun 27 07:03:30 2010
@@ -1863,7 +1863,7 @@
 
 	if (ast_channel_register(&oss_tech)) {
 		ast_log(LOG_ERROR, "Unable to register channel type 'OSS'\n");
-		return AST_MODULE_LOAD_FAILURE;
+		return AST_MODULE_LOAD_DECLINE;
 	}
 
 	ast_cli_register_multiple(cli_oss, sizeof(cli_oss) / sizeof(struct ast_cli_entry));

Modified: team/oej/bp-res_conf_ldap-1.4/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/bp-res_conf_ldap-1.4/channels/chan_sip.c?view=diff&rev=272641&r1=272640&r2=272641
==============================================================================
--- team/oej/bp-res_conf_ldap-1.4/channels/chan_sip.c (original)
+++ team/oej/bp-res_conf_ldap-1.4/channels/chan_sip.c Sun Jun 27 07:03:30 2010
@@ -635,6 +635,7 @@
 	char *header[SIP_MAX_HEADERS];
 	char *line[SIP_MAX_LINES];
 	char data[SIP_MAX_PACKET];
+	char content[SIP_MAX_PACKET];
 	unsigned int sdp_start; /*!< the line number where the SDP begins */
 	unsigned int sdp_count; /*!< the number of lines of SDP */
 	AST_LIST_ENTRY(sip_request) next;
@@ -1561,8 +1562,8 @@
 static void build_callid_registry(struct sip_registry *reg, struct in_addr ourip, const char *fromdomain);
 static void make_our_tag(char *tagbuf, size_t len);
 static int add_header(struct sip_request *req, const char *var, const char *value);
-static int add_header_contentLength(struct sip_request *req, int len);
-static int add_line(struct sip_request *req, const char *line);
+static int add_content(struct sip_request *req, const char *line);
+static int finalize_content(struct sip_request *req);
 static int add_text(struct sip_request *req, const char *text);
 static int add_digit(struct sip_request *req, char digit, unsigned int duration);
 static int add_vidupdate(struct sip_request *req);
@@ -2378,6 +2379,7 @@
 {
 	int res;
 
+	finalize_content(req);
 	add_blank(req);
 	if (sip_debug_test_pvt(p)) {
 		const struct sockaddr_in *dst = sip_real_dst(p);
@@ -2412,6 +2414,7 @@
 {
 	int res;
 
+	finalize_content(req);
 	add_blank(req);
 	if (sip_debug_test_pvt(p)) {
 		if (ast_test_flag(&p->flags[0], SIP_NAT_ROUTE))
@@ -3692,6 +3695,7 @@
 		ast_clear_flag(&p->flags[0], SIP_NEEDDESTROY);
 		p->owner->tech_pvt = NULL;
 		p->owner = NULL;  /* Owner will be gone after we return, so take it away */
+		ast_module_unref(ast_module_info->self);
 		return 0;
 	}
 	if (option_debug) {
@@ -6034,7 +6038,7 @@
 /*! \brief Add header to SIP message */
 static int add_header(struct sip_request *req, const char *var, const char *value)
 {
-	int maxlen = sizeof(req->data) - 4 - req->len; /* 4 bytes are for two \r\n ? */
+	int maxlen = sizeof(req->data) - 4 - req->len - strlen(req->content); /* 4 bytes are for two \r\n ? */
 
 	if (req->headers == SIP_MAX_HEADERS) {
 		ast_log(LOG_WARNING, "Out of SIP header space\n");
@@ -6064,35 +6068,42 @@
 }
 
 /*! \brief Add 'Content-Length' header to SIP message */
-static int add_header_contentLength(struct sip_request *req, int len)
+static int finalize_content(struct sip_request *req)
 {
 	char clen[10];
 
-	snprintf(clen, sizeof(clen), "%d", len);
-	return add_header(req, "Content-Length", clen);
+	if (req->lines) {
+		ast_log(LOG_WARNING, "finalize_content() called on a message that has already been finalized\n");
+		return -1;
+	}
+
+	snprintf(clen, sizeof(clen), "%zd", strlen(req->content));
+	add_header(req, "Content-Length", clen);
+
+	if (!ast_strlen_zero(req->content)) {
+		snprintf(req->data + req->len, sizeof(req->data) - req->len, "\r\n%s", req->content);
+		req->len += strlen(req->data + req->len);
+	}
+
+	req->lines = !ast_strlen_zero(req->content);
+	return 0;
 }
 
 /*! \brief Add content (not header) to SIP message */
-static int add_line(struct sip_request *req, const char *line)
-{
-	if (req->lines == SIP_MAX_LINES)  {
-		ast_log(LOG_WARNING, "Out of SIP line space\n");
+static int add_content(struct sip_request *req, const char *line)
+{
+	if (req->lines) {
+		ast_log(LOG_WARNING, "Can't add more content when the content has been finalized\n");
 		return -1;
 	}
-	if (!req->lines) {
-		/* Add extra empty return */
-		snprintf(req->data + req->len, sizeof(req->data) - req->len, "\r\n");
-		req->len += strlen(req->data + req->len);
-	}
-	if (req->len >= sizeof(req->data) - 4) {
+
+	if (req->len + strlen(req->content) + strlen(line) >= sizeof(req->data) - 4) {
 		ast_log(LOG_WARNING, "Out of space, can't add anymore\n");
 		return -1;
 	}
-	req->line[req->lines] = req->data + req->len;
-	snprintf(req->line[req->lines], sizeof(req->data) - req->len, "%s", line);
-	req->len += strlen(req->line[req->lines]);
-	req->lines++;
-	return 0;	
+
+	snprintf(req->content + strlen(req->content), sizeof(req->content) - strlen(req->content), "%s", line);
+	return 0;
 }
 
 /*! \brief Copy one header field from one request to another */
@@ -6545,7 +6556,6 @@
 		return -1;
 	}
 	respprep(&resp, p, msg, req);
-	add_header_contentLength(&resp, 0);
 	/* If we are cancelling an incoming invite for some reason, add information
 		about the reason why we are doing this in clear text */
 	if (p->method == SIP_INVITE && msg[0] != '1' && p->owner && p->owner->hangupcause) {
@@ -6631,7 +6641,6 @@
 	respprep(&resp, p, msg, req);
 	append_date(&resp);
 	add_header(&resp, "Unsupported", unsupported);
-	add_header_contentLength(&resp, 0);
 	return send_response(p, &resp, XMIT_UNRELIABLE, 0);
 }
 
@@ -6661,7 +6670,6 @@
 	struct sip_request resp;
 	respprep(&resp, p, msg, req);
 	append_date(&resp);
-	add_header_contentLength(&resp, 0);
 	return send_response(p, &resp, XMIT_UNRELIABLE, 0);
 }
 
@@ -6671,7 +6679,6 @@
 	struct sip_request resp;
 	respprep(&resp, p, msg, req);
 	add_header(&resp, "Accept", "application/sdp");
-	add_header_contentLength(&resp, 0);
 	return send_response(p, &resp, reliable, 0);
 }
 
@@ -6691,7 +6698,6 @@
 	snprintf(tmp, sizeof(tmp), "Digest algorithm=MD5, realm=\"%s\", nonce=\"%s\"%s", global_realm, randdata, stale ? ", stale=true" : "");
 	respprep(&resp, p, msg, req);
 	add_header(&resp, header, tmp);
-	add_header_contentLength(&resp, 0);
 	append_history(p, "AuthChal", "Auth challenge sent for %s - nc %d", p->username, p->noncecount);
 	return send_response(p, &resp, reliable, seqno);
 }
@@ -6714,8 +6720,7 @@
 {
 	/* XXX Convert \n's to \r\n's XXX */
 	add_header(req, "Content-Type", "text/plain");
-	add_header_contentLength(req, strlen(text));
-	add_line(req, text);
+	add_content(req, text);
 	return 0;
 }
 
@@ -6727,8 +6732,7 @@
 
 	snprintf(tmp, sizeof(tmp), "Signal=%c\r\nDuration=%u\r\n", digit, duration);
 	add_header(req, "Content-Type", "application/dtmf-relay");
-	add_header_contentLength(req, strlen(tmp));
-	add_line(req, tmp);
+	add_content(req, tmp);
 	return 0;
 }
 
@@ -6747,8 +6751,7 @@
 		"  </vc_primitive>\r\n"
 		" </media_control>\r\n";
 	add_header(req, "Content-Type", "application/media_control+xml");
-	add_header_contentLength(req, strlen(xml_is_a_huge_waste_of_space));
-	add_line(req, xml_is_a_huge_waste_of_space);
+	add_content(req, xml_is_a_huge_waste_of_space);
 	return 0;
 }
 
@@ -6862,7 +6865,6 @@
 /*! \brief Add Session Description Protocol message */
 static enum sip_result add_sdp(struct sip_request *resp, struct sip_pvt *p, int add_audio, int add_t38)
 {
-	int len = 0;
 	int alreadysent = 0;
 
 	struct sockaddr_in sin;
@@ -7131,45 +7133,35 @@
 			ast_build_string(&a_modem_next, &a_modem_left, "a=T38FaxUdpEC:%s\r\n", (p->t38.jointcapability & T38FAX_UDP_EC_REDUNDANCY) ? "t38UDPRedundancy" : "t38UDPFEC");
 	}
 
-	len = strlen(version) + strlen(subject) + strlen(owner) + strlen(connection) + strlen(stime);
-	if (add_audio)
-		len += strlen(m_audio) + strlen(a_audio) + strlen(hold);
-	if (needvideo) /* only if video response is appropriate */
-		len += strlen(m_video) + strlen(a_video) + strlen(bandwidth) + strlen(hold);
-	if (add_t38) {
-		len += strlen(m_modem) + strlen(a_modem);
-	}
-
 	add_header(resp, "Content-Type", "application/sdp");
-	add_header_contentLength(resp, len);
-	add_line(resp, version);
-	add_line(resp, owner);
-	add_line(resp, subject);
-	add_line(resp, connection);
+	add_content(resp, version);
+	add_content(resp, owner);
+	add_content(resp, subject);
+	add_content(resp, connection);
 	if (needvideo)	 	/* only if video response is appropriate */
-		add_line(resp, bandwidth);
-	add_line(resp, stime);
+		add_content(resp, bandwidth);
+	add_content(resp, stime);
 	if (add_audio) {
-		add_line(resp, m_audio);
-		add_line(resp, a_audio);
-		add_line(resp, hold);
+		add_content(resp, m_audio);
+		add_content(resp, a_audio);
+		add_content(resp, hold);
 	} else if (p->offered_media[SDP_AUDIO].offered) {
 		snprintf(dummy_answer, sizeof(dummy_answer), "m=audio 0 RTP/AVP %s\r\n", p->offered_media[SDP_AUDIO].text);
-		add_line(resp, dummy_answer);
+		add_content(resp, dummy_answer);
 	}
 	if (needvideo) { /* only if video response is appropriate */
-		add_line(resp, m_video);
-		add_line(resp, a_video);
-		add_line(resp, hold);	/* Repeat hold for the video stream */
+		add_content(resp, m_video);
+		add_content(resp, a_video);
+		add_content(resp, hold);	/* Repeat hold for the video stream */
 	} else if (p->offered_media[SDP_VIDEO].offered) {
 		snprintf(dummy_answer, sizeof(dummy_answer), "m=video 0 RTP/AVP %s\r\n", p->offered_media[SDP_VIDEO].text);
-		add_line(resp, dummy_answer);
+		add_content(resp, dummy_answer);
 	}
 	if (add_t38) {
-		add_line(resp, m_modem);
-		add_line(resp, a_modem);
+		add_content(resp, m_modem);
+		add_content(resp, a_modem);
 	} else if (p->offered_media[SDP_IMAGE].offered) {
-		add_line(resp, "m=image 0 udptl t38\r\n");
+		add_content(resp, "m=image 0 udptl t38\r\n");
 	}
 
 	/* Update lastrtprx when we send our SDP */
@@ -7675,8 +7667,6 @@
 			add_sdp(&req, p, 0, 1);
 		} else if (p->rtp) 
 			add_sdp(&req, p, 1, 0);
-	} else {
-		add_header_contentLength(&req, 0);
 	}
 
 	if (!p->initreq.headers || init > 2)
@@ -7861,8 +7851,7 @@
 	if (t > tmp + sizeof(tmp))
 		ast_log(LOG_WARNING, "Buffer overflow detected!!  (Please file a bug report)\n");
 
-	add_header_contentLength(&req, strlen(tmp));
-	add_line(&req, tmp);
+	add_content(&req, tmp);
 	p->pendinginvite = p->ocseq;	/* Remember that we have a pending NOTIFY in order not to confuse the NOTIFY subsystem */
 
 	return send_request(p, &req, XMIT_RELIABLE, p->ocseq);
@@ -7911,8 +7900,7 @@
 	if (t > tmp + sizeof(tmp))
 		ast_log(LOG_WARNING, "Buffer overflow detected!!  (Please file a bug report)\n");
 
-	add_header_contentLength(&req, strlen(tmp));
-	add_line(&req, tmp);
+	add_content(&req, tmp);
 
 	if (!p->initreq.headers) 
 		initialize_initreq(p, &req);
@@ -7942,8 +7930,7 @@
 	add_header(&req, "Supported", SUPPORTED_EXTENSIONS);
 
 	snprintf(tmp, sizeof(tmp), "SIP/2.0 %s\r\n", message);
-	add_header_contentLength(&req, strlen(tmp));
-	add_line(&req, tmp);
+	add_content(&req, tmp);
 
 	if (!p->initreq.headers)
 		initialize_initreq(p, &req);
@@ -8249,7 +8236,6 @@
 	add_header(&req, "Expires", tmp);
 	add_header(&req, "Contact", p->our_contact);
 	add_header(&req, "Event", "registration");
-	add_header_contentLength(&req, 0);
 
 	initialize_initreq(p, &req);
 	if (sip_debug_test_pvt(p))
@@ -8383,7 +8369,6 @@
 		p->invitestate = INV_CONFIRMED;
 
 	reqprep(&resp, p, sipmethod, seqno, newbranch);
-	add_header_contentLength(&resp, 0);
 	return send_request(p, &resp, reliable, seqno ? seqno : p->ocseq);
 }
 
@@ -8417,7 +8402,6 @@
 		add_header(&resp, "X-Asterisk-HangupCauseCode", buf);
 	}
 
-	add_header_contentLength(&resp, 0);
 	return send_request(p, &resp, reliable, seqno ? seqno : p->ocseq);	
 }
 
@@ -8743,25 +8727,17 @@
 	}
 	oldsin = peer->addr;
 
-	/* Check that they're allowed to register at this IP */
-	/* XXX This could block for a long time XXX */
-	hp = ast_gethostbyname(n, &ahp);
-	if (!hp)  {
-		ast_log(LOG_WARNING, "Invalid host '%s'\n", n);
-		*peer->fullcontact = '\0';
-		ast_string_field_set(pvt, our_contact, "");
-		return PARSE_REGISTER_FAILED;
-	}
-	memcpy(&testsin.sin_addr, hp->h_addr, sizeof(testsin.sin_addr));
-	if (	ast_apply_ha(global_contact_ha, &testsin) != AST_SENSE_ALLOW ||
-			ast_apply_ha(peer->contactha, &testsin) != AST_SENSE_ALLOW) {
-		ast_log(LOG_WARNING, "Host '%s' disallowed by contact ACL (violating IP %s)\n", n, ast_inet_ntoa(testsin.sin_addr));
-		*peer->fullcontact = '\0';
-		ast_string_field_set(pvt, our_contact, "");
-		return PARSE_REGISTER_DENIED;
-	}
-
 	if (!ast_test_flag(&peer->flags[0], SIP_NAT_ROUTE)) {
+		/* use the data provided in the Contact header for call routing */
+		/* XXX This could block for a long time XXX */
+		hp = ast_gethostbyname(n, &ahp);
+		if (!hp)  {
+			ast_log(LOG_WARNING, "Invalid host '%s'\n", n);
+			*peer->fullcontact = '\0';
+			ast_string_field_set(pvt, our_contact, "");
+			return PARSE_REGISTER_FAILED;
+		}
+
 		peer->addr.sin_family = AF_INET;
 		memcpy(&peer->addr.sin_addr, hp->h_addr, sizeof(peer->addr.sin_addr));
 		peer->addr.sin_port = htons(port);
@@ -8769,6 +8745,16 @@
 		/* Don't trust the contact field.  Just use what they came to us
 		   with */
 		peer->addr = pvt->recv;
+	}
+
+	/* Check that they're allowed to register at this IP */
+	memcpy(&testsin.sin_addr, &peer->addr.sin_addr, sizeof(testsin.sin_addr));
+	if (ast_apply_ha(global_contact_ha, &testsin) != AST_SENSE_ALLOW ||
+			ast_apply_ha(peer->contactha, &testsin) != AST_SENSE_ALLOW) {
+		ast_log(LOG_WARNING, "Host '%s' disallowed by contact ACL (violating IP %s)\n", n, ast_inet_ntoa(testsin.sin_addr));
+		*peer->fullcontact = '\0';
+		ast_string_field_set(pvt, our_contact, "");
+		return PARSE_REGISTER_DENIED;
 	}
 
 	/* Save SIP options profile */
@@ -12145,8 +12131,15 @@
 
 		initreqprep(&req, p, SIP_NOTIFY);
 
-		for (var = varlist; var; var = var->next)
+		for (var = varlist; var; var = var->next) {
+			if (!strcasecmp(var->name, "Content-Length")) {
+				if (option_debug >= 2) {
+					ast_log(LOG_DEBUG, "Ignoring pair %s=%s\n", var->name, var->value);
+				}
+				continue; /* ignore content-length, it is calculated automatically */
+			}
 			add_header(&req, var->name, ast_unescape_semicolon(var->value));
+		}
 
 		/* Recalculate our side, and recalculate Call ID */
 		if (ast_sip_ouraddrfor(&p->sa.sin_addr, &p->ourip))

Modified: team/oej/bp-res_conf_ldap-1.4/channels/h323/Makefile.in
URL: http://svnview.digium.com/svn/asterisk/team/oej/bp-res_conf_ldap-1.4/channels/h323/Makefile.in?view=diff&rev=272641&r1=272640&r2=272641
==============================================================================
--- team/oej/bp-res_conf_ldap-1.4/channels/h323/Makefile.in (original)
+++ team/oej/bp-res_conf_ldap-1.4/channels/h323/Makefile.in Sun Jun 27 07:03:30 2010
@@ -35,8 +35,12 @@
 libchanh323.a:	$(OBJS)
 	ar crv $@ $(OBJS)
 
-cisco-h225.cxx::	cisco-h225.asn
-	asnparser -m CISCO_H225 -c $<
+# 
+# We have this file in svn, so this is commented out to ensure it doesn't try
+# to run implicitly.  However, it's still here for reference.
+#
+#cisco-h225.cxx::	cisco-h225.asn
+#	asnparser -m CISCO_H225 -c $<
 
 Makefile.ast:
 	@echo H323CFLAGS  = $(STDCCFLAGS) $(OPTCCFLAGS) $(CFLAGS) >$@.tmp

Modified: team/oej/bp-res_conf_ldap-1.4/configs/extensions.conf.sample
URL: http://svnview.digium.com/svn/asterisk/team/oej/bp-res_conf_ldap-1.4/configs/extensions.conf.sample?view=diff&rev=272641&r1=272640&r2=272641
==============================================================================
--- team/oej/bp-res_conf_ldap-1.4/configs/extensions.conf.sample (original)
+++ team/oej/bp-res_conf_ldap-1.4/configs/extensions.conf.sample Sun Jun 27 07:03:30 2010
@@ -449,7 +449,7 @@
 ;   ${ARG1} - Device to page
 
 exten => s,1,ChanIsAvail(${ARG1}|js)			; j is for Jump and s is for ANY call
-exten => s,n,GoToIf([${AVAILORIGCHAN} = ""]?fail:autoanswer)
+exten => s,n,GoToIf($[${AVAILORIGCHAN} = ""]?fail:autoanswer)
 exten => s,n(autoanswer),Set(_ALERT_INFO="RA")			; This is for the PolyComs
 exten => s,n,SIPAddHeader(Call-Info: Answer-After=0)	; This is for the Grandstream, Snoms, and Others
 exten => s,n,NoOp()					; Add others here and Post on the Wiki!!!!

Modified: team/oej/bp-res_conf_ldap-1.4/configs/sip_notify.conf.sample
URL: http://svnview.digium.com/svn/asterisk/team/oej/bp-res_conf_ldap-1.4/configs/sip_notify.conf.sample?view=diff&rev=272641&r1=272640&r2=272641
==============================================================================
--- team/oej/bp-res_conf_ldap-1.4/configs/sip_notify.conf.sample (original)
+++ team/oej/bp-res_conf_ldap-1.4/configs/sip_notify.conf.sample Sun Jun 27 07:03:30 2010
@@ -1,11 +1,9 @@
 [polycom-check-cfg]
 Event=>check-sync
-Content-Length=>0
 
 ; Untested
 [sipura-check-cfg]
 Event=>resync
-Content-Length=>0
 
 ; Untested
 [grandstream-check-cfg]
@@ -14,9 +12,7 @@
 ; Untested
 [cisco-check-cfg]
 Event=>check-sync
-Content-Length=>0
 
 ; Tested
 [snom-check-cfg]
 Event=>check-sync\;reboot=false
-Content-Length=>0

Modified: team/oej/bp-res_conf_ldap-1.4/configs/voicemail.conf.sample
URL: http://svnview.digium.com/svn/asterisk/team/oej/bp-res_conf_ldap-1.4/configs/voicemail.conf.sample?view=diff&rev=272641&r1=272640&r2=272641
==============================================================================
--- team/oej/bp-res_conf_ldap-1.4/configs/voicemail.conf.sample (original)
+++ team/oej/bp-res_conf_ldap-1.4/configs/voicemail.conf.sample Sun Jun 27 07:03:30 2010
@@ -130,39 +130,6 @@
 ; You can override the default program to send e-mail if you wish, too
 ;
 ;mailcmd=/usr/sbin/sendmail -t
-; 
-; Users may be located in different timezones, or may have different 
-; message announcements for their introductory message when they enter 
-; the voicemail system. Set the message and the timezone each user 
-; hears here. Set the user into one of these zones with the tz= attribute 
-; in the options field of the mailbox. Of course, language substitution 
-; still applies here so you may have several directory trees that have 
-; alternate language choices. 
-; 
-; Look in /usr/share/zoneinfo/ for names of timezones. 
-; Look at the manual page for strftime for a quick tutorial on how the 
-; variable substitution is done on the values below. 
-; 
-; Supported values: 
-; 'filename'    filename of a soundfile (single ticks around the filename
-;               required)
-; ${VAR}        variable substitution 
-; A or a        Day of week (Saturday, Sunday, ...) 
-; B or b or h   Month name (January, February, ...) 
-; d or e        numeric day of month (first, second, ..., thirty-first) 
-; Y             Year 
-; I or l        Hour, 12 hour clock 
-; H             Hour, 24 hour clock (single digit hours preceded by "oh") 
-; k             Hour, 24 hour clock (single digit hours NOT preceded by "oh") 
-; M             Minute, with 00 pronounced as "o'clock" 
-; N             Minute, with 00 pronounced as "hundred" (US military time)
-; P or p        AM or PM 
-; Q             "today", "yesterday" or ABdY
-;               (*note: not standard strftime value) 
-; q             "" (for today), "yesterday", weekday, or ABdY
-;               (*note: not standard strftime value) 
-; R             24 hour time, including minute 
-; 
 ; 
 ;
 ; Each mailbox is listed in the form <mailbox>=<password>,<name>,<email>,<pager_email>,<options>
@@ -231,6 +198,38 @@
 ;tempgreetwarn=yes	; Remind the user that their temporary greeting is set
 
 [zonemessages]
+; Users may be located in different timezones, or may have different 
+; message announcements for their introductory message when they enter 
+; the voicemail system. Set the message and the timezone each user 
+; hears here. Set the user into one of these zones with the tz= attribute 
+; in the options field of the mailbox. Of course, language substitution 
+; still applies here so you may have several directory trees that have 
+; alternate language choices. 
+; 
+; Look in /usr/share/zoneinfo/ for names of timezones. 
+; Look at the manual page for strftime for a quick tutorial on how the 
+; variable substitution is done on the values below. 
+; 
+; Supported values: 
+; 'filename'    filename of a soundfile (single ticks around the filename
+;               required)
+; ${VAR}        variable substitution 
+; A or a        Day of week (Saturday, Sunday, ...) 
+; B or b or h   Month name (January, February, ...) 
+; d or e        numeric day of month (first, second, ..., thirty-first) 
+; Y             Year 
+; I or l        Hour, 12 hour clock 
+; H             Hour, 24 hour clock (single digit hours preceded by "oh") 
+; k             Hour, 24 hour clock (single digit hours NOT preceded by "oh") 
+; M             Minute, with 00 pronounced as "o'clock" 
+; N             Minute, with 00 pronounced as "hundred" (US military time)
+; P or p        AM or PM 
+; Q             "today", "yesterday" or ABdY
+;               (*note: not standard strftime value) 
+; q             "" (for today), "yesterday", weekday, or ABdY
+;               (*note: not standard strftime value) 
+; R             24 hour time, including minute 
+; 
 eastern=America/New_York|'vm-received' Q 'digits/at' IMp
 central=America/Chicago|'vm-received' Q 'digits/at' IMp
 central24=America/Chicago|'vm-received' q 'digits/at' H N 'hours'
@@ -246,7 +245,7 @@
 ;4300 => 3456,Ben Rigas,ben at american-computer.net
 ;4310 => -5432,Sales,sales at marko.net
 ;4069 => 6522,Matt Brooks,matt at marko.net,,|tz=central|attach=yes|saycid=yes|dialout=fromvm|callback=fromvm|review=yes|operator=yes|envelope=yes|sayduration=yes|saydurationm=1
-;4073 => 1099,Bianca Paige,bianca at biancapaige.com,,delete=1
+;4073 => 1099,Bianca Paige,bianca at biancapaige.com,,delete=1|rip=2010-06-04
 ;4110 => 3443,Rob Flynn,rflynn at blueridge.net
 ;4235 => 1234,Jim Holmes,jim at astricon.ips,,Tz=european
 

Modified: team/oej/bp-res_conf_ldap-1.4/configure.ac
URL: http://svnview.digium.com/svn/asterisk/team/oej/bp-res_conf_ldap-1.4/configure.ac?view=diff&rev=272641&r1=272640&r2=272641
==============================================================================
--- team/oej/bp-res_conf_ldap-1.4/configure.ac (original)
+++ team/oej/bp-res_conf_ldap-1.4/configure.ac Sun Jun 27 07:03:30 2010
@@ -2,7 +2,7 @@
 
 AC_PREREQ(2.60)
 
-AC_INIT(asterisk, 1.4, www.asterisk.org)
+AC_INIT([asterisk], [1.4], [https://issues.asterisk.org])
 
 # cross-compile macros
 AC_CANONICAL_BUILD
@@ -23,15 +23,16 @@
 
 case "${host_os}" in
      freebsd*)
-     ac_default_prefix=/usr/local
+     AC_PREFIX_DEFAULT([/usr/local])
      CPPFLAGS=-I/usr/local/include
      LDFLAGS=-L/usr/local/lib
      ;;
      darwin*)
+     AC_PREFIX_DEFAULT([/usr/local])
      AC_DEFINE([AST_POLL_COMPAT], 1, [Define to 1 if internal poll should be used.])
      ;;
      *)
-     ac_default_prefix=/usr
+     AC_PREFIX_DEFAULT([/usr])
      if test ${prefix} = '/usr' || test ${prefix} = 'NONE'; then
         if test ${sysconfdir} = '${prefix}/etc'; then
            sysconfdir=/etc
@@ -228,17 +229,18 @@
 # by the --with option name, to make things easier for the users :-)
 
 AST_EXT_LIB_SETUP([ALSA], [Advanced Linux Sound Architecture], [asound])
-AST_EXT_LIB_SETUP([CURL], [cURL], [curl])
 AST_EXT_LIB_SETUP([CAP], [POSIX 1.e capabilities], [cap])
 AST_EXT_LIB_SETUP([CURSES], [curses], [curses])
 AST_EXT_LIB_SETUP([DAHDI], [DAHDI], [dahdi])
 AST_EXT_LIB_SETUP([GNUTLS], [GNU TLS support (used for iksemel only)], [gnutls])
 AST_EXT_LIB_SETUP([GSM], [GSM], [gsm], [, or 'internal'])
+AST_EXT_LIB_SETUP([OPENH323], [OpenH323], [h323])
 AST_EXT_LIB_SETUP([IKSEMEL], [Iksemel Jabber Library], [iksemel])
 AST_EXT_LIB_SETUP([IMAP_TK], [UW IMAP Toolkit], [imap])
 AST_EXT_LIB_SETUP([ISDNNET], [ISDN4Linux Library], [isdnnet])
 AST_EXT_LIB_SETUP([KDE], [KDE], [kde])
 AST_EXT_LIB_SETUP([LDAP], [OpenLDAP], [ldap])
+AST_LIBCURL_CHECK_CONFIG([], [7.10.1])
 AST_EXT_LIB_SETUP([LTDL], [libtool], [ltdl])
 AST_EXT_LIB_SETUP([MISDN], [mISDN User Library], [misdn])
 AST_EXT_LIB_SETUP([NBS], [Network Broadcast Sound], [nbs])
@@ -247,6 +249,8 @@
 AST_EXT_LIB_SETUP([NEWT], [newt], [newt])
 AST_EXT_LIB_SETUP([UNIXODBC], [unixODBC], [odbc])
 AST_EXT_LIB_SETUP([OGG], [OGG], [ogg])
+AST_EXT_LIB_SETUP([OPENAIS], [OpenAIS], [openais])
+AST_EXT_LIB_SETUP([OPENR2], [MFR2], [openr2])
 AST_EXT_LIB_SETUP([OSPTK], [OSP Toolkit], [osptk])
 AST_EXT_LIB_SETUP([OSS], [Open Sound System], [oss])
 AST_EXT_LIB_SETUP([POPT], [popt], [popt])
@@ -255,14 +259,13 @@
 AST_EXT_LIB_SETUP_DEPENDENT([PRI_VERSION], [ISDN PRI get_version], [PRI], [pri])
 AST_EXT_LIB_SETUP_DEPENDENT([PRI_INBANDDISCONNECT], [ISDN PRI set_inbanddisconnect], [PRI], [pri])
 AST_EXT_LIB_SETUP([PWLIB], [PWlib], [pwlib])
-AST_EXT_LIB_SETUP([OPENH323], [OpenH323], [h323])
 AST_EXT_LIB_SETUP([RADIUS], [Radius Client], [radius])
 AST_EXT_LIB_SETUP([SPEEX], [Speex], [speex])
 AST_EXT_LIB_SETUP([SPEEXDSP], [Speexdsp], [speexdsp])
 AST_EXT_LIB_SETUP_DEPENDENT([SPEEX_PREPROCESS], [speex_preprocess_ctl], [], [speex])
 AST_EXT_LIB_SETUP([SQLITE], [SQLite], [sqlite])
+AST_EXT_LIB_SETUP([OPENSSL], [OpenSSL], [ssl])
 AST_EXT_LIB_SETUP([SUPPSERV], [mISDN Supplemental Services], [suppserv])
-AST_EXT_LIB_SETUP([OPENSSL], [OpenSSL], [ssl])
 AST_EXT_LIB_SETUP([FREETDS], [FreeTDS], [tds])
 AST_EXT_LIB_SETUP([TERMCAP], [Termcap], [termcap])
 AST_EXT_LIB_SETUP([TINFO], [Term Info], [tinfo])
@@ -419,6 +422,20 @@
 if test "${ac_cv_pthread_once_needsbraces}" = "yes"; then
   AC_DEFINE([PTHREAD_ONCE_INIT_NEEDS_BRACES], 1, [Define if your system needs braces around PTHREAD_ONCE_INIT])
 fi
+
+# Can we compare a mutex to its initial value?
+# Generally yes on OpenBSD/FreeBSD and no on Mac OS X.
+AC_MSG_CHECKING(whether we can compare a mutex to its initial value)
+AC_LINK_IFELSE(
+	AC_LANG_PROGRAM([#include <pthread.h>], [pthread_mutex_t lock;
+	if ((lock) != ((pthread_mutex_t) PTHREAD_MUTEX_INITIALIZER)) {
+		return 0;
+	}
+	return 0]),
+	AC_MSG_RESULT(yes)
+	AC_DEFINE([CAN_COMPARE_MUTEX_TO_INIT_VALUE], 1, [Define to 1 if the implementation of mutexes supports comparison of a mutex to its initializer.]),
+	AC_MSG_RESULT(no)
+)
 
 AC_MSG_CHECKING(for compiler atomic operations)
 AC_LINK_IFELSE(
@@ -1725,8 +1742,6 @@
 AC_SUBST(GTK2_INCLUDE)
 AC_SUBST(GTK2_LIB)
 
-AST_LIBCURL_CHECK_CONFIG([], [7.10.1])
-
 AC_CONFIG_FILES([build_tools/menuselect-deps makeopts channels/h323/Makefile])
 AC_OUTPUT
 


[... 1449 lines stripped ...]



More information about the asterisk-commits mailing list