[asterisk-commits] phsultan: branch phsultan/res_jabber-openssl r73099 - in /team/phsultan/res_j...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Jul 3 09:13:49 CDT 2007
Author: phsultan
Date: Tue Jul 3 09:13:48 2007
New Revision: 73099
URL: http://svn.digium.com/view/asterisk?view=rev&rev=73099
Log:
Merged revisions 72982,72986-72987,73003,73006,73054 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r72982 | russell | 2007-07-03 00:27:46 +0200 (Tue, 03 Jul 2007) | 7 lines
* Move LaTeX docs into a tex/ subdirectory of the doc/ dir
* Add a Makefile in doc/tex/ for generating PDF and HTML
* Add a README.txt file to doc/tex/ to document which tools are used and what
web sites to visit for getting them.
* Update build_tools/prep_tarball to put the proper Asterisk version string
in the automatically generated PDF for release tarballs
................
r72986 | russell | 2007-07-03 01:02:16 +0200 (Tue, 03 Jul 2007) | 6 lines
After some discussion on the asterisk-dev list, we determined that this approach
for extracting application, function, manager, and agi documentation is the wrong
one to take. The most severe problem is that the output depends on which modules
are loaded as well as compile time options, which both determine which parts are
available.
................
r72987 | qwell | 2007-07-03 04:51:08 +0200 (Tue, 03 Jul 2007) | 4 lines
Correct an issue where the wrong type was being used to start sasl.
Pointed out by and patch provided by mog.
................
r73003 | tilghman | 2007-07-03 07:21:02 +0200 (Tue, 03 Jul 2007) | 2 lines
Typo (closes issue 10105)
................
r73006 | crichter | 2007-07-03 10:22:13 +0200 (Tue, 03 Jul 2007) | 17 lines
Merged revisions 73005 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r73005 | crichter | 2007-07-03 10:17:06 +0200 (Di, 03 Jul 2007) | 9 lines
Merged revisions 73004 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r73004 | crichter | 2007-07-03 10:04:35 +0200 (Di, 03 Jul 2007) | 1 line
fixed issue, that misdn_l2l1_check could only be called from mISDN Source channels.. #9449
........
................
................
r73054 | tilghman | 2007-07-03 14:40:26 +0200 (Tue, 03 Jul 2007) | 18 lines
Merged revisions 73053 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r73053 | tilghman | 2007-07-03 07:38:53 -0500 (Tue, 03 Jul 2007) | 10 lines
Merged revisions 73052 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r73052 | tilghman | 2007-07-03 07:34:14 -0500 (Tue, 03 Jul 2007) | 2 lines
RetryDial should accept a 0 argument, but it does not, because atoi does not distinguish between 0 and error (closes issue #10106)
........
................
................
Added:
team/phsultan/res_jabber-openssl/doc/tex/
- copied from r73054, trunk/doc/tex/
team/phsultan/res_jabber-openssl/doc/tex/Makefile
- copied unchanged from r73054, trunk/doc/tex/Makefile
team/phsultan/res_jabber-openssl/doc/tex/README.txt
- copied unchanged from r73054, trunk/doc/tex/README.txt
team/phsultan/res_jabber-openssl/doc/tex/ael.tex
- copied unchanged from r73054, trunk/doc/tex/ael.tex
team/phsultan/res_jabber-openssl/doc/tex/ajam.tex
- copied unchanged from r73054, trunk/doc/tex/ajam.tex
team/phsultan/res_jabber-openssl/doc/tex/app-sms.tex
- copied unchanged from r73054, trunk/doc/tex/app-sms.tex
team/phsultan/res_jabber-openssl/doc/tex/asterisk-conf.tex
- copied unchanged from r73054, trunk/doc/tex/asterisk-conf.tex
team/phsultan/res_jabber-openssl/doc/tex/asterisk.tex
- copied unchanged from r73054, trunk/doc/tex/asterisk.tex
team/phsultan/res_jabber-openssl/doc/tex/billing.tex
- copied unchanged from r73054, trunk/doc/tex/billing.tex
team/phsultan/res_jabber-openssl/doc/tex/cdrdriver.tex
- copied unchanged from r73054, trunk/doc/tex/cdrdriver.tex
team/phsultan/res_jabber-openssl/doc/tex/chaniax.tex
- copied unchanged from r73054, trunk/doc/tex/chaniax.tex
team/phsultan/res_jabber-openssl/doc/tex/channelvariables.tex
- copied unchanged from r73054, trunk/doc/tex/channelvariables.tex
team/phsultan/res_jabber-openssl/doc/tex/cliprompt.tex
- copied unchanged from r73054, trunk/doc/tex/cliprompt.tex
team/phsultan/res_jabber-openssl/doc/tex/configuration.tex
- copied unchanged from r73054, trunk/doc/tex/configuration.tex
team/phsultan/res_jabber-openssl/doc/tex/dundi.tex
- copied unchanged from r73054, trunk/doc/tex/dundi.tex
team/phsultan/res_jabber-openssl/doc/tex/enum.tex
- copied unchanged from r73054, trunk/doc/tex/enum.tex
team/phsultan/res_jabber-openssl/doc/tex/extensions.tex
- copied unchanged from r73054, trunk/doc/tex/extensions.tex
team/phsultan/res_jabber-openssl/doc/tex/freetds.tex
- copied unchanged from r73054, trunk/doc/tex/freetds.tex
team/phsultan/res_jabber-openssl/doc/tex/hardware.tex
- copied unchanged from r73054, trunk/doc/tex/hardware.tex
team/phsultan/res_jabber-openssl/doc/tex/ices.tex
- copied unchanged from r73054, trunk/doc/tex/ices.tex
team/phsultan/res_jabber-openssl/doc/tex/imapstorage.tex
- copied unchanged from r73054, trunk/doc/tex/imapstorage.tex
team/phsultan/res_jabber-openssl/doc/tex/jitterbuffer.tex
- copied unchanged from r73054, trunk/doc/tex/jitterbuffer.tex
team/phsultan/res_jabber-openssl/doc/tex/localchannel.tex
- copied unchanged from r73054, trunk/doc/tex/localchannel.tex
team/phsultan/res_jabber-openssl/doc/tex/manager.tex
- copied unchanged from r73054, trunk/doc/tex/manager.tex
team/phsultan/res_jabber-openssl/doc/tex/misdn.tex
- copied unchanged from r73054, trunk/doc/tex/misdn.tex
team/phsultan/res_jabber-openssl/doc/tex/mp3.tex
- copied unchanged from r73054, trunk/doc/tex/mp3.tex
team/phsultan/res_jabber-openssl/doc/tex/odbcstorage.tex
- copied unchanged from r73054, trunk/doc/tex/odbcstorage.tex
team/phsultan/res_jabber-openssl/doc/tex/privacy.tex
- copied unchanged from r73054, trunk/doc/tex/privacy.tex
team/phsultan/res_jabber-openssl/doc/tex/qos.tex
- copied unchanged from r73054, trunk/doc/tex/qos.tex
team/phsultan/res_jabber-openssl/doc/tex/queuelog.tex
- copied unchanged from r73054, trunk/doc/tex/queuelog.tex
team/phsultan/res_jabber-openssl/doc/tex/queues-with-callback-members.tex
- copied unchanged from r73054, trunk/doc/tex/queues-with-callback-members.tex
team/phsultan/res_jabber-openssl/doc/tex/realtime.tex
- copied unchanged from r73054, trunk/doc/tex/realtime.tex
team/phsultan/res_jabber-openssl/doc/tex/security.tex
- copied unchanged from r73054, trunk/doc/tex/security.tex
team/phsultan/res_jabber-openssl/doc/tex/sla.tex
- copied unchanged from r73054, trunk/doc/tex/sla.tex
Removed:
team/phsultan/res_jabber-openssl/doc/ael.tex
team/phsultan/res_jabber-openssl/doc/ajam.tex
team/phsultan/res_jabber-openssl/doc/app-sms.tex
team/phsultan/res_jabber-openssl/doc/ast_agi_commands.tex
team/phsultan/res_jabber-openssl/doc/ast_appdocs.tex
team/phsultan/res_jabber-openssl/doc/ast_cli_commands.tex
team/phsultan/res_jabber-openssl/doc/ast_funcdocs.tex
team/phsultan/res_jabber-openssl/doc/ast_manager_actiondocs.tex
team/phsultan/res_jabber-openssl/doc/asterisk-conf.tex
team/phsultan/res_jabber-openssl/doc/asterisk.tex
team/phsultan/res_jabber-openssl/doc/billing.tex
team/phsultan/res_jabber-openssl/doc/cdrdriver.tex
team/phsultan/res_jabber-openssl/doc/chaniax.tex
team/phsultan/res_jabber-openssl/doc/channelvariables.tex
team/phsultan/res_jabber-openssl/doc/cliprompt.tex
team/phsultan/res_jabber-openssl/doc/configuration.tex
team/phsultan/res_jabber-openssl/doc/dundi.tex
team/phsultan/res_jabber-openssl/doc/enum.tex
team/phsultan/res_jabber-openssl/doc/extensions.tex
team/phsultan/res_jabber-openssl/doc/freetds.tex
team/phsultan/res_jabber-openssl/doc/hardware.tex
team/phsultan/res_jabber-openssl/doc/ices.tex
team/phsultan/res_jabber-openssl/doc/imapstorage.tex
team/phsultan/res_jabber-openssl/doc/jitterbuffer.tex
team/phsultan/res_jabber-openssl/doc/localchannel.tex
team/phsultan/res_jabber-openssl/doc/manager.tex
team/phsultan/res_jabber-openssl/doc/misdn.tex
team/phsultan/res_jabber-openssl/doc/mp3.tex
team/phsultan/res_jabber-openssl/doc/odbcstorage.tex
team/phsultan/res_jabber-openssl/doc/privacy.tex
team/phsultan/res_jabber-openssl/doc/qos.tex
team/phsultan/res_jabber-openssl/doc/queuelog.tex
team/phsultan/res_jabber-openssl/doc/queues-with-callback-members.tex
team/phsultan/res_jabber-openssl/doc/realtime.tex
team/phsultan/res_jabber-openssl/doc/security.tex
team/phsultan/res_jabber-openssl/doc/sla.tex
Modified:
team/phsultan/res_jabber-openssl/ (props changed)
team/phsultan/res_jabber-openssl/Makefile
team/phsultan/res_jabber-openssl/apps/app_dial.c
team/phsultan/res_jabber-openssl/apps/app_voicemail.c
team/phsultan/res_jabber-openssl/build_tools/prep_tarball
team/phsultan/res_jabber-openssl/channels/chan_misdn.c
team/phsultan/res_jabber-openssl/main/cli.c
team/phsultan/res_jabber-openssl/main/manager.c
team/phsultan/res_jabber-openssl/main/pbx.c
team/phsultan/res_jabber-openssl/res/res_agi.c
Propchange: team/phsultan/res_jabber-openssl/
('branch-1.2-merged' removed)
Propchange: team/phsultan/res_jabber-openssl/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Propchange: team/phsultan/res_jabber-openssl/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Jul 3 09:13:48 2007
@@ -1,1 +1,1 @@
-/trunk:1-72977
+/trunk:1-73098
Modified: team/phsultan/res_jabber-openssl/Makefile
URL: http://svn.digium.com/view/asterisk/team/phsultan/res_jabber-openssl/Makefile?view=diff&rev=73099&r1=73098&r2=73099
==============================================================================
--- team/phsultan/res_jabber-openssl/Makefile (original)
+++ team/phsultan/res_jabber-openssl/Makefile Tue Jul 3 09:13:48 2007
@@ -699,22 +699,4 @@
asterisk.pdf: doc/asterisk.pdf
-doc/asterisk.pdf: $(wildcard doc/*.tex)
-ifeq ($(findstring rubber,$(RUBBER)),)
- @echo "**********************************************"
- @echo "** You must install the \"rubber\" tool ***"
- @echo "** to generate the Asterisk reference PDF. ***"
- @echo "**********************************************"
-else
- @echo "**********************************************"
- @echo "** The Asterisk reference PDF will now be ***"
- @echo "** generated. When complete, it will be ***"
- @echo "** located at doc/asterisk.pdf. ***"
- @echo "**********************************************"
- @cp doc/asterisk.tex doc/asterisk.tex.orig
- @sed -i -e 's/ASTERISKVERSION/$(ASTERISKVERSION)/' doc/asterisk.tex
- @cd doc && $(RUBBER) --pdf asterisk.tex
- @mv doc/asterisk.tex.orig doc/asterisk.tex
-endif
-
.PHONY: menuselect main sounds clean dist-clean distclean all prereqs cleantest uninstall _uninstall uninstall-all dont-optimize $(SUBDIRS_INSTALL) $(SUBDIRS_CLEAN) $(SUBDIRS_UNINSTALL) $(SUBDIRS) $(MOD_SUBDIRS_EMBED_LDSCRIPT) $(MOD_SUBDIRS_EMBED_LDFLAGS) $(MOD_SUBDIRS_EMBED_LIBS) menuselect.makeopts
Modified: team/phsultan/res_jabber-openssl/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/phsultan/res_jabber-openssl/apps/app_dial.c?view=diff&rev=73099&r1=73098&r2=73099
==============================================================================
--- team/phsultan/res_jabber-openssl/apps/app_dial.c (original)
+++ team/phsultan/res_jabber-openssl/apps/app_dial.c Tue Jul 3 09:13:48 2007
@@ -1846,7 +1846,7 @@
if ((dialdata = strchr(announce, '|'))) {
*dialdata++ = '\0';
- if ((sleep = atoi(dialdata))) {
+ if (sscanf(dialdata, "%d", &sleep) == 1) {
sleep *= 1000;
} else {
ast_log(LOG_ERROR, "%s requires the numerical argument <sleep>\n",rapp);
@@ -1854,7 +1854,7 @@
}
if ((dialdata = strchr(dialdata, '|'))) {
*dialdata++ = '\0';
- if (!(loops = atoi(dialdata))) {
+ if (sscanf(dialdata, "%d", &loops) != 1) {
ast_log(LOG_ERROR, "%s requires the numerical argument <loops>\n",rapp);
goto done;
}
Modified: team/phsultan/res_jabber-openssl/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/phsultan/res_jabber-openssl/apps/app_voicemail.c?view=diff&rev=73099&r1=73098&r2=73099
==============================================================================
--- team/phsultan/res_jabber-openssl/apps/app_voicemail.c (original)
+++ team/phsultan/res_jabber-openssl/apps/app_voicemail.c Tue Jul 3 09:13:48 2007
@@ -8635,7 +8635,7 @@
make_file(vms->fn2, sizeof(vms->fn2), vms->curdir, vms->curmsg);
snprintf(filename,sizeof(filename), "%s.txt", vms->fn2);
- RETRIEVE(vms->curdir, vms->curms, vmu->mailbox, vmu->context);
+ RETRIEVE(vms->curdir, vms->curmsg, vmu->mailbox, vmu->context);
msg_cfg = ast_config_load(filename);
DISPOSE(vms->curdir, vms->curmsg);
if (!msg_cfg) {
Modified: team/phsultan/res_jabber-openssl/build_tools/prep_tarball
URL: http://svn.digium.com/view/asterisk/team/phsultan/res_jabber-openssl/build_tools/prep_tarball?view=diff&rev=73099&r1=73098&r2=73099
==============================================================================
--- team/phsultan/res_jabber-openssl/build_tools/prep_tarball (original)
+++ team/phsultan/res_jabber-openssl/build_tools/prep_tarball Tue Jul 3 09:13:48 2007
@@ -9,4 +9,6 @@
make menuselect-tree
-cd doc && rubber --pdf asterisk.tex
+VERSION=`cat .version`
+sed -i -e "s/ASTERISKVERSION/${VERSION}/" doc/tex/asterisk.tex
+cd doc/tex && rubber --pdf asterisk.tex
Modified: team/phsultan/res_jabber-openssl/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/team/phsultan/res_jabber-openssl/channels/chan_misdn.c?view=diff&rev=73099&r1=73098&r2=73099
==============================================================================
--- team/phsultan/res_jabber-openssl/channels/chan_misdn.c (original)
+++ team/phsultan/res_jabber-openssl/channels/chan_misdn.c Tue Jul 3 09:13:48 2007
@@ -4942,11 +4942,6 @@
AST_APP_ARG(timeout);
);
- if (strcasecmp(chan->tech->type, "mISDN")) {
- ast_log(LOG_WARNING, "misdn_check_l2l1 makes only sense with chan_misdn channels!\n");
- return -1;
- }
-
if (ast_strlen_zero((char *)data)) {
ast_log(LOG_WARNING, "misdn_check_l2l1 Requires arguments\n");
return -1;
Modified: team/phsultan/res_jabber-openssl/main/cli.c
URL: http://svn.digium.com/view/asterisk/team/phsultan/res_jabber-openssl/main/cli.c?view=diff&rev=73099&r1=73098&r2=73099
==============================================================================
--- team/phsultan/res_jabber-openssl/main/cli.c (original)
+++ team/phsultan/res_jabber-openssl/main/cli.c Tue Jul 3 09:13:48 2007
@@ -972,10 +972,6 @@
static char *handle_help(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a);
-#ifdef AST_DEVMODE
-static char *handle_core_dump_clidocs(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a);
-#endif
-
static struct ast_cli_entry cli_cli[] = {
/* Deprecated, but preferred command is now consolidated (and already has a deprecated command for it). */
NEW_CLI(handle_nodebugchan_deprecated, "Disable debugging on channel(s)"),
@@ -1014,10 +1010,6 @@
{ { "soft", "hangup", NULL },
handle_softhangup, "Request a hangup on a given channel",
softhangup_help, complete_ch_3 },
-
-#ifdef AST_DEVMODE
- NEW_CLI(handle_core_dump_clidocs, "Dump CLI command documentation in LaTeX format"),
-#endif
};
/*!
@@ -1457,65 +1449,6 @@
AST_LIST_UNLOCK(&helpers);
return RESULT_SUCCESS;
}
-
-#ifdef AST_DEVMODE
-static char *handle_core_dump_clidocs(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
-{
- struct ast_cli_entry *cli;
- FILE *f;
- const char *fn = "/tmp/ast_cli_commands.tex";
- struct cli_iterator i = { NULL, NULL};
-
- switch (cmd) {
- case CLI_INIT:
- e->command = "core dump clidocs";
- e->usage =
- "Usage: core dump clidocs\n"
- " Dump CLI command documentation to /tmp/ast_cli_commands.tex.\n";
- return NULL;
- case CLI_GENERATE:
- return NULL;
- }
-
- if (a->argc != e->args)
- return CLI_SHOWUSAGE;
-
- if (!(f = fopen(fn, "w+"))) {
- ast_cli(a->fd, "Unable to open %s for writing!\n", fn);
- return CLI_FAILURE;
- }
-
- fprintf(f, "%% This file is automatically generated by the \"core dump clidocs\" CLI command. Any manual edits will be lost.\n");
-
- AST_LIST_LOCK(&helpers);
- while ((cli = cli_next(&i))) {
- /* Hide commands that start with '_' */
- if (cli->_full_cmd[0] == '_')
- continue;
- /* Hide commands that are marked as deprecated. */
- if (cli->deprecated)
- continue;
-
- fprintf(f, "\\section{%s}\n"
- "\\subsection{Summary}\n"
- "\\begin{verbatim}\n"
- "%s\n"
- "\\end{verbatim}\n"
- "\\subsection{Usage}\n"
- "\\begin{verbatim}\n"
- "%s\n"
- "\\end{verbatim}\n\n\n",
- cli->_full_cmd, cli->summary, cli->usage);
- }
- AST_LIST_UNLOCK(&helpers);
-
- fclose(f);
-
- ast_cli(a->fd, "Documentation has been dumped to %s\n", fn);
-
- return CLI_SUCCESS;
-}
-#endif /* AST_DEVMODE */
static char *parse_args(const char *s, int *argc, char *argv[], int max, int *trailingwhitespace)
{
Modified: team/phsultan/res_jabber-openssl/main/manager.c
URL: http://svn.digium.com/view/asterisk/team/phsultan/res_jabber-openssl/main/manager.c?view=diff&rev=73099&r1=73098&r2=73099
==============================================================================
--- team/phsultan/res_jabber-openssl/main/manager.c (original)
+++ team/phsultan/res_jabber-openssl/main/manager.c Tue Jul 3 09:13:48 2007
@@ -491,73 +491,6 @@
return ret;
}
-#ifdef AST_DEVMODE
-static char *handle_manager_dump_actiondocs(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
-{
- struct manager_action *action;
- FILE *f;
- char *action_name = NULL;
- const char *fn = "/tmp/ast_manager_actiondocs.tex";
- struct ast_str *authority = ast_str_alloca(80);
-
- switch (cmd) {
- case CLI_INIT:
- e->command = "manager dump actiondocs";
- e->usage =
- "Usage: manager dump actiondocs [action]\n"
- " Dump manager action documentation to /tmp/ast_manager_actiondocs.tex.\n";
- return NULL;
- case CLI_GENERATE:
- return NULL;
- }
-
- if (a->argc == e->args + 1)
- action_name = a->argv[e->args];
- else if (a->argc != e->args)
- return CLI_SHOWUSAGE;
-
- if (!(f = fopen(fn, "w+"))) {
- ast_cli(a->fd, "Unable to open %s for writing!\n", fn);
- return CLI_FAILURE;
- }
-
- fprintf(f, "%% This file is automatically generated by the \"manager dump actiondocs\" CLI command. Any manual edits will be lost.\n");
-
- ast_rwlock_rdlock(&actionlock);
- for (action = first_action; action; action = action->next) {
- if (action_name && strcasecmp(action->action, action_name))
- continue;
-
- fprintf(f, "\\section{%s}\n"
- "\\subsection{Synopsis}\n"
- "\\begin{verbatim}\n"
- "%s\n"
- "\\end{verbatim}\n"
- "\\subsection{Authority}\n"
- "\\begin{verbatim}\n"
- "%s\n"
- "\\end{verbatim}\n"
- "\\subsection{Description}\n"
- "\\begin{verbatim}\n"
- "%s\n"
- "\\end{verbatim}\n\n\n",
- action->action, action->synopsis,
- authority_to_str(action->authority, &authority),
- action->description);
-
- if (action_name)
- break;
- }
- ast_rwlock_unlock(&actionlock);
-
- fclose(f);
-
- ast_cli(a->fd, "Documentation has been dumped to %s\n", fn);
-
- return CLI_SUCCESS;
-}
-#endif /* AST_DEVMODE */
-
static int handle_showmancmd(int fd, int argc, char *argv[])
{
struct manager_action *cur;
@@ -775,10 +708,6 @@
{ { "manager", "debug", NULL },
handle_mandebug, "Show, enable, disable debugging of the manager code",
"Usage: manager debug [on|off]\n Show, enable, disable debugging of the manager code.\n", NULL, NULL },
-
-#ifdef AST_DEVMODE
- NEW_CLI(handle_manager_dump_actiondocs, "Dump manager action documentation in LaTeX format"),
-#endif
};
/*
Modified: team/phsultan/res_jabber-openssl/main/pbx.c
URL: http://svn.digium.com/view/asterisk/team/phsultan/res_jabber-openssl/main/pbx.c?view=diff&rev=73099&r1=73098&r2=73099
==============================================================================
--- team/phsultan/res_jabber-openssl/main/pbx.c (original)
+++ team/phsultan/res_jabber-openssl/main/pbx.c Tue Jul 3 09:13:48 2007
@@ -3153,144 +3153,6 @@
return RESULT_SUCCESS;
}
-#ifdef AST_DEVMODE
-static char *handle_core_dump_appdocs(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
-{
- struct ast_app *app;
- FILE *f;
- char *appname = NULL;
- const char *fn = "/tmp/ast_appdocs.tex";
-
- switch (cmd) {
- case CLI_INIT:
- e->command = "core dump appdocs";
- e->usage =
- "Usage: core dump appdocs [application]\n"
- " Dump Application documentation to /tmp/ast_appdocs.tex.\n";
- return NULL;
- case CLI_GENERATE:
- return NULL;
- }
-
- if (a->argc == e->args + 1)
- appname = a->argv[e->args];
- else if (a->argc != e->args)
- return CLI_SHOWUSAGE;
-
- if (!(f = fopen(fn, "w+"))) {
- ast_cli(a->fd, "Unable to open %s for writing!\n", fn);
- return CLI_FAILURE;
- }
-
- fprintf(f, "%% This file is automatically generated by the \"core dump appdocs\" CLI command. Any manual edits will be lost.\n");
-
- AST_RWLIST_RDLOCK(&apps);
- AST_RWLIST_TRAVERSE(&apps, app, list) {
- if (appname && strcasecmp(app->name, appname))
- continue;
-
- fprintf(f, "\\section{%s}\n"
- "\\subsection{Synopsis}\n"
- "\\begin{verbatim}\n"
- "%s\n"
- "\\end{verbatim}\n"
- "\\subsection{Description}\n"
- "\\begin{verbatim}\n"
- "%s\n"
- "\\end{verbatim}\n\n\n", app->name, app->synopsis, app->description);
-
- if (appname)
- break;
- }
- AST_RWLIST_UNLOCK(&apps);
-
- fclose(f);
-
- ast_cli(a->fd, "Documentation has been dumped to %s\n", fn);
-
- return CLI_SUCCESS;
-}
-
-static void funcdocs_write_section(FILE *f, const char *name)
-{
- char *section, *cur;
-
- cur = section = alloca(strlen(name) * 2 + 1);
-
- for (; *name; name++) {
- if (*name == '_')
- *cur++ = '\\';
- *cur++ = *name;
- }
- *cur = '\0';
-
- fprintf(f, "\\section{%s}\n", section);
-}
-
-static char *handle_core_dump_funcdocs(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
-{
- struct ast_custom_function *acf;
- FILE *f;
- char *funcname = NULL;
- const char *fn = "/tmp/ast_funcdocs.tex";
-
- switch (cmd) {
- case CLI_INIT:
- e->command = "core dump funcdocs";
- e->usage =
- "Usage: core dump funcdocs [function]\n"
- " Dump Application documentation to /tmp/ast_funcdocs.tex.\n";
- return NULL;
- case CLI_GENERATE:
- return NULL;
- }
-
- if (a->argc == e->args + 1)
- funcname = a->argv[e->args];
- else if (a->argc != e->args)
- return CLI_SHOWUSAGE;
-
- if (!(f = fopen(fn, "w+"))) {
- ast_cli(a->fd, "Unable to open %s for writing!\n", fn);
- return CLI_FAILURE;
- }
-
- fprintf(f, "%% This file is automatically generated by the \"core dump funcdocs\" CLI command. Any manual edits will be lost.\n");
-
- AST_RWLIST_RDLOCK(&acf_root);
- AST_RWLIST_TRAVERSE(&acf_root, acf, acflist) {
- if (funcname && strcasecmp(acf->name, funcname))
- continue;
-
- funcdocs_write_section(f, acf->name);
-
- fprintf(f, "\\subsection{Syntax}\n"
- "\\begin{verbatim}\n"
- "%s\n"
- "\\end{verbatim}\n"
- "\\subsection{Synopsis}\n"
- "\\begin{verbatim}\n"
- "%s\n"
- "\\end{verbatim}\n"
- "\\subsection{Description}\n"
- "\\begin{verbatim}\n"
- "%s\n"
- "\\end{verbatim}\n\n\n",
- acf->syntax, acf->synopsis, acf->desc);
-
- if (funcname)
- break;
- }
- AST_RWLIST_UNLOCK(&acf_root);
-
- fclose(f);
-
- ast_cli(a->fd, "Documentation has been dumped to %s\n", fn);
-
- return CLI_SUCCESS;
-}
-#endif
-
/*! \brief handle_show_hints: CLI support for listing registered dial plan hints */
static int handle_show_hints(int fd, int argc, char *argv[])
{
@@ -3956,11 +3818,6 @@
{ { "core", "show", "application", NULL },
handle_show_application, "Describe a specific dialplan application",
show_application_help, complete_show_application },
-
-#ifdef AST_DEVMODE
- NEW_CLI(handle_core_dump_appdocs, "Dump application documentation in LaTeX format"),
- NEW_CLI(handle_core_dump_funcdocs, "Dump function documentation in LaTeX format"),
-#endif
{ { "core", "set", "global", NULL },
handle_set_global, "Set global dialplan variable",
Modified: team/phsultan/res_jabber-openssl/res/res_agi.c
URL: http://svn.digium.com/view/asterisk/team/phsultan/res_jabber-openssl/res/res_agi.c?view=diff&rev=73099&r1=73098&r2=73099
==============================================================================
--- team/phsultan/res_jabber-openssl/res/res_agi.c (original)
+++ team/phsultan/res_jabber-openssl/res/res_agi.c Tue Jul 3 09:13:48 2007
@@ -1673,74 +1673,6 @@
return 0;
}
-#ifdef AST_DEVMODE
-static char *handle_agi_dump_commanddocs(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
-{
- FILE *f;
- char *command_name = NULL;
- const char *fn = "/tmp/ast_agi_commands.tex";
- int i;
-
- switch (cmd) {
- case CLI_INIT:
- e->command = "agi dump commanddocs";
- e->usage =
- "Usage: agi dump commanddocs [command]\n"
- " Dump manager action documentation to /tmp/ast_agi_commands.tex.\n";
- return NULL;
- case CLI_GENERATE:
- return NULL;
- }
-
- if (a->argc == e->args + 1)
- command_name = a->argv[e->args];
- else if (a->argc != e->args)
- return CLI_SHOWUSAGE;
-
- if (!(f = fopen(fn, "w+"))) {
- ast_cli(a->fd, "Unable to open %s for writing!\n", fn);
- return CLI_FAILURE;
- }
-
- fprintf(f, "%% This file is automatically generated by the \"manager dump actiondocs\" CLI command. Any manual edits will be lost.\n");
-
- /* XXX Not thread safe :( */
- for (i = 0; i < ARRAY_LEN(commands); i++) {
- struct agi_command *command;
- char fullcmd[80];
-
- command = &commands[i];
- if (!command->cmda[0])
- break;
-
- ast_join(fullcmd, sizeof(fullcmd), command->cmda);
-
- if (command_name && strcasecmp(fullcmd, command_name))
- continue;
-
- fprintf(f, "\\section{%s}\n"
- "\\subsection{Summary}\n"
- "\\begin{verbatim}\n"
- "%s\n"
- "\\end{verbatim}\n"
- "\\subsection{Usage}\n"
- "\\begin{verbatim}\n"
- "%s\n"
- "\\end{verbatim}\n\n\n",
- fullcmd, command->summary, command->usage);
-
- if (command_name)
- break;
- }
-
- fclose(f);
-
- ast_cli(a->fd, "Documentation has been dumped to %s\n", fn);
-
- return CLI_SUCCESS;
-}
-#endif /* AST_DEVMODE */
-
int ast_agi_register(agi_command *agi)
{
int x;
@@ -2232,10 +2164,6 @@
{ { "agi", "dumphtml", NULL },
handle_agidumphtml, "Dumps a list of agi commands in html format",
dumpagihtml_help },
-
-#ifdef AST_DEVMODE
- NEW_CLI(handle_agi_dump_commanddocs, "Dump agi command documentation in LaTeX format"),
-#endif
};
static int unload_module(void)
More information about the asterisk-commits
mailing list