[asterisk-commits] trunk r25929 - in /trunk: apps/ build_tools/ channels/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue May 9 01:44:50 MST 2006


Author: markster
Date: Tue May  9 03:44:50 2006
New Revision: 25929

URL: http://svn.digium.com/view/asterisk?rev=25929&view=rev
Log:
Make menuselect be able to show what the modules are

Modified:
    trunk/apps/app_chanspy.c
    trunk/build_tools/menuselect.c
    trunk/build_tools/menuselect.h
    trunk/build_tools/menuselect_curses.c
    trunk/channels/chan_oss.c
    trunk/channels/chan_sip.c

Modified: trunk/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_chanspy.c?rev=25929&r1=25928&r2=25929&view=diff
==============================================================================
--- trunk/apps/app_chanspy.c (original)
+++ trunk/apps/app_chanspy.c Tue May  9 03:44:50 2006
@@ -56,7 +56,7 @@
 #define ALL_DONE(u, ret) LOCAL_USER_REMOVE(u); return ret;
 #define get_volfactor(x) x ? ((x > 0) ? (1 << x) : ((1 << abs(x)) * -1)) : 0
 
-static const char *synopsis = "Listen to the audio of an active channel";
+static const char *tdesc = "Listen to the audio of an active channel";
 static const char *app = "ChanSpy";
 static const char *desc = 
 "  ChanSpy([chanprefix][|options]): This application is used to listen to the\n"
@@ -584,12 +584,12 @@
 static int load_module(void *mod)
 {
 	__mod_desc = mod;
-	return ast_register_application(app, chanspy_exec, synopsis, desc);
+	return ast_register_application(app, chanspy_exec, tdesc, desc);
 }
 
 static const char *description(void)
 {
-	return (char *) synopsis;
+	return (char *) tdesc;
 }
 
 static const char *key(void)

Modified: trunk/build_tools/menuselect.c
URL: http://svn.digium.com/view/asterisk/trunk/build_tools/menuselect.c?rev=25929&r1=25928&r2=25929&view=diff
==============================================================================
--- trunk/build_tools/menuselect.c (original)
+++ trunk/build_tools/menuselect.c Tue May  9 03:44:50 2006
@@ -206,6 +206,7 @@
 				return -1;
 			
 			mem->name = mxmlElementGetAttr(cur2, "name");
+			mem->displayname = mxmlElementGetAttr(cur2, "displayname");
 		
 			if (!cat->positive_output)
 				mem->enabled = 1;

Modified: trunk/build_tools/menuselect.h
URL: http://svn.digium.com/view/asterisk/trunk/build_tools/menuselect.h?rev=25929&r1=25928&r2=25929&view=diff
==============================================================================
--- trunk/build_tools/menuselect.h (original)
+++ trunk/build_tools/menuselect.h Tue May  9 03:44:50 2006
@@ -37,6 +37,8 @@
 struct member {
 	/*! What will be sent to the makeopts file */
 	const char *name;
+	/*! Display name if known */
+	const char *displayname;
 	/*! Default setting */
 	const char *defaultenabled;
 	/*! This module is currently selected */

Modified: trunk/build_tools/menuselect_curses.c
URL: http://svn.digium.com/view/asterisk/trunk/build_tools/menuselect_curses.c?rev=25929&r1=25928&r2=25929&view=diff
==============================================================================
--- trunk/build_tools/menuselect_curses.c (original)
+++ trunk/build_tools/menuselect_curses.c Tue May  9 03:44:50 2006
@@ -128,6 +128,7 @@
 	int j = 0;
 	struct member *mem;
 	char buf[64];
+	char *desc = NULL;
 
 	wclear(menu);
 
@@ -142,11 +143,17 @@
 			snprintf(buf, sizeof(buf), "XXX %d.%s %s", i, i < 10 ? " " : "", mem->name);
 		else
 			snprintf(buf, sizeof(buf), "[%s] %d.%s %s", mem->enabled ? "*" : " ", i, i < 10 ? " " : "", mem->name);
+		if (curopt + 1== i)
+			desc = mem->displayname;
 		waddstr(menu, buf);
 		if (i == end)
 			break;
 	}
 
+	if (desc) {
+		wmove(menu, end - start + 2, max_x / 2 - 16);
+		waddstr(menu, desc);
+	}
 	wmove(menu, curopt - start, max_x / 2 - 9);
 
 	wrefresh(menu);
@@ -157,7 +164,7 @@
 	struct category *cat;
 	int i = 0;
 	int start = 0;
-	int end = max_y - TITLE_HEIGHT - 2;
+	int end = max_y - TITLE_HEIGHT - 6;
 	int c;
 	int curopt = 0;
 	int maxopt;

Modified: trunk/channels/chan_oss.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_oss.c?rev=25929&r1=25928&r2=25929&view=diff
==============================================================================
--- trunk/channels/chan_oss.c (original)
+++ trunk/channels/chan_oss.c Tue May  9 03:44:50 2006
@@ -375,10 +375,11 @@
 static int oss_write(struct ast_channel *chan, struct ast_frame *f);
 static int oss_indicate(struct ast_channel *chan, int cond);
 static int oss_fixup(struct ast_channel *oldchan, struct ast_channel *newchan);
+static char tdesc[] = "OSS Console Channel Driver";
 
 static const struct ast_channel_tech oss_tech = {
 	.type =	"Console",
-	.description =	"OSS Console Channel Driver",
+	.description =	tdesc,
 	.capabilities =	AST_FORMAT_SLINEAR,
 	.requester = oss_request,
 	.send_digit = oss_digit,

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?rev=25929&r1=25928&r2=25929&view=diff
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Tue May  9 03:44:50 2006
@@ -202,7 +202,7 @@
 
 #define	INITIAL_CSEQ		101	/*!< our initial sip sequence number */
 
-static const char desc[] = "Session Initiation Protocol (SIP)";
+static const char tdesc[] = "Session Initiation Protocol (SIP)";
 static const char config[] = "sip.conf";
 static const char notify_config[] = "sip_notify.conf";
 static int usecnt = 0;
@@ -14084,7 +14084,7 @@
 
 static const char *description(void)
 {
-	return (char *) desc;
+	return (char *) tdesc;
 }
 
 STD_MOD(MOD_1, reload, NULL, NULL);



More information about the asterisk-commits mailing list