[asterisk-commits] file: branch file/p2prtpbridging r40567 - in
/team/file/p2prtpbridging: ./ ch...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sat Aug 19 18:47:35 MST 2006
Author: file
Date: Sat Aug 19 20:47:35 2006
New Revision: 40567
URL: http://svn.digium.com/view/asterisk?rev=40567&view=rev
Log:
Merged revisions 40561,40563,40566 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r40561 | qwell | 2006-08-19 21:25:02 -0400 (Sat, 19 Aug 2006) | 4 lines
Fix minor display issues in "skinny show devices".
Patch by wedhorn with minor modifications by me.
........
r40563 | qwell | 2006-08-19 21:27:24 -0400 (Sat, 19 Aug 2006) | 2 lines
Make the CIPC device string useful
........
r40566 | file | 2006-08-19 21:42:41 -0400 (Sat, 19 Aug 2006) | 2 lines
kpfleming didn't break trunk, it was the aliens. (fix it so that the Makefile references the new name for the XML tree, menuselect-tree)
........
Modified:
team/file/p2prtpbridging/ (props changed)
team/file/p2prtpbridging/Makefile
team/file/p2prtpbridging/channels/chan_skinny.c
Propchange: team/file/p2prtpbridging/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sat Aug 19 20:47:35 2006
@@ -1,1 +1,1 @@
-/trunk:1-40549
+/trunk:1-40566
Modified: team/file/p2prtpbridging/Makefile
URL: http://svn.digium.com/view/asterisk/team/file/p2prtpbridging/Makefile?rev=40567&r1=40566&r2=40567&view=diff
==============================================================================
--- team/file/p2prtpbridging/Makefile (original)
+++ team/file/p2prtpbridging/Makefile Sat Aug 19 20:47:35 2006
@@ -414,7 +414,7 @@
@echo "****"
@exit 1
-menuselect.makeopts menuselect.makedeps: menuselect/menuselect makeopts.xml
+menuselect.makeopts menuselect.makedeps: menuselect/menuselect menuselect-tree
menuselect/menuselect --check-deps $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS) menuselect.makeopts
#ifneq ($(wildcard tags),)
@@ -541,7 +541,7 @@
@$(MAKE) -C mxml clean
@$(MAKE) -C menuselect dist-clean
@$(MAKE) -C sounds dist-clean
- rm -f menuselect.makeopts makeopts makeopts.xml menuselect.makedeps
+ rm -f menuselect.makeopts makeopts menuselect-tree menuselect.makedeps
rm -f config.log config.status
rm -rf autom4te.cache
rm -f include/asterisk/autoconfig.h
@@ -902,7 +902,7 @@
rm -rf $(DESTDIR)$(ASTETCDIR)
rm -rf $(DESTDIR)$(ASTLOGDIR)
-menuselect: menuselect/menuselect makeopts.xml
+menuselect: menuselect/menuselect menuselect-tree
- at menuselect/menuselect $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS) menuselect.makeopts && echo "menuselect changes saved!" || echo "menuselect changes NOT saved!"
menuselect/menuselect: menuselect/menuselect.c menuselect/menuselect_curses.c menuselect/menuselect_stub.c menuselect/menuselect.h menuselect/linkedlists.h config.status mxml/libmxml.a
@@ -912,7 +912,7 @@
@cd mxml && unset CFLAGS AST_LIBS && test -f config.h || ./configure
$(MAKE) -C mxml libmxml.a
-makeopts.xml: $(foreach dir,$(MOD_SUBDIRS),$(wildcard $(dir)/*.c) $(wildcard $(dir)/*.cc)) build_tools/cflags.xml sounds/sounds.xml
+menuselect-tree: $(foreach dir,$(MOD_SUBDIRS),$(wildcard $(dir)/*.c) $(wildcard $(dir)/*.cc)) build_tools/cflags.xml sounds/sounds.xml
@echo "Generating list of available modules ..."
@build_tools/prep_moduledeps > $@
Modified: team/file/p2prtpbridging/channels/chan_skinny.c
URL: http://svn.digium.com/view/asterisk/team/file/p2prtpbridging/channels/chan_skinny.c?rev=40567&r1=40566&r2=40567&view=diff
==============================================================================
--- team/file/p2prtpbridging/channels/chan_skinny.c (original)
+++ team/file/p2prtpbridging/channels/chan_skinny.c Sat Aug 19 20:47:35 2006
@@ -1696,6 +1696,73 @@
return RESULT_SUCCESS;
}
+static char *device2str(int type)
+{
+ static char tmp[15];
+
+ switch (type) {
+ case SKINNY_DEVICE_NONE:
+ return "No Device";
+ case SKINNY_DEVICE_30SPPLUS:
+ return "30SP Plus";
+ case SKINNY_DEVICE_12SPPLUS:
+ return "12SP Plus";
+ case SKINNY_DEVICE_12SP:
+ return "12SP";
+ case SKINNY_DEVICE_12:
+ return "12";
+ case SKINNY_DEVICE_30VIP:
+ return "30VIP";
+ case SKINNY_DEVICE_7910:
+ return "7910";
+ case SKINNY_DEVICE_7960:
+ return "7960";
+ case SKINNY_DEVICE_7940:
+ return "7940";
+ case SKINNY_DEVICE_7935:
+ return "7935";
+ case SKINNY_DEVICE_ATA186:
+ return "ATA186";
+ case SKINNY_DEVICE_7941:
+ return "7941";
+ case SKINNY_DEVICE_7971:
+ return "7971";
+ case SKINNY_DEVICE_7985:
+ return "7985";
+ case SKINNY_DEVICE_7911:
+ return "7911";
+ case SKINNY_DEVICE_7961GE:
+ return "7961GE";
+ case SKINNY_DEVICE_7941GE:
+ return "7941GE";
+ case SKINNY_DEVICE_7905:
+ return "7905";
+ case SKINNY_DEVICE_7920:
+ return "7920";
+ case SKINNY_DEVICE_7970:
+ return "7970";
+ case SKINNY_DEVICE_7912:
+ return "7912";
+ case SKINNY_DEVICE_7902:
+ return "7902";
+ case SKINNY_DEVICE_CIPC:
+ return "IP Communicator";
+ case SKINNY_DEVICE_7961:
+ return "7961";
+ case SKINNY_DEVICE_7936:
+ return "7936";
+ case SKINNY_DEVICE_SCCPGATEWAY_AN:
+ return "SCCPGATEWAY_AN";
+ case SKINNY_DEVICE_SCCPGATEWAY_BRI:
+ return "SCCPGATEWAY_BRI";
+ case SKINNY_DEVICE_UNKNOWN:
+ return "Unknown";
+ default:
+ snprintf(tmp, sizeof(tmp), "UNKNOWN-%d", type);
+ return tmp;
+ }
+}
+
static int skinny_show_devices(int fd, int argc, char *argv[])
{
struct skinny_device *d;
@@ -1707,19 +1774,19 @@
}
ast_mutex_lock(&devicelock);
- ast_cli(fd, "Name DeviceId IP TypeId R NL\n");
- ast_cli(fd, "-------------------- ---------------- --------------- ------ - --\n");
+ ast_cli(fd, "Name DeviceId IP Type R NL\n");
+ ast_cli(fd, "-------------------- ---------------- --------------- --------------- - --\n");
for (d = devices; d; d = d->next) {
numlines = 0;
for (l = d->lines; l; l = l->next) {
numlines++;
}
- ast_cli(fd, "%-20s %-16s %-15s %6X %c %2d\n",
+ ast_cli(fd, "%-20s %-16s %-15s %-15s %c %2d\n",
d->name,
d->id,
- ast_inet_ntoa(d->addr.sin_addr),
- d->type,
+ d->session?ast_inet_ntoa(d->session->sin.sin_addr):"",
+ device2str(d->type),
d->registered?'Y':'N',
numlines);
}
@@ -2441,9 +2508,10 @@
return "Unhold";
case -1:
return "Stop tone";
- }
- snprintf(tmp, 100, "UNKNOWN-%d", ind);
- return tmp;
+ default:
+ snprintf(tmp, sizeof(tmp), "UNKNOWN-%d", ind);
+ return tmp;
+ }
}
More information about the asterisk-commits
mailing list