[asterisk-commits] branch oej/multiparking - r7711 in
/team/oej/multiparking: ./ apps/ channels/...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Mon Jan 2 03:16:24 CST 2006
Author: oej
Date: Mon Jan 2 03:16:17 2006
New Revision: 7711
URL: http://svn.digium.com/view/asterisk?rev=7711&view=rev
Log:
Merged revisions 7688,7690-7691,7693,7699,7705,7710 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r7688 | russell | 2005-12-31 17:35:48 +0100 (Sat, 31 Dec 2005) | 2 lines
update comments to doxygen style
........
r7690 | russell | 2005-12-31 20:45:30 +0100 (Sat, 31 Dec 2005) | 3 lines
- fix some doxygen errors
- add the flag definitions to the page about global options
........
r7691 | russell | 2006-01-01 09:45:29 +0100 (Sun, 01 Jan 2006) | 3 lines
remove some duplicated code (issue #6098)
Also, touch up some formatting
........
r7693 | russell | 2006-01-01 18:50:37 +0100 (Sun, 01 Jan 2006) | 2 lines
clean up some loops and replace some duplicate code with a for loop (issue #6100)
........
r7699 | russell | 2006-01-01 19:37:50 +0100 (Sun, 01 Jan 2006) | 2 lines
fix a couple of doxygen errors
........
r7705 | bweschke | 2006-01-02 02:53:26 +0100 (Mon, 02 Jan 2006) | 3 lines
Fix compiler warnings.
........
r7710 | tilghman | 2006-01-02 08:41:02 +0100 (Mon, 02 Jan 2006) | 3 lines
Merged revisions 7709 via svnmerge from
/branches/1.2
........
Modified:
team/oej/multiparking/ (props changed)
team/oej/multiparking/apps/app_mixmonitor.c
team/oej/multiparking/channel.c
team/oej/multiparking/channels/chan_iax2.c
team/oej/multiparking/channels/chan_sip.c
team/oej/multiparking/include/asterisk/callerid.h
team/oej/multiparking/include/asterisk/channel.h
team/oej/multiparking/include/asterisk/doxyref.h
team/oej/multiparking/include/asterisk/options.h
team/oej/multiparking/pbx.c
team/oej/multiparking/say.c
Propchange: team/oej/multiparking/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Jan 2 03:16:17 2006
@@ -1,1 +1,1 @@
-/trunk:1-7686
+/trunk:1-7710
Modified: team/oej/multiparking/apps/app_mixmonitor.c
URL: http://svn.digium.com/view/asterisk/team/oej/multiparking/apps/app_mixmonitor.c?rev=7711&r1=7710&r2=7711&view=diff
==============================================================================
--- team/oej/multiparking/apps/app_mixmonitor.c (original)
+++ team/oej/multiparking/apps/app_mixmonitor.c Mon Jan 2 03:16:17 2006
@@ -86,6 +86,7 @@
static const char *mixmonitor_spy_type = "MixMonitor";
struct mixmonitor {
+ AST_LIST_ENTRY(mixmonitor) list;
struct ast_channel *chan;
char *filename;
char *post_process;
@@ -94,12 +95,15 @@
int writevol;
};
+AST_LIST_HEAD_STATIC(monitors, mixmonitor);
+
enum {
MUXFLAG_APPEND = (1 << 1),
MUXFLAG_BRIDGED = (1 << 2),
MUXFLAG_VOLUME = (1 << 3),
MUXFLAG_READVOLUME = (1 << 4),
MUXFLAG_WRITEVOLUME = (1 << 5),
+ FLAG_STOP = (1 << 6),
} mixmonitor_flags;
enum {
@@ -163,6 +167,10 @@
char post_process[1024] = "";
STANDARD_INCREMENT_USECOUNT;
+
+ AST_LIST_LOCK(&monitors);
+ AST_LIST_INSERT_HEAD(&monitors, mixmonitor, list);
+ AST_LIST_UNLOCK(&monitors);
name = ast_strdupa(mixmonitor->chan->name);
@@ -218,7 +226,7 @@
ast_channel_spy_trigger_wait(&spy);
- if (ast_check_hangup(mixmonitor->chan) || spy.status != CHANSPY_RUNNING) {
+ if (ast_check_hangup(mixmonitor->chan) || spy.status != CHANSPY_RUNNING || ast_test_flag(mixmonitor, FLAG_STOP)) {
ast_mutex_unlock(&spy.lock);
break;
}
@@ -244,6 +252,8 @@
ast_mutex_unlock(&spy.lock);
}
+ stopmon(mixmonitor->chan, &spy);
+
if (mixmonitor->post_process) {
char *p;
@@ -255,8 +265,6 @@
pbx_substitute_variables_helper(mixmonitor->chan, mixmonitor->post_process, post_process, sizeof(post_process) - 1);
}
- stopmon(mixmonitor->chan, &spy);
-
if (option_verbose > 1)
ast_verbose(VERBOSE_PREFIX_2 "End MixMonitor Recording %s\n", name);
@@ -273,6 +281,10 @@
ast_closestream(fs);
out:
+ AST_LIST_LOCK(&monitors);
+ AST_LIST_REMOVE(&monitors, mixmonitor, list);
+ AST_LIST_UNLOCK(&monitors);
+
free(mixmonitor);
STANDARD_DECREMENT_USECOUNT;
@@ -403,6 +415,7 @@
static int mixmonitor_cli(int fd, int argc, char **argv)
{
struct ast_channel *chan;
+ struct mixmonitor *mon;
if (argc < 3)
return RESULT_SHOWUSAGE;
@@ -414,8 +427,13 @@
if (!strcasecmp(argv[1], "start"))
mixmonitor_exec(chan, argv[3]);
- else if (!strcasecmp(argv[1], "stop"))
- ast_channel_spy_stop_by_type(chan, mixmonitor_spy_type);
+ else if (!strcasecmp(argv[1], "stop")) {
+ AST_LIST_TRAVERSE_SAFE_BEGIN(&monitors, mon, list) {
+ if (chan == mon->chan)
+ ast_set_flag(mon, FLAG_STOP);
+ }
+ AST_LIST_TRAVERSE_SAFE_END;
+ }
ast_mutex_unlock(&chan->lock);
Modified: team/oej/multiparking/channel.c
URL: http://svn.digium.com/view/asterisk/team/oej/multiparking/channel.c?rev=7711&r1=7710&r2=7711&view=diff
==============================================================================
--- team/oej/multiparking/channel.c (original)
+++ team/oej/multiparking/channel.c Mon Jan 2 03:16:17 2006
@@ -90,9 +90,7 @@
#define MONITOR_DELAY 150 * 8 /* 150 ms of MONITORING DELAY */
#endif
-/*
- * Prevent new channel allocation if shutting down.
- */
+/*! Prevent new channel allocation if shutting down. */
static int shutting_down = 0;
AST_MUTEX_DEFINE_STATIC(uniquelock);
@@ -107,17 +105,16 @@
struct chanlist *next;
};
+/*! the list of registered channel types */
static struct chanlist *backends = NULL;
-/*
- * the list of channels we have
- */
+/*! the list of channels we have */
static struct ast_channel *channels = NULL;
-/* Protect the channel list, both backends and channels.
- */
+/*! Protect the channel list, both backends and channels. */
AST_MUTEX_DEFINE_STATIC(chlock);
+/*! map AST_CAUSE's to readable string representations */
const struct ast_cause {
int cause;
const char *desc;
@@ -199,7 +196,7 @@
static struct ast_cli_entry cli_show_channeltypes =
{ { "show", "channeltypes", NULL }, show_channeltypes, "Show available channel types", show_channeltypes_usage };
-/*--- ast_check_hangup: Checks to see if a channel is needing hang up */
+/*! \brief Checks to see if a channel is needing hang up */
int ast_check_hangup(struct ast_channel *chan)
{
time_t myt;
@@ -230,7 +227,7 @@
return res;
}
-/*--- ast_begin_shutdown: Initiate system shutdown */
+/*! \brief Initiate system shutdown */
void ast_begin_shutdown(int hangup)
{
struct ast_channel *c;
@@ -243,7 +240,7 @@
}
}
-/*--- ast_active_channels: returns number of active/allocated channels */
+/*! \brief returns number of active/allocated channels */
int ast_active_channels(void)
{
struct ast_channel *c;
@@ -255,19 +252,19 @@
return cnt;
}
-/*--- ast_cancel_shutdown: Cancel a shutdown in progress */
+/*! \brief Cancel a shutdown in progress */
void ast_cancel_shutdown(void)
{
shutting_down = 0;
}
-/*--- ast_shutting_down: Returns non-zero if Asterisk is being shut down */
+/*! \brief Returns non-zero if Asterisk is being shut down */
int ast_shutting_down(void)
{
return shutting_down;
}
-/*--- ast_channel_setwhentohangup: Set when to hangup channel */
+/*! \brief Set when to hangup channel */
void ast_channel_setwhentohangup(struct ast_channel *chan, time_t offset)
{
time_t myt;
@@ -282,7 +279,7 @@
return;
}
-/*--- ast_channel_cmpwhentohangup: Compare a offset with when to hangup channel */
+/*! \brief Compare a offset with when to hangup channel */
int ast_channel_cmpwhentohangup(struct ast_channel *chan, time_t offset)
{
time_t whentohangup;
@@ -307,7 +304,7 @@
}
}
-/*--- ast_channel_register: Register a new telephony channel in Asterisk */
+/*! \brief Register a new telephony channel in Asterisk */
int ast_channel_register(const struct ast_channel_tech *tech)
{
struct chanlist *chan;
@@ -393,7 +390,7 @@
return NULL;
}
-/*--- ast_cause2str: Gives the string form of a given hangup cause */
+/*! \brief Gives the string form of a given hangup cause */
const char *ast_cause2str(int cause)
{
int x;
@@ -405,7 +402,7 @@
return "Unknown";
}
-/*--- ast_state2str: Gives the string form of a given channel state */
+/*! \brief Gives the string form of a given channel state */
char *ast_state2str(int state)
{
/* XXX Not reentrant XXX */
@@ -433,7 +430,7 @@
}
}
-/*--- ast_transfercapability2str: Gives the string form of a given transfer capability */
+/*! \brief Gives the string form of a given transfer capability */
char *ast_transfercapability2str(int transfercapability)
{
switch(transfercapability) {
@@ -454,7 +451,7 @@
}
}
-/*--- ast_best_codec: Pick the best codec */
+/*! \brief Pick the best codec */
int ast_best_codec(int fmts)
{
/* This just our opinion, expressed in code. We are asked to choose
@@ -462,29 +459,29 @@
int x;
static int prefs[] =
{
- /* Okay, ulaw is used by all telephony equipment, so start with it */
+ /*! Okay, ulaw is used by all telephony equipment, so start with it */
AST_FORMAT_ULAW,
- /* Unless of course, you're a silly European, so then prefer ALAW */
+ /*! Unless of course, you're a silly European, so then prefer ALAW */
AST_FORMAT_ALAW,
- /* Okay, well, signed linear is easy to translate into other stuff */
+ /*! Okay, well, signed linear is easy to translate into other stuff */
AST_FORMAT_SLINEAR,
- /* G.726 is standard ADPCM */
+ /*! G.726 is standard ADPCM */
AST_FORMAT_G726,
- /* ADPCM has great sound quality and is still pretty easy to translate */
+ /*! ADPCM has great sound quality and is still pretty easy to translate */
AST_FORMAT_ADPCM,
- /* Okay, we're down to vocoders now, so pick GSM because it's small and easier to
- translate and sounds pretty good */
+ /*! Okay, we're down to vocoders now, so pick GSM because it's small and easier to
+ translate and sounds pretty good */
AST_FORMAT_GSM,
- /* iLBC is not too bad */
+ /*! iLBC is not too bad */
AST_FORMAT_ILBC,
- /* Speex is free, but computationally more expensive than GSM */
+ /*! Speex is free, but computationally more expensive than GSM */
AST_FORMAT_SPEEX,
- /* Ick, LPC10 sounds terrible, but at least we have code for it, if you're tacky enough
- to use it */
+ /*! Ick, LPC10 sounds terrible, but at least we have code for it, if you're tacky enough
+ to use it */
AST_FORMAT_LPC10,
- /* G.729a is faster than 723 and slightly less expensive */
+ /*! G.729a is faster than 723 and slightly less expensive */
AST_FORMAT_G729A,
- /* Down to G.723.1 which is proprietary but at least designed for voice */
+ /*! Down to G.723.1 which is proprietary but at least designed for voice */
AST_FORMAT_G723_1,
};
@@ -502,7 +499,7 @@
.description = "Null channel (should not see this)",
};
-/*--- ast_channel_alloc: Create a new channel structure */
+/*! \brief Create a new channel structure */
struct ast_channel *ast_channel_alloc(int needqueue)
{
struct ast_channel *tmp;
@@ -597,7 +594,7 @@
return tmp;
}
-/*--- ast_queue_frame: Queue an outgoing media frame */
+/*! \brief Queue an outgoing media frame */
int ast_queue_frame(struct ast_channel *chan, struct ast_frame *fin)
{
struct ast_frame *f;
@@ -654,7 +651,7 @@
return 0;
}
-/*--- ast_queue_hangup: Queue a hangup frame for channel */
+/*! \brief Queue a hangup frame for channel */
int ast_queue_hangup(struct ast_channel *chan)
{
struct ast_frame f = { AST_FRAME_CONTROL, AST_CONTROL_HANGUP };
@@ -666,7 +663,7 @@
return ast_queue_frame(chan, &f);
}
-/*--- ast_queue_control: Queue a control frame */
+/*! \brief Queue a control frame */
int ast_queue_control(struct ast_channel *chan, int control)
{
struct ast_frame f = { AST_FRAME_CONTROL, };
@@ -674,7 +671,7 @@
return ast_queue_frame(chan, &f);
}
-/*--- ast_channel_defer_dtmf: Set defer DTMF flag on channel */
+/*! \brief Set defer DTMF flag on channel */
int ast_channel_defer_dtmf(struct ast_channel *chan)
{
int pre = 0;
@@ -686,15 +683,17 @@
return pre;
}
-/*--- ast_channel_undefer_dtmf: Unset defer DTMF flag on channel */
+/*! \brief Unset defer DTMF flag on channel */
void ast_channel_undefer_dtmf(struct ast_channel *chan)
{
if (chan)
ast_clear_flag(chan, AST_FLAG_DEFER_DTMF);
}
-/*
- * Helper function to find channels. It supports these modes:
+/*!
+ * \brief Helper function to find channels.
+ *
+ * It supports these modes:
*
* prev != NULL : get channel next in list after prev
* name != NULL : get channel with matching name
@@ -705,10 +704,10 @@
* It returns with the channel's lock held. If getting the individual lock fails,
* unlock and retry quickly up to 10 times, then give up.
*
- * XXX Note that this code has cost O(N) because of the need to verify
+ * \note XXX Note that this code has cost O(N) because of the need to verify
* that the object is still on the global list.
*
- * XXX also note that accessing fields (e.g. c->name in ast_log())
+ * \note XXX also note that accessing fields (e.g. c->name in ast_log())
* can only be done with the lock held or someone could delete the
* object while we work on it. This causes some ugliness in the code.
* Note that removing the first ast_log() may be harmful, as it would
@@ -778,47 +777,46 @@
return NULL;
}
-/*--- ast_channel_walk_locked: Browse channels in use */
+/*! \brief Browse channels in use */
struct ast_channel *ast_channel_walk_locked(const struct ast_channel *prev)
{
return channel_find_locked(prev, NULL, 0, NULL, NULL);
}
-/*--- ast_get_channel_by_name_locked: Get channel by name and lock it */
+/*! \brief Get channel by name and lock it */
struct ast_channel *ast_get_channel_by_name_locked(const char *name)
{
return channel_find_locked(NULL, name, 0, NULL, NULL);
}
-/*--- ast_get_channel_by_name_prefix_locked: Get channel by name prefix and lock it */
+/*! \brief Get channel by name prefix and lock it */
struct ast_channel *ast_get_channel_by_name_prefix_locked(const char *name, const int namelen)
{
return channel_find_locked(NULL, name, namelen, NULL, NULL);
}
-/*--- ast_walk_channel_by_name_prefix_locked: Get next channel by name prefix and lock it */
+/*! \brief Get next channel by name prefix and lock it */
struct ast_channel *ast_walk_channel_by_name_prefix_locked(struct ast_channel *chan, const char *name, const int namelen)
{
return channel_find_locked(chan, name, namelen, NULL, NULL);
}
-/*--- ast_get_channel_by_exten_locked: Get channel by exten (and optionally context) and lock it */
+/*! \brief Get channel by exten (and optionally context) and lock it */
struct ast_channel *ast_get_channel_by_exten_locked(const char *exten, const char *context)
{
return channel_find_locked(NULL, NULL, 0, context, exten);
}
-/*--- ast_safe_sleep_conditional: Wait, look for hangups and condition arg */
-int ast_safe_sleep_conditional( struct ast_channel *chan, int ms,
- int (*cond)(void*), void *data )
+/*! \brief Wait, look for hangups and condition arg */
+int ast_safe_sleep_conditional(struct ast_channel *chan, int ms, int (*cond)(void*), void *data)
{
struct ast_frame *f;
- while(ms > 0) {
- if( cond && ((*cond)(data) == 0 ) )
+ while (ms > 0) {
+ if (cond && ((*cond)(data) == 0))
return 0;
ms = ast_waitfor(chan, ms);
- if (ms <0)
+ if (ms < 0)
return -1;
if (ms > 0) {
f = ast_read(chan);
@@ -830,22 +828,10 @@
return 0;
}
-/*--- ast_safe_sleep: Wait, look for hangups */
+/*! \brief Wait, look for hangups */
int ast_safe_sleep(struct ast_channel *chan, int ms)
{
- struct ast_frame *f;
- while(ms > 0) {
- ms = ast_waitfor(chan, ms);
- if (ms <0)
- return -1;
- if (ms > 0) {
- f = ast_read(chan);
- if (!f)
- return -1;
- ast_frfree(f);
- }
- }
- return 0;
+ return ast_safe_sleep_conditional(chan, ms, NULL, NULL);
}
static void free_cid(struct ast_callerid *cid)
@@ -862,7 +848,7 @@
free(cid->cid_rdnis);
}
-/*--- ast_channel_free: Free a channel structure */
+/*! \brief Free a channel structure */
void ast_channel_free(struct ast_channel *chan)
{
struct ast_channel *last=NULL, *cur;
@@ -1083,7 +1069,7 @@
AST_LIST_TRAVERSE_SAFE_END;
}
-/*--- ast_softhangup_nolock: Softly hangup a channel, don't lock */
+/*! \brief Softly hangup a channel, don't lock */
int ast_softhangup_nolock(struct ast_channel *chan, int cause)
{
int res = 0;
@@ -1099,7 +1085,7 @@
return res;
}
-/*--- ast_softhangup_nolock: Softly hangup a channel, lock */
+/*! \brief Softly hangup a channel, lock */
int ast_softhangup(struct ast_channel *chan, int cause)
{
int res;
@@ -1253,7 +1239,7 @@
clone->rawreadformat = clone->nativeformats;
}
-/*--- ast_hangup: Hangup a channel */
+/*! \brief Hangup a channel */
int ast_hangup(struct ast_channel *chan)
{
int res = 0;
@@ -1360,8 +1346,6 @@
return 0;
}
-
-
void ast_deactivate_generator(struct ast_channel *chan)
{
ast_mutex_lock(&chan->lock);
@@ -1423,7 +1407,7 @@
return res;
}
-/*--- ast_waitfor_n_fd: Wait for x amount of time on a file descriptor to have input. */
+/*! \brief Wait for x amount of time on a file descriptor to have input. */
int ast_waitfor_n_fd(int *fds, int n, int *ms, int *exception)
{
struct timeval start = { 0 , 0 };
@@ -1479,7 +1463,7 @@
return winner;
}
-/*--- ast_waitfor_nanfds: Wait for x amount of time on a file descriptor to have input. */
+/*! \brief Wait for x amount of time on a file descriptor to have input. */
struct ast_channel *ast_waitfor_nandfds(struct ast_channel **c, int n, int *fds, int nfds,
int *exception, int *outfd, int *ms)
{
@@ -2556,8 +2540,13 @@
return res;
}
-/*--- ast_transfer: Transfer a call to dest, if the channel supports transfer */
-/* called by app_transfer or the manager interface */
+/*!
+ \brief Transfer a call to dest, if the channel supports transfer
+
+ Called by:
+ \arg app_transfer
+ \arg the manager interface
+*/
int ast_transfer(struct ast_channel *chan, char *dest)
{
int res = -1;
@@ -2817,13 +2806,15 @@
}
}
-/* Clone channel variables from 'clone' channel into 'original' channel
- All variables except those related to app_groupcount are cloned
- Variables are actually _removed_ from 'clone' channel, presumably
- because it will subsequently be destroyed.
- Assumes locks will be in place on both channels when called.
+/*!
+ \brief Clone channel variables from 'clone' channel into 'original' channel
+
+ All variables except those related to app_groupcount are cloned.
+ Variables are actually _removed_ from 'clone' channel, presumably
+ because it will subsequently be destroyed.
+
+ \note Assumes locks will be in place on both channels when called.
*/
-
static void clone_variables(struct ast_channel *original, struct ast_channel *clone)
{
struct ast_var_t *varptr;
@@ -2848,8 +2839,11 @@
AST_LIST_INSERT_TAIL(&original->varshead, AST_LIST_FIRST(&clone->varshead), entries);
}
-/*--- ast_do_masquerade: Masquerade a channel */
-/* Assumes channel will be locked when called */
+/*!
+ \brief Masquerade a channel
+
+ \note Assumes channel will be locked when called
+*/
int ast_do_masquerade(struct ast_channel *original)
{
int x,i;
@@ -3154,7 +3148,7 @@
return 0;
}
-/*--- Find bridged channel */
+/*! \brief Find bridged channel */
struct ast_channel *ast_bridged_channel(struct ast_channel *chan)
{
struct ast_channel *bridged;
@@ -3309,7 +3303,7 @@
return res;
}
-/*--- ast_channel_bridge: Bridge two channels together */
+/*! \brief Bridge two channels together */
enum ast_bridge_result ast_channel_bridge(struct ast_channel *c0, struct ast_channel *c1,
struct ast_bridge_config *config, struct ast_frame **fo, struct ast_channel **rc)
{
@@ -3532,7 +3526,7 @@
return res;
}
-/*--- ast_channel_setoption: Sets an option on a channel */
+/*! \brief Sets an option on a channel */
int ast_channel_setoption(struct ast_channel *chan, int option, void *data, int datalen, int block)
{
int res;
@@ -3746,7 +3740,7 @@
ast_moh_cleanup_ptr = NULL;
}
-/*! Turn on music on hold on a given channel */
+/*! \brief Turn on music on hold on a given channel */
int ast_moh_start(struct ast_channel *chan, char *mclass)
{
if (ast_moh_start_ptr)
@@ -3758,7 +3752,7 @@
return 0;
}
-/*! Turn off music on hold on a given channel */
+/*! \brief Turn off music on hold on a given channel */
void ast_moh_stop(struct ast_channel *chan)
{
if (ast_moh_stop_ptr)
@@ -3776,7 +3770,7 @@
ast_cli_register(&cli_show_channeltypes);
}
-/*--- ast_print_group: Print call group and pickup group ---*/
+/*! \brief Print call group and pickup group ---*/
char *ast_print_group(char *buf, int buflen, ast_group_t group)
{
unsigned int i;
Modified: team/oej/multiparking/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/oej/multiparking/channels/chan_iax2.c?rev=7711&r1=7710&r2=7711&view=diff
==============================================================================
--- team/oej/multiparking/channels/chan_iax2.c (original)
+++ team/oej/multiparking/channels/chan_iax2.c Mon Jan 2 03:16:17 2006
@@ -2602,7 +2602,7 @@
break;
}
} else if (!strcasecmp(tmp->name, "regseconds")) {
- if (sscanf(tmp->value, "%i", (int *)®seconds) != 1)
+ if (sscanf(tmp->value, "%ld", (time_t *)®seconds) != 1)
regseconds = 0;
} else if (!strcasecmp(tmp->name, "ipaddr")) {
inet_aton(tmp->value, &(peer->addr.sin_addr));
Modified: team/oej/multiparking/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/multiparking/channels/chan_sip.c?rev=7711&r1=7710&r2=7711&view=diff
==============================================================================
--- team/oej/multiparking/channels/chan_sip.c (original)
+++ team/oej/multiparking/channels/chan_sip.c Mon Jan 2 03:16:17 2006
@@ -12048,7 +12048,7 @@
}
if (realtime && !strcasecmp(v->name, "regseconds")) {
- if (sscanf(v->value, "%i", (int *)®seconds) != 1)
+ if (sscanf(v->value, "%ld", (time_t *)®seconds) != 1)
regseconds = 0;
} else if (realtime && !strcasecmp(v->name, "ipaddr") && !ast_strlen_zero(v->value) ) {
inet_aton(v->value, &(peer->addr.sin_addr));
Modified: team/oej/multiparking/include/asterisk/callerid.h
URL: http://svn.digium.com/view/asterisk/team/oej/multiparking/include/asterisk/callerid.h?rev=7711&r1=7710&r2=7711&view=diff
==============================================================================
--- team/oej/multiparking/include/asterisk/callerid.h (original)
+++ team/oej/multiparking/include/asterisk/callerid.h Mon Jan 2 03:16:17 2006
@@ -286,7 +286,6 @@
The following values are available to use:
\arg \b Defined value, text string in config file, explanation
- .
\arg \b AST_PRES_ALLOWED_USER_NUMBER_NOT_SCREENED, "allowed_not_screened", Presentation Allowed, Not Screened,
\arg \b AST_PRES_ALLOWED_USER_NUMBER_PASSED_SCREEN, "allowed_passed_screen", Presentation Allowed, Passed Screen,
Modified: team/oej/multiparking/include/asterisk/channel.h
URL: http://svn.digium.com/view/asterisk/team/oej/multiparking/include/asterisk/channel.h?rev=7711&r1=7710&r2=7711&view=diff
==============================================================================
--- team/oej/multiparking/include/asterisk/channel.h (original)
+++ team/oej/multiparking/include/asterisk/channel.h Mon Jan 2 03:16:17 2006
@@ -47,8 +47,8 @@
-# The dial plan forces Asterisk to create an outbound
call somewhere with the dial (see \ref app_dial.c)
application
-
.
+
\par Bridging channels
If Asterisk dials out this happens:
-# Dial creates an outbound PBX channel and asks one of the
Modified: team/oej/multiparking/include/asterisk/doxyref.h
URL: http://svn.digium.com/view/asterisk/team/oej/multiparking/include/asterisk/doxyref.h?rev=7711&r1=7710&r2=7711&view=diff
==============================================================================
--- team/oej/multiparking/include/asterisk/doxyref.h (original)
+++ team/oej/multiparking/include/asterisk/doxyref.h Mon Jan 2 03:16:17 2006
@@ -64,8 +64,7 @@
* \subsection model_txt Generic Model
* \verbinclude model.txt
* \subsection channel_txt Channels
- * \arg See \link Def_Channel
- * \verbinclude channel.txt
+ * \arg See \ref Def_Channel
*/
/*! \page AstDebug Debugging
@@ -126,7 +125,7 @@
* \section enumreadme ENUM
* \arg Configuration: \ref Config_enum
* \arg \ref enum.c
- * \arg \ref app_enumlookup.c
+ * \arg \ref func_enum.c
*
* \verbinclude README.enum
*/
Modified: team/oej/multiparking/include/asterisk/options.h
URL: http://svn.digium.com/view/asterisk/team/oej/multiparking/include/asterisk/options.h?rev=7711&r1=7710&r2=7711&view=diff
==============================================================================
--- team/oej/multiparking/include/asterisk/options.h (original)
+++ team/oej/multiparking/include/asterisk/options.h Mon Jan 2 03:16:17 2006
@@ -30,6 +30,7 @@
#define AST_CACHE_DIR_LEN 512
#define AST_FILENAME_MAX 80
+/*! \ingroup main_options */
enum ast_option_flags {
/*! Allow \#exec in config files */
AST_OPT_FLAG_EXEC_INCLUDES = (1 << 0),
Modified: team/oej/multiparking/pbx.c
URL: http://svn.digium.com/view/asterisk/team/oej/multiparking/pbx.c?rev=7711&r1=7710&r2=7711&view=diff
==============================================================================
--- team/oej/multiparking/pbx.c (original)
+++ team/oej/multiparking/pbx.c Mon Jan 2 03:16:17 2006
@@ -1207,13 +1207,10 @@
return NULL;
}
- for (acf = acf_root; acf; acf = acf->next) {
- if (!strncasecmp(word, acf->name, wordlen)) {
- if (++which > state) {
- ret = strdup(acf->name);
- break;
- }
- }
+ /* case-insensitive for convenience in this 'complete' function */
+ for (acf = acf_root; acf && !ret; acf = acf->next) {
+ if (!strncasecmp(word, acf->name, wordlen) && ++which > state)
+ ret = strdup(acf->name);
}
ast_mutex_unlock(&acflock);
@@ -1232,9 +1229,8 @@
}
for (acfptr = acf_root; acfptr; acfptr = acfptr->next) {
- if (!strcmp(name, acfptr->name)) {
+ if (!strcmp(name, acfptr->name))
break;
- }
}
ast_mutex_unlock(&acflock);
@@ -2970,16 +2966,10 @@
return NULL;
}
- /* ... walk all applications ... */
- for (a = apps; a; a = a->next) {
- /* ... check if word matches this application ... */
- if (!strncasecmp(word, a->name, wordlen)) {
- /* ... if this is right app serve it ... */
- if (++which > state) {
- ret = strdup(a->name);
- break;
- }
- }
+ /* return the n-th [partial] matching entry */
+ for (a = apps; a && !ret; a = a->next) {
+ if (!strncasecmp(word, a->name, wordlen) && ++which > state)
+ ret = strdup(a->name);
}
ast_mutex_unlock(&applock);
@@ -5701,22 +5691,17 @@
const char *pbx_builtin_getvar_helper(struct ast_channel *chan, const char *name)
{
struct ast_var_t *variables;
- struct varshead *headp;
-
+ int i;
+ struct varshead *places[2] = { NULL, &globals };
+
+ if (!name)
+ return NULL;
if (chan)
- headp=&chan->varshead;
- else
- headp=&globals;
-
- if (name) {
- AST_LIST_TRAVERSE(headp,variables,entries) {
- if (!strcmp(name, ast_var_name(variables)))
- return ast_var_value(variables);
- }
- if (headp != &globals) {
- /* Check global variables if we haven't already */
- headp = &globals;
- AST_LIST_TRAVERSE(headp,variables,entries) {
+ places[0] = &chan->varshead;
+
+ for (i = 0; i < 2; i++) {
+ if (places[i]) {
+ AST_LIST_TRAVERSE(places[i], variables, entries) {
if (!strcmp(name, ast_var_name(variables)))
return ast_var_value(variables);
}
Modified: team/oej/multiparking/say.c
URL: http://svn.digium.com/view/asterisk/team/oej/multiparking/say.c?rev=7711&r1=7710&r2=7711&view=diff
==============================================================================
--- team/oej/multiparking/say.c (original)
+++ team/oej/multiparking/say.c Mon Jan 2 03:16:17 2006
@@ -281,7 +281,7 @@
/* Forward declarations */
/*! \page Def_syntaxlang Asterisk Language Syntaxes supported
- \not Not really language codes.
+ \note Not really language codes.
For these language codes, Asterisk will change the syntax when
saying numbers (and in some cases dates and voicemail messages
as well)
More information about the asterisk-commits
mailing list