[asterisk-commits] eliel: branch group/appdocsxml r153178 - in /team/group/appdocsxml: ./ apps/ ...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Oct 31 12:46:23 CDT 2008
Author: eliel
Date: Fri Oct 31 12:46:23 2008
New Revision: 153178
URL: http://svn.digium.com/view/asterisk?view=rev&rev=153178
Log:
Fix conflict and continue!.
Added:
team/group/appdocsxml/include/asterisk/buildinfo.h
- copied unchanged from r153057, trunk/include/asterisk/buildinfo.h
Modified:
team/group/appdocsxml/ (props changed)
team/group/appdocsxml/CHANGES
team/group/appdocsxml/apps/app_adsiprog.c
team/group/appdocsxml/bootstrap.sh
team/group/appdocsxml/channels/chan_h323.c
team/group/appdocsxml/channels/chan_local.c
team/group/appdocsxml/channels/chan_sip.c
team/group/appdocsxml/channels/misdn/isdn_lib.c
team/group/appdocsxml/channels/misdn/isdn_lib.h
team/group/appdocsxml/channels/misdn/isdn_lib_intern.h
team/group/appdocsxml/codecs/lpc10/chanwr.c
team/group/appdocsxml/configs/features.conf.sample
team/group/appdocsxml/funcs/func_db.c
team/group/appdocsxml/include/asterisk/sched.h
team/group/appdocsxml/include/asterisk/timing.h
team/group/appdocsxml/main/asterisk.c
team/group/appdocsxml/main/buildinfo.c
team/group/appdocsxml/main/cdr.c
team/group/appdocsxml/main/channel.c
team/group/appdocsxml/main/dial.c
team/group/appdocsxml/main/dnsmgr.c
team/group/appdocsxml/main/features.c
team/group/appdocsxml/utils/astcanary.c
Propchange: team/group/appdocsxml/
------------------------------------------------------------------------------
automerge = *
Propchange: team/group/appdocsxml/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Propchange: team/group/appdocsxml/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Oct 31 12:46:23 2008
@@ -1,1 +1,1 @@
-/trunk:1-152802
+/trunk:1-153096
Modified: team/group/appdocsxml/CHANGES
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/CHANGES?view=diff&rev=153178&r1=153177&r2=153178
==============================================================================
--- team/group/appdocsxml/CHANGES (original)
+++ team/group/appdocsxml/CHANGES Fri Oct 31 12:46:23 2008
@@ -769,6 +769,7 @@
the first one available.
* Added cli command 'features reload' to reload call features from features.conf
* Moved into core asterisk binary.
+ * Changed the default setting for featuredigittimeout to 2000 ms from 500 ms.
Language Support Changes
------------------------
Modified: team/group/appdocsxml/apps/app_adsiprog.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/apps/app_adsiprog.c?view=diff&rev=153178&r1=153177&r2=153178
==============================================================================
--- team/group/appdocsxml/apps/app_adsiprog.c (original)
+++ team/group/appdocsxml/apps/app_adsiprog.c Fri Oct 31 12:46:23 2008
@@ -838,7 +838,7 @@
ast_log(LOG_WARNING, "'%s' is not a valid state name at line %d of %s\n", tok, lineno, script);
return 0;
}
- if ((snums[scnt] = getstatebyname(state, sname, script, lineno, 0) < 0)) {
+ if ((snums[scnt] = getstatebyname(state, sname, script, lineno, 0) == NULL)) {
ast_log(LOG_WARNING, "State '%s' not declared at line %d of %s\n", sname, lineno, script);
return 0;
}
Modified: team/group/appdocsxml/bootstrap.sh
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/bootstrap.sh?view=diff&rev=153178&r1=153177&r2=153178
==============================================================================
--- team/group/appdocsxml/bootstrap.sh (original)
+++ team/group/appdocsxml/bootstrap.sh Fri Oct 31 12:46:23 2008
@@ -40,7 +40,7 @@
echo "Generating the configure script ..."
-aclocal${MY_AM_VER} -Iautoconf
+aclocal${MY_AM_VER} -I autoconf
autoconf${MY_AC_VER}
autoheader${MY_AC_VER}
automake${MY_AM_VER} --add-missing --copy 2>/dev/null
Modified: team/group/appdocsxml/channels/chan_h323.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/channels/chan_h323.c?view=diff&rev=153178&r1=153177&r2=153178
==============================================================================
--- team/group/appdocsxml/channels/chan_h323.c (original)
+++ team/group/appdocsxml/channels/chan_h323.c Fri Oct 31 12:46:23 2008
@@ -3316,11 +3316,12 @@
}
if (!ast_mutex_lock(&monlock)) {
if ((monitor_thread != AST_PTHREADT_STOP) && (monitor_thread != AST_PTHREADT_NULL)) {
- /* this causes a seg, anyone know why? */
- if (monitor_thread != pthread_self())
+ if (monitor_thread != pthread_self()) {
pthread_cancel(monitor_thread);
+ }
pthread_kill(monitor_thread, SIGURG);
- pthread_join(monitor_thread, NULL);
+ /* Cannot join detached threads */
+ /* pthread_join(monitor_thread, NULL); */
}
monitor_thread = AST_PTHREADT_STOP;
ast_mutex_unlock(&monlock);
Modified: team/group/appdocsxml/channels/chan_local.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/channels/chan_local.c?view=diff&rev=153178&r1=153177&r2=153178
==============================================================================
--- team/group/appdocsxml/channels/chan_local.c (original)
+++ team/group/appdocsxml/channels/chan_local.c Fri Oct 31 12:46:23 2008
@@ -521,6 +521,7 @@
if (!ast_exists_extension(NULL, p->chan->context, p->chan->exten, 1, p->owner->cid.cid_num)) {
ast_log(LOG_NOTICE, "No such extension/context %s@%s while calling Local channel\n", p->chan->exten, p->chan->context);
+ ast_mutex_unlock(&p->lock);
return -1;
}
Modified: team/group/appdocsxml/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/channels/chan_sip.c?view=diff&rev=153178&r1=153177&r2=153178
==============================================================================
--- team/group/appdocsxml/channels/chan_sip.c (original)
+++ team/group/appdocsxml/channels/chan_sip.c Fri Oct 31 12:46:23 2008
@@ -1657,7 +1657,9 @@
};
-/*! \brief Registrations with other SIP proxies
+/*!
+ * \brief Registrations with other SIP proxies
+ *
* Created by sip_register(), the entry is linked in the 'regl' list,
* and never deleted (other than at 'sip reload' or module unload times).
* The entry always has a pending timeout, either waiting for an ACK to
@@ -1666,11 +1668,12 @@
* or once the previously completed registration one expires).
* The registration can be in one of many states, though at the moment
* the handling is a bit mixed.
- * Note that the entire evolution of sip_registry (transmissions,
- * incoming packets and timeouts) is driven by one single thread,
- * do_monitor(), so there is almost no synchronization issue.
- * The only exception is the sip_pvt creation/lookup,
- * as the dialoglist is also manipulated by other threads.
+ *
+ * XXX \todo Reference count handling for this object has some problems with
+ * respect to scheduler entries. The ref count is handled in some places,
+ * but not all of them. There are some places where references get leaked
+ * when this scheduler entry gets cancelled. At worst, this would cause
+ * memory leaks on reloads if registrations get removed from configuration.
*/
struct sip_registry {
ASTOBJ_COMPONENTS_FULL(struct sip_registry,1,1);
@@ -3986,15 +3989,6 @@
peer->chanvars = NULL;
}
- /* If the schedule delete fails, that means the schedule is currently
- * running, which means we should wait for that thread to complete.
- * Otherwise, there's a crashable race condition.
- *
- * NOTE: once peer is refcounted, this probably is no longer necessary.
- */
- AST_SCHED_DEL(sched, peer->expire);
- AST_SCHED_DEL(sched, peer->pokeexpire);
-
register_peer_exten(peer, FALSE);
ast_free_ha(peer->ha);
if (peer->selfdestruct)
@@ -4222,9 +4216,10 @@
/* Cache peer */
ast_copy_flags(&peer->flags[1], &global_flags[1], SIP_PAGE2_RTAUTOCLEAR|SIP_PAGE2_RTCACHEFRIENDS);
if (ast_test_flag(&global_flags[1], SIP_PAGE2_RTAUTOCLEAR)) {
- AST_SCHED_REPLACE(peer->expire, sched, sip_cfg.rtautoclear * 1000, expire_register, (void *) peer);
- /* we could be incr. its refcount right here, but I guess, since
- peers hang around until module unload time anyway, it's not worth the trouble */
+ AST_SCHED_REPLACE_UNREF(peer->expire, sched, sip_cfg.rtautoclear * 1000, expire_register, peer,
+ unref_peer(_data, "remove registration ref"),
+ unref_peer(peer, "remove registration ref"),
+ ref_peer(peer, "add registration ref"));
}
ao2_t_link(peers, peer, "link peer into peers table");
if (peer->addr.sin_addr.s_addr) {
@@ -4756,7 +4751,6 @@
ast_atomic_fetchadd_int(®objs, -1);
ast_dnsmgr_release(reg->dnsmgr);
ast_free(reg);
-
}
/*! \brief Destroy MWI subscription object */
@@ -10616,8 +10610,9 @@
if (peer->addr.sin_addr.s_addr) {
ao2_t_unlink(peers_by_ip, peer, "ao2_unlink of peer from peers_by_ip table");
}
-
- }
+ }
+
+ unref_peer(peer, "removing peer ref for expire_register");
return 0;
}
@@ -10628,7 +10623,11 @@
struct sip_peer *peer = (struct sip_peer *)data;
peer->pokeexpire = -1;
+
sip_poke_peer(peer, 0);
+
+ unref_peer(peer, "removing poke peer ref");
+
return 0;
}
@@ -10680,11 +10679,17 @@
peer->addr.sin_port = htons(port);
if (sipsock < 0) {
/* SIP isn't up yet, so schedule a poke only, pretty soon */
- AST_SCHED_REPLACE(peer->pokeexpire, sched, ast_random() % 5000 + 1, sip_poke_peer_s, peer);
+ AST_SCHED_REPLACE_UNREF(peer->pokeexpire, sched, ast_random() % 5000 + 1, sip_poke_peer_s, peer,
+ unref_peer(_data, "removing poke peer ref"),
+ unref_peer(peer, "removing poke peer ref"),
+ ref_peer(peer, "adding poke peer ref"));
} else {
sip_poke_peer(peer, 0);
}
- AST_SCHED_REPLACE(peer->expire, sched, (expire + 10) * 1000, expire_register, peer);
+ AST_SCHED_REPLACE_UNREF(peer->expire, sched, (expire + 10) * 1000, expire_register, peer,
+ unref_peer(_data, "remove registration ref"),
+ unref_peer(peer, "remove registration ref"),
+ ref_peer(peer, "add registration ref"));
register_peer_exten(peer, TRUE);
}
@@ -10835,7 +10840,9 @@
} else if (!strcasecmp(curi, "*") || !expire) { /* Unregister this peer */
/* This means remove all registrations and return OK */
memset(&peer->addr, 0, sizeof(peer->addr));
- AST_SCHED_DEL(sched, peer->expire);
+
+ AST_SCHED_DEL_UNREF(sched, peer->expire,
+ unref_peer(peer, "remove register expire ref"));
destroy_association(peer);
@@ -10915,13 +10922,22 @@
if (!ast_strlen_zero(curi) && ast_strlen_zero(peer->username))
ast_copy_string(peer->username, curi, sizeof(peer->username));
- AST_SCHED_DEL(sched, peer->expire);
+ AST_SCHED_DEL_UNREF(sched, peer->expire,
+ unref_peer(peer, "remove register expire ref"));
+
if (expire > max_expiry)
expire = max_expiry;
if (expire < min_expiry)
expire = min_expiry;
- peer->expire = peer->is_realtime && !ast_test_flag(&peer->flags[1], SIP_PAGE2_RTCACHEFRIENDS) ? -1 :
- ast_sched_add(sched, (expire + 10) * 1000, expire_register, peer);
+ if (peer->is_realtime && !ast_test_flag(&peer->flags[1], SIP_PAGE2_RTCACHEFRIENDS)) {
+ peer->expire = -1;
+ } else {
+ peer->expire = ast_sched_add(sched, (expire + 10) * 1000, expire_register,
+ ref_peer(peer, "add registration ref"));
+ if (peer->expire == -1) {
+ unref_peer(peer, "remote registration ref");
+ }
+ }
pvt->expiry = expire;
snprintf(data, sizeof(data), "%s:%d:%d:%s:%s", ast_inet_ntoa(peer->addr.sin_addr), ntohs(peer->addr.sin_port), expire, peer->username, peer->fullcontact);
/* Saving TCP connections is useless, we won't be able to reconnect
@@ -14006,7 +14022,7 @@
if ((peer = find_peer(a->argv[2], NULL, load_realtime, FINDALLDEVICES, TRUE))) {
if (peer->expire > 0) {
- expire_register(peer);
+ expire_register(ref_peer(peer, "ref for expire_register"));
ast_cli(a->fd, "Unregistered peer \'%s\'\n\n", a->argv[2]);
} else {
ast_cli(a->fd, "Peer %s not registered\n", a->argv[2]);
@@ -16526,10 +16542,12 @@
pvt_set_needdestroy(p, "got OPTIONS response");
/* Try again eventually */
- AST_SCHED_REPLACE(peer->pokeexpire, sched,
- is_reachable ? peer->qualifyfreq : DEFAULT_FREQ_NOTOK,
- sip_poke_peer_s, peer);
- /* unref_peer(peer, "unref relatedpeer ptr var at end of handle_response_peerpoke"); */
+ AST_SCHED_REPLACE_UNREF(peer->pokeexpire, sched,
+ is_reachable ? peer->qualifyfreq : DEFAULT_FREQ_NOTOK,
+ sip_poke_peer_s, peer,
+ unref_peer(_data, "removing poke peer ref"),
+ unref_peer(peer, "removing poke peer ref"),
+ ref_peer(peer, "adding poke peer ref"));
}
/*! \brief Immediately stop RTP, VRTP and UDPTL as applicable */
@@ -16602,18 +16620,9 @@
switch(resp) {
case 100: /* 100 Trying */
case 101: /* 101 Dialog establishment */
- if (sipmethod == SIP_INVITE)
- handle_response_invite(p, resp, rest, req, seqno);
- break;
case 183: /* 183 Session Progress */
- if (sipmethod == SIP_INVITE)
- handle_response_invite(p, resp, rest, req, seqno);
- break;
case 180: /* 180 Ringing */
- if (sipmethod == SIP_INVITE)
- handle_response_invite(p, resp, rest, req, seqno);
- break;
- case 182: /* 182 Queued */
+ case 182: /* 182 Queued */
if (sipmethod == SIP_INVITE)
handle_response_invite(p, resp, rest, req, seqno);
break;
@@ -20799,12 +20808,14 @@
struct sip_peer *peer = (struct sip_peer *)data;
peer->pokeexpire = -1;
+
if (peer->lastms > -1) {
ast_log(LOG_NOTICE, "Peer '%s' is now UNREACHABLE! Last qualify: %d\n", peer->name, peer->lastms);
manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "ChannelType: SIP\r\nPeer: SIP/%s\r\nPeerStatus: Unreachable\r\nTime: %d\r\n", peer->name, -1);
if (sip_cfg.regextenonqualify)
register_peer_exten(peer, FALSE);
}
+
if (peer->call) {
dialog_unlink_all(peer->call, TRUE, TRUE);
peer->call = dialog_unref(peer->call, "unref dialog peer->call");
@@ -20813,9 +20824,17 @@
peer->lastms = -1;
ast_devstate_changed(AST_DEVICE_UNAVAILABLE, "SIP/%s", peer->name);
+
/* Try again quickly */
- AST_SCHED_REPLACE(peer->pokeexpire, sched,
- DEFAULT_FREQ_NOTOK, sip_poke_peer_s, peer);
+ AST_SCHED_REPLACE_UNREF(peer->pokeexpire, sched,
+ DEFAULT_FREQ_NOTOK, sip_poke_peer_s, peer,
+ unref_peer(_data, "removing poke peer ref"),
+ unref_peer(peer, "removing poke peer ref"),
+ ref_peer(peer, "adding poke peer ref"));
+
+ /* Release the ref held by the running scheduler entry */
+ unref_peer(peer, "release peer poke noanswer ref");
+
return 0;
}
@@ -20832,7 +20851,8 @@
if ((!peer->maxms && !force) || !peer->addr.sin_addr.s_addr) {
/* IF we have no IP, or this isn't to be monitored, return
immediately after clearing things out */
- AST_SCHED_DEL(sched, peer->pokeexpire);
+ AST_SCHED_DEL_UNREF(sched, peer->pokeexpire,
+ unref_peer(peer, "removing poke peer ref"));
peer->lastms = 0;
if (peer->call) {
@@ -20875,7 +20895,8 @@
build_callid_pvt(p);
ao2_t_link(dialogs, p, "Linking in under new name");
- AST_SCHED_DEL(sched, peer->pokeexpire);
+ AST_SCHED_DEL_UNREF(sched, peer->pokeexpire,
+ unref_peer(peer, "removing poke peer ref"));
if (p->relatedpeer)
p->relatedpeer = unref_peer(p->relatedpeer,"unsetting the relatedpeer field in the dialog, before it is set to something else.");
@@ -20891,7 +20912,10 @@
if (xmitres == XMIT_ERROR) {
sip_poke_noanswer(peer); /* Immediately unreachable, network problems */
} else if (!force) {
- AST_SCHED_REPLACE(peer->pokeexpire, sched, peer->maxms * 2, sip_poke_noanswer, peer);
+ AST_SCHED_REPLACE_UNREF(peer->pokeexpire, sched, peer->maxms * 2, sip_poke_noanswer, peer,
+ unref_peer(_data, "removing poke peer ref"),
+ unref_peer(peer, "removing poke peer ref"),
+ ref_peer(peer, "adding poke peer ref"));
}
dialog_unref(p, "unref dialog at end of sip_poke_peer, obtained from sip_alloc, just before it goes out of scope");
return 0;
@@ -21750,7 +21774,8 @@
peer->host_dynamic = TRUE;
} else {
/* Non-dynamic. Make sure we become that way if we're not */
- AST_SCHED_DEL(sched, peer->expire);
+ AST_SCHED_DEL_UNREF(sched, peer->expire,
+ unref_peer(peer, "removing register expire ref"));
peer->host_dynamic = FALSE;
srvlookup = v->value;
if (global_dynamic_exclude_static) {
@@ -23391,7 +23416,10 @@
while ((peer = ao2_t_iterator_next(&i, "iterate thru peers table"))) {
ao2_lock(peer);
ms += 100;
- AST_SCHED_REPLACE(peer->pokeexpire, sched, ms, sip_poke_peer_s, peer);
+ AST_SCHED_REPLACE_UNREF(peer->pokeexpire, sched, ms, sip_poke_peer_s, peer,
+ unref_peer(_data, "removing poke peer ref"),
+ unref_peer(peer, "removing poke peer ref"),
+ ref_peer(peer, "adding poke peer ref"));
ao2_unlock(peer);
unref_peer(peer, "toss iterator peer ptr");
}
Modified: team/group/appdocsxml/channels/misdn/isdn_lib.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/channels/misdn/isdn_lib.c?view=diff&rev=153178&r1=153177&r2=153178
==============================================================================
--- team/group/appdocsxml/channels/misdn/isdn_lib.c (original)
+++ team/group/appdocsxml/channels/misdn/isdn_lib.c Fri Oct 31 12:46:23 2008
@@ -25,6 +25,14 @@
#include "isdn_lib_intern.h"
#include "isdn_lib.h"
+enum event_response_e (*cb_event) (enum event_e event, struct misdn_bchannel *bc, void *user_data);
+
+void (*cb_log) (int level, int port, char *tmpl, ...)
+ __attribute__ ((format (printf, 3, 4)));
+
+int (*cb_jb_empty)(struct misdn_bchannel *bc, char *buffer, int len);
+
+
/*
* Define ARRAY_LEN() because I cannot
* #include "asterisk/utils.h"
@@ -259,8 +267,8 @@
static struct misdn_lib *glob_mgr;
-char tone_425_flip[TONE_425_SIZE];
-char tone_silence_flip[TONE_SILENCE_SIZE];
+static char tone_425_flip[TONE_425_SIZE];
+static char tone_silence_flip[TONE_SILENCE_SIZE];
static void misdn_lib_isdn_event_catcher(void *arg);
static int handle_event_nt(void *dat, void *arg);
@@ -472,7 +480,7 @@
}
-void misdn_dump_chanlist()
+void misdn_dump_chanlist(void)
{
struct misdn_stack *stack=get_misdn_stack();
for ( ; stack; stack=stack->next) {
@@ -481,7 +489,7 @@
}
-int set_chan_in_stack(struct misdn_stack *stack, int channel)
+static int set_chan_in_stack(struct misdn_stack *stack, int channel)
{
cb_log(4,stack->port,"set_chan_in_stack: %d\n",channel);
@@ -1838,7 +1846,7 @@
return 0 ;
}
-int
+static int
handle_event_nt(void *dat, void *arg)
{
manager_t *mgr = (manager_t *)dat;
@@ -3079,7 +3087,7 @@
/** App Interface **/
-int te_lib_init() {
+int te_lib_init(void) {
char buff[1025] = "";
iframe_t *frm=(iframe_t*)buff;
int midev=mISDN_open();
@@ -3888,7 +3896,7 @@
-sem_t handler_started;
+static sem_t handler_started;
/* This is a thread */
static void manager_event_handler(void *arg)
@@ -4037,7 +4045,6 @@
}
}
-
int misdn_lib_init(char *portlist, struct misdn_lib_iface *iface, void *user_data)
{
struct misdn_lib *mgr=calloc(1, sizeof(struct misdn_lib));
@@ -4560,7 +4567,7 @@
#endif
}
-struct misdn_stack* get_misdn_stack() {
+struct misdn_stack* get_misdn_stack(void) {
return glob_mgr->stack_list;
}
Modified: team/group/appdocsxml/channels/misdn/isdn_lib.h
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/channels/misdn/isdn_lib.h?view=diff&rev=153178&r1=153177&r2=153178
==============================================================================
--- team/group/appdocsxml/channels/misdn/isdn_lib.h (original)
+++ team/group/appdocsxml/channels/misdn/isdn_lib.h Fri Oct 31 12:46:23 2008
@@ -567,10 +567,12 @@
};
-enum event_response_e (*cb_event) (enum event_e event, struct misdn_bchannel *bc, void *user_data);
-void (*cb_log) (int level, int port, char *tmpl, ...)
+extern enum event_response_e (*cb_event) (enum event_e event, struct misdn_bchannel *bc, void *user_data);
+
+extern void (*cb_log) (int level, int port, char *tmpl, ...)
__attribute__ ((format (printf, 3, 4)));
-int (*cb_jb_empty)(struct misdn_bchannel *bc, char *buffer, int len);
+
+extern int (*cb_jb_empty)(struct misdn_bchannel *bc, char *buffer, int len);
struct misdn_lib_iface {
enum event_response_e (*cb_event)(enum event_e event, struct misdn_bchannel *bc, void *user_data);
Modified: team/group/appdocsxml/channels/misdn/isdn_lib_intern.h
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/channels/misdn/isdn_lib_intern.h?view=diff&rev=153178&r1=153177&r2=153178
==============================================================================
--- team/group/appdocsxml/channels/misdn/isdn_lib_intern.h (original)
+++ team/group/appdocsxml/channels/misdn/isdn_lib_intern.h Fri Oct 31 12:46:23 2008
@@ -28,8 +28,10 @@
#endif
+#if 0
ibuffer_t *astbuf; /* Not used */
ibuffer_t *misdnbuf; /* Not used */
+#endif
struct send_lock {
pthread_mutex_t lock;
Modified: team/group/appdocsxml/codecs/lpc10/chanwr.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/codecs/lpc10/chanwr.c?view=diff&rev=153178&r1=153177&r2=153178
==============================================================================
--- team/group/appdocsxml/codecs/lpc10/chanwr.c (original)
+++ team/group/appdocsxml/codecs/lpc10/chanwr.c Fri Oct 31 12:46:23 2008
@@ -29,6 +29,7 @@
-lf2c -lm (in that order)
*/
+#include <stdlib.h>
#include "f2c.h"
/* *********************************************************************** */
@@ -228,5 +229,5 @@
/* Subroutine */ int chanrd_(integer *order, integer *ipitv, integer *irms,
integer *irc, integer *ibits)
{
- return chanwr_0_(1, order, ipitv, irms, irc, ibits, 0);
- }
+ return chanwr_0_(1, order, ipitv, irms, irc, ibits, NULL);
+ }
Modified: team/group/appdocsxml/configs/features.conf.sample
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/configs/features.conf.sample?view=diff&rev=153178&r1=153177&r2=153178
==============================================================================
--- team/group/appdocsxml/configs/features.conf.sample (original)
+++ team/group/appdocsxml/configs/features.conf.sample Fri Oct 31 12:46:23 2008
@@ -35,8 +35,8 @@
;xfersound = beep ; to indicate an attended transfer is complete
;xferfailsound = beeperr ; to indicate a failed transfer
;pickupexten = *8 ; Configure the pickup extension. (default is *8)
-;featuredigittimeout = 500 ; Max time (ms) between digits for
- ; feature activation (default is 500 ms)
+;featuredigittimeout = 2000 ; Max time (ms) between digits for
+ ; feature activation (default is 2000 ms)
;atxfernoanswertimeout = 15 ; Timeout for answer on attended transfer default is 15 seconds.
;atxferdropcall = no ; If someone does an attended transfer, then hangs up before the transferred
; caller is connected, then by default, the system will try to call back the
Modified: team/group/appdocsxml/funcs/func_db.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/funcs/func_db.c?view=diff&rev=153178&r1=153177&r2=153178
==============================================================================
--- team/group/appdocsxml/funcs/func_db.c (original)
+++ team/group/appdocsxml/funcs/func_db.c Fri Oct 31 12:46:23 2008
@@ -92,8 +92,8 @@
char *parse, char *buf, size_t len)
{
AST_DECLARE_APP_ARGS(args,
- AST_APP_ARG(family);
- AST_APP_ARG(key);
+ AST_APP_ARG(family);
+ AST_APP_ARG(key);
);
buf[0] = '\0';
@@ -112,8 +112,9 @@
if (ast_db_get(args.family, args.key, buf, len - 1)) {
ast_debug(1, "DB: %s/%s not found in database.\n", args.family, args.key);
- } else
+ } else {
pbx_builtin_setvar_helper(chan, "DB_RESULT", buf);
+ }
return 0;
}
@@ -122,8 +123,8 @@
const char *value)
{
AST_DECLARE_APP_ARGS(args,
- AST_APP_ARG(family);
- AST_APP_ARG(key);
+ AST_APP_ARG(family);
+ AST_APP_ARG(key);
);
if (ast_strlen_zero(parse)) {
@@ -138,8 +139,9 @@
return -1;
}
- if (ast_db_put(args.family, args.key, (char *) value))
+ if (ast_db_put(args.family, args.key, value)) {
ast_log(LOG_WARNING, "DB: Error writing value to database.\n");
+ }
return 0;
}
@@ -154,8 +156,8 @@
char *parse, char *buf, size_t len)
{
AST_DECLARE_APP_ARGS(args,
- AST_APP_ARG(family);
- AST_APP_ARG(key);
+ AST_APP_ARG(family);
+ AST_APP_ARG(key);
);
buf[0] = '\0';
@@ -172,9 +174,9 @@
return -1;
}
- if (ast_db_get(args.family, args.key, buf, len - 1))
+ if (ast_db_get(args.family, args.key, buf, len - 1)) {
strcpy(buf, "0");
- else {
+ } else {
pbx_builtin_setvar_helper(chan, "DB_RESULT", buf);
strcpy(buf, "1");
}
@@ -191,8 +193,8 @@
char *parse, char *buf, size_t len)
{
AST_DECLARE_APP_ARGS(args,
- AST_APP_ARG(family);
- AST_APP_ARG(key);
+ AST_APP_ARG(family);
+ AST_APP_ARG(key);
);
buf[0] = '\0';
@@ -216,6 +218,7 @@
ast_debug(1, "DB_DELETE: %s/%s could not be deleted from the database\n", args.family, args.key);
}
}
+
pbx_builtin_setvar_helper(chan, "DB_RESULT", buf);
return 0;
Modified: team/group/appdocsxml/include/asterisk/sched.h
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/include/asterisk/sched.h?view=diff&rev=153178&r1=153177&r2=153178
==============================================================================
--- team/group/appdocsxml/include/asterisk/sched.h (original)
+++ team/group/appdocsxml/include/asterisk/sched.h Fri Oct 31 12:46:23 2008
@@ -113,11 +113,10 @@
unrefcall; /* should ref _data! */ \
if (_count == 10) \
ast_log(LOG_WARNING, "Unable to cancel schedule ID %d. This is probably a bug (%s: %s, line %d).\n", id, __FILE__, __PRETTY_FUNCTION__, __LINE__); \
+ refcall; \
id = ast_sched_add_variable(sched, when, callback, data, variable); \
if (id == -1) \
addfailcall; \
- else \
- refcall; \
} while (0);
#define AST_SCHED_REPLACE_UNREF(id, sched, when, callback, data, unrefcall, addfailcall, refcall) \
Modified: team/group/appdocsxml/include/asterisk/timing.h
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/include/asterisk/timing.h?view=diff&rev=153178&r1=153177&r2=153178
==============================================================================
--- team/group/appdocsxml/include/asterisk/timing.h (original)
+++ team/group/appdocsxml/include/asterisk/timing.h Fri Oct 31 12:46:23 2008
@@ -43,6 +43,9 @@
4) Multiple 'event types', so that the code using the timer can
know whether the wakeup it received was due to a periodic trigger
or a continuous trigger.
+
+ \todo Create an implementation of this API for Linux based on the
+ following API: http://www.kernel.org/doc/man-pages/online/pages/man2/timerfd_create.2.html
*/
#ifndef _ASTERISK_TIMING_H
Modified: team/group/appdocsxml/main/asterisk.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/main/asterisk.c?view=diff&rev=153178&r1=153177&r2=153178
==============================================================================
--- team/group/appdocsxml/main/asterisk.c (original)
+++ team/group/appdocsxml/main/asterisk.c Fri Oct 31 12:46:23 2008
@@ -118,6 +118,7 @@
#include "asterisk/module.h"
#include "asterisk/dsp.h"
#include "asterisk/xml.h"
+#include "asterisk/buildinfo.h"
#include "asterisk/doxyref.h" /* Doxygen documentation */
@@ -246,13 +247,6 @@
static char ast_config_AST_CTL_OWNER[PATH_MAX] = "\0";
static char ast_config_AST_CTL_GROUP[PATH_MAX] = "\0";
static char ast_config_AST_CTL[PATH_MAX] = "asterisk.ctl";
-
-extern const char *ast_build_hostname;
-extern const char *ast_build_kernel;
-extern const char *ast_build_machine;
-extern const char *ast_build_os;
-extern const char *ast_build_date;
-extern const char *ast_build_user;
static char *_argv[256];
static int shuttingdown;
Modified: team/group/appdocsxml/main/buildinfo.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/main/buildinfo.c?view=diff&rev=153178&r1=153177&r2=153178
==============================================================================
--- team/group/appdocsxml/main/buildinfo.c (original)
+++ team/group/appdocsxml/main/buildinfo.c Fri Oct 31 12:46:23 2008
@@ -23,6 +23,7 @@
* \author Kevin P. Fleming <kpfleming at digium.com>
*/
+#include "asterisk/buildinfo.h"
#include "asterisk/build.h"
const char *ast_build_hostname = BUILD_HOSTNAME;
Modified: team/group/appdocsxml/main/cdr.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/main/cdr.c?view=diff&rev=153178&r1=153177&r2=153178
==============================================================================
--- team/group/appdocsxml/main/cdr.c (original)
+++ team/group/appdocsxml/main/cdr.c Fri Oct 31 12:46:23 2008
@@ -1425,7 +1425,7 @@
if ((size_value = ast_variable_retrieve(config, "general", "size"))) {
if (sscanf(size_value, "%d", &cfg_size) < 1)
ast_log(LOG_WARNING, "Unable to convert '%s' to a numeric value.\n", size_value);
- else if (size_value < 0)
+ else if (cfg_size < 0)
ast_log(LOG_WARNING, "Invalid maximum batch size '%d' specified, using default\n", cfg_size);
else
batchsize = cfg_size;
@@ -1433,7 +1433,7 @@
if ((time_value = ast_variable_retrieve(config, "general", "time"))) {
if (sscanf(time_value, "%d", &cfg_time) < 1)
ast_log(LOG_WARNING, "Unable to convert '%s' to a numeric value.\n", time_value);
- else if (time_value < 0)
+ else if (cfg_time < 0)
ast_log(LOG_WARNING, "Invalid maximum batch time '%d' specified, using default\n", cfg_time);
else
batchtime = cfg_time;
Modified: team/group/appdocsxml/main/channel.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/main/channel.c?view=diff&rev=153178&r1=153177&r2=153178
==============================================================================
--- team/group/appdocsxml/main/channel.c (original)
+++ team/group/appdocsxml/main/channel.c Fri Oct 31 12:46:23 2008
@@ -363,8 +363,7 @@
return total;
}
traced = store->data;
- (*buf)->used = 0;
- (*buf)->str[0] = '\0';
+ ast_str_reset(*buf);
AST_LIST_TRAVERSE(&traced->trace, trace, entry) {
if (ast_str_append(buf, 0, "[%d] => %s, %s, %d\n", total, trace->context, trace->exten, trace->priority) < 0) {
ast_log(LOG_ERROR, "Data Buffer Size Exceeded!\n");
Modified: team/group/appdocsxml/main/dial.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/main/dial.c?view=diff&rev=153178&r1=153177&r2=153178
==============================================================================
--- team/group/appdocsxml/main/dial.c (original)
+++ team/group/appdocsxml/main/dial.c Fri Oct 31 12:46:23 2008
@@ -53,15 +53,15 @@
/*! \brief Dialing channel structure. Contains per-channel dialing options, asterisk channel, and more! */
struct ast_dial_channel {
- int num; /*!< Unique number for dialed channel */
- int timeout; /*!< Maximum time allowed for attempt */
- char *tech; /*!< Technology being dialed */
- char *device; /*!< Device being dialed */
- void *options[AST_DIAL_OPTION_MAX]; /*!< Channel specific options */
- int cause; /*!< Cause code in case of failure */
- int is_running_app:1; /*!< Is this running an application? */
- struct ast_channel *owner; /*!< Asterisk channel */
- AST_LIST_ENTRY(ast_dial_channel) list; /*!< Linked list information */
+ int num; /*!< Unique number for dialed channel */
+ int timeout; /*!< Maximum time allowed for attempt */
+ char *tech; /*!< Technology being dialed */
+ char *device; /*!< Device being dialed */
+ void *options[AST_DIAL_OPTION_MAX]; /*!< Channel specific options */
+ int cause; /*!< Cause code in case of failure */
+ unsigned int is_running_app:1; /*!< Is this running an application? */
+ struct ast_channel *owner; /*!< Asterisk channel */
+ AST_LIST_ENTRY(ast_dial_channel) list; /*!< Linked list information */
};
/*! \brief Typedef for dial option enable */
Modified: team/group/appdocsxml/main/dnsmgr.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/main/dnsmgr.c?view=diff&rev=153178&r1=153177&r2=153178
==============================================================================
--- team/group/appdocsxml/main/dnsmgr.c (original)
+++ team/group/appdocsxml/main/dnsmgr.c Fri Oct 31 12:46:23 2008
@@ -57,7 +57,7 @@
/*! SRV record to lookup, if provided. Composed of service, protocol, and domain name: _Service._Proto.Name */
char *service;
/*! Set to 1 if the entry changes */
- int changed:1;
+ unsigned int changed:1;
ast_mutex_t lock;
AST_RWLIST_ENTRY(ast_dnsmgr_entry) list;
/*! just 1 here, but we use calloc to allocate the correct size */
Modified: team/group/appdocsxml/main/features.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/main/features.c?view=diff&rev=153178&r1=153177&r2=153178
==============================================================================
--- team/group/appdocsxml/main/features.c (original)
+++ team/group/appdocsxml/main/features.c Fri Oct 31 12:46:23 2008
@@ -150,7 +150,7 @@
#define DEFAULT_PARK_TIME 45000
#define DEFAULT_TRANSFER_DIGIT_TIMEOUT 3000
-#define DEFAULT_FEATURE_DIGIT_TIMEOUT 500
+#define DEFAULT_FEATURE_DIGIT_TIMEOUT 2000
#define DEFAULT_NOANSWER_TIMEOUT_ATTENDED_TRANSFER 15000
#define DEFAULT_PARKINGLOT "default" /*!< Default parking lot */
#define DEFAULT_ATXFER_DROP_CALL 0
Modified: team/group/appdocsxml/utils/astcanary.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/utils/astcanary.c?view=diff&rev=153178&r1=153177&r2=153178
==============================================================================
--- team/group/appdocsxml/utils/astcanary.c (original)
+++ team/group/appdocsxml/utils/astcanary.c Fri Oct 31 12:46:23 2008
@@ -59,7 +59,7 @@
* Asterisk itself.
*/
-const char explanation[] =
+static const char explanation[] =
"This file is created when Asterisk is run with a realtime priority (-p). It\n"
"must continue to exist, and the astcanary process must be allowed to continue\n"
"running, or else the Asterisk process will, within a short period of time,\n"
More information about the asterisk-commits
mailing list