[svn-commits] tzafrir: branch tools/2.2 r7471 - in /tools/branches/2.2: ./ doc/ xpp/ xpp/pe...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Wed Nov 4 10:36:27 CST 2009
Author: tzafrir
Date: Wed Nov 4 10:36:21 2009
New Revision: 7471
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=7471
Log:
Compilation and documentation fixes from trunk
Merged revisions 6842,6898,6902,6976,7131 via svnmerge from
http://svn.digium.com/svn/dahdi/tools/trunk
........
r6842 | tzafrir | 2009-07-16 13:19:23 +0300 (Thu, 16 Jul 2009) | 2 lines
Document attributes of a Dahdi::Xpp::Xpd object.
........
r6898 | dbrooks | 2009-07-27 22:54:13 +0300 (Mon, 27 Jul 2009) | 6 lines
Replaces typos "recieved" with "received" and "initilize" with "initialize".
(closes issue #15571)
Reported by: alecdavis
........
r6902 | seanbright | 2009-07-28 00:05:16 +0300 (Tue, 28 Jul 2009) | 11 lines
Pass correct channel number to DAHDI_GET_PARAMS when passing span numbers to dahdi_scan.
When filtering, we weren't taking into account the number of channels in the spans that
we were skipping.
(closes issue #15553)
Reported by: tony
Patches:
20090723_issue15553.patch uploaded by seanbright (license 71)
Tested by: seanbright
........
r6976 | tzafrir | 2009-08-12 22:21:01 +0300 (Wed, 12 Aug 2009) | 4 lines
xpp: cleanup gcc warnings and one real astribank_tool bug
xpp rev: 7281
........
r7131 | tzafrir | 2009-09-15 19:52:58 +0300 (Tue, 15 Sep 2009) | 7 lines
Add a missing trailing slash on the install-libs target
(closes issue #15793)
Reported by: pprindeville
Patches:
dahdi-tools-makefile.patch uploaded by pprindeville (license 347)
........
Modified:
tools/branches/2.2/ (props changed)
tools/branches/2.2/Makefile
tools/branches/2.2/dahdi_scan.c
tools/branches/2.2/doc/pattest.8
tools/branches/2.2/xpp/README.Astribank
tools/branches/2.2/xpp/astribank_tool.c
tools/branches/2.2/xpp/fpga_load.c
tools/branches/2.2/xpp/mpp_funcs.c
tools/branches/2.2/xpp/perl_modules/Dahdi/Xpp/Xpd.pm
Propchange: tools/branches/2.2/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Nov 4 10:36:21 2009
@@ -1,1 +1,1 @@
-/tools/trunk:1-6678,6823,6829-6830,6832-6833,6835,6837-6841,6843-6886,6889-6897,6899-6901,6903-6974,6977-6982,6985-6986,6988-6992,6994-6998,7001-7011,7013,7015,7017,7020-7021
+/tools/trunk:1-6678,6823,6829-6830,6832-6833,6835,6837-6886,6889-6974,6976-6982,6985-6986,6988-6992,6994-6998,7001-7011,7013,7015,7017,7020-7042,7044,7046-7131
Modified: tools/branches/2.2/Makefile
URL: http://svnview.digium.com/svn/dahdi/tools/branches/2.2/Makefile?view=diff&rev=7471&r1=7470&r2=7471
==============================================================================
--- tools/branches/2.2/Makefile (original)
+++ tools/branches/2.2/Makefile Wed Nov 4 10:36:21 2009
@@ -241,7 +241,7 @@
/sbin/ldconfig || : ;\
fi
endif
- rm -f $(DESTDIR)$(LIB_DIR)$(LTZ_SO)
+ rm -f $(DESTDIR)$(LIB_DIR)/$(LTZ_SO)
$(LN) -sf $(LTZ_SO).$(LTZ_SO_MAJOR_VER).$(LTZ_SO_MINOR_VER) \
$(DESTDIR)$(LIB_DIR)/$(LTZ_SO).$(LTZ_SO_MAJOR_VER)
$(LN) -sf $(LTZ_SO).$(LTZ_SO_MAJOR_VER).$(LTZ_SO_MINOR_VER) \
Modified: tools/branches/2.2/dahdi_scan.c
URL: http://svnview.digium.com/svn/dahdi/tools/branches/2.2/dahdi_scan.c?view=diff&rev=7471&r1=7470&r2=7471
==============================================================================
--- tools/branches/2.2/dahdi_scan.c (original)
+++ tools/branches/2.2/dahdi_scan.c Wed Nov 4 10:36:21 2009
@@ -60,8 +60,14 @@
span_filter[filter_count++] = s;
}
}
-
+
for (x = 1; x < DAHDI_MAX_SPANS; x++) {
+
+ memset(&s, 0, sizeof(s));
+ s.spanno = x;
+ if (ioctl(ctl, DAHDI_SPANSTAT, &s))
+ continue;
+
if (filter_count > 0) {
int match = 0;
for (z = 0; z < filter_count; z++) {
@@ -71,13 +77,10 @@
}
}
if (!match) {
+ basechan += s.totalchans;
continue;
}
}
- memset(&s, 0, sizeof(s));
- s.spanno = x;
- if (ioctl(ctl, DAHDI_SPANSTAT, &s))
- continue;
alarms[0] = '\0';
if (s.alarms) {
Modified: tools/branches/2.2/doc/pattest.8
URL: http://svnview.digium.com/svn/dahdi/tools/branches/2.2/doc/pattest.8?view=diff&rev=7471&r1=7470&r2=7471
==============================================================================
--- tools/branches/2.2/doc/pattest.8 (original)
+++ tools/branches/2.2/doc/pattest.8 Wed Nov 4 10:36:21 2009
@@ -7,7 +7,7 @@
.SH DESCRIPTION
.B pattest
-Recieves test data from a DAHDI channel and checks if it matches the
+Receives test data from a DAHDI channel and checks if it matches the
test pattern. The channel should be of CLEAR signalling (e.g: B channel
of a PRI line). patgen(8) is used to generate the data at the other side.
Modified: tools/branches/2.2/xpp/README.Astribank
URL: http://svnview.digium.com/svn/dahdi/tools/branches/2.2/xpp/README.Astribank?view=diff&rev=7471&r1=7470&r2=7471
==============================================================================
--- tools/branches/2.2/xpp/README.Astribank (original)
+++ tools/branches/2.2/xpp/README.Astribank Wed Nov 4 10:36:21 2009
@@ -770,10 +770,10 @@
the initialization.
However in the change of the protocol between versions 2.9 (29) and 3.0
-(30), the response that the new driver recieves from a device with the
+(30), the response that the new driver receives from a device with the
old version is now considered to be an illegal packet and gets
discarded. As a result, the Astribank waits till time-out for the
-initilization to end.
+initialization to end.
.Fix:
Reset the firmware of the Astribank by either:
Modified: tools/branches/2.2/xpp/astribank_tool.c
URL: http://svnview.digium.com/svn/dahdi/tools/branches/2.2/xpp/astribank_tool.c?view=diff&rev=7471&r1=7470&r2=7471
==============================================================================
--- tools/branches/2.2/xpp/astribank_tool.c (original)
+++ tools/branches/2.2/xpp/astribank_tool.c Wed Nov 4 10:36:21 2009
@@ -150,8 +150,6 @@
char *opt_port = NULL;
char *opt_watchdog = NULL;
char *opt_reset = NULL;
- int tws_portnum;
- int full_reset;
int ret;
progname = argv[0];
@@ -177,7 +175,11 @@
break;
case 'r':
opt_reset = optarg;
- if((full_reset = reset_kind(opt_reset)) < 0)
+ /*
+ * Sanity check so we can reject bad
+ * arguments before device access.
+ */
+ if(reset_kind(opt_reset) < 0)
usage();
break;
case 'v':
@@ -213,6 +215,12 @@
}
show_hardware(astribank);
if(opt_reset) {
+ int full_reset;
+
+ if((full_reset = reset_kind(opt_reset)) < 0) {
+ ERR("Bad reset kind '%s'\n", opt_reset);
+ return 1;
+ }
if((ret = mpp_reset(astribank, full_reset)) < 0) {
ERR("%s Reseting astribank failed: %d\n",
(full_reset) ? "Full" : "Half", ret);
@@ -232,6 +240,7 @@
}
} else if(opt_port) {
int new_portnum = strtoul(opt_port, NULL, 0);
+ int tws_portnum = mpp_tws_portnum(astribank);
char *msg = (new_portnum == tws_portnum)
? " Same same, never mind..."
: "";
Modified: tools/branches/2.2/xpp/fpga_load.c
URL: http://svnview.digium.com/svn/dahdi/tools/branches/2.2/xpp/fpga_load.c?view=diff&rev=7471&r1=7470&r2=7471
==============================================================================
--- tools/branches/2.2/xpp/fpga_load.c (original)
+++ tools/branches/2.2/xpp/fpga_load.c Wed Nov 4 10:36:21 2009
@@ -210,7 +210,7 @@
return NULL;
}
/* Find last '/' */
- if((p = memrchr(path, '/', strlen(path))) == NULL) {
+ if((p = (const char *)memrchr(path, '/', strlen(path))) == NULL) {
ERR("Missing a '/' in %s\n", path);
return NULL;
}
@@ -221,7 +221,7 @@
return NULL;
}
/* Search for a '/' before that */
- p = memrchr(path, '/', p - path);
+ p = (const char *)memrchr(path, '/', p - path);
if(p == NULL)
p = path; /* Relative path */
else
Modified: tools/branches/2.2/xpp/mpp_funcs.c
URL: http://svnview.digium.com/svn/dahdi/tools/branches/2.2/xpp/mpp_funcs.c?view=diff&rev=7471&r1=7470&r2=7471
==============================================================================
--- tools/branches/2.2/xpp/mpp_funcs.c (original)
+++ tools/branches/2.2/xpp/mpp_funcs.c Wed Nov 4 10:36:21 2009
@@ -605,9 +605,9 @@
size = ret;
goto out;
}
+ size = reply->header.len - sizeof(struct mpp_header) - sizeof(struct d_EEPROM_BLK_RD_REPLY);
INFO("size=%d offset=0x%X\n", size, CMD_FIELD(reply, EEPROM_BLK_RD_REPLY, offset));
dump_packet(LOG_DEBUG, "BLK_RD", (char *)reply, ret);
- size = reply->header.len - sizeof(struct mpp_header) - sizeof(struct d_EEPROM_BLK_RD_REPLY);
if(size > len) {
ERR("Truncating reply (was %d, now %d)\n", size, len);
size = len;
Modified: tools/branches/2.2/xpp/perl_modules/Dahdi/Xpp/Xpd.pm
URL: http://svnview.digium.com/svn/dahdi/tools/branches/2.2/xpp/perl_modules/Dahdi/Xpp/Xpd.pm?view=diff&rev=7471&r1=7470&r2=7471
==============================================================================
--- tools/branches/2.2/xpp/perl_modules/Dahdi/Xpp/Xpd.pm (original)
+++ tools/branches/2.2/xpp/perl_modules/Dahdi/Xpp/Xpd.pm Wed Nov 4 10:36:21 2009
@@ -11,6 +11,94 @@
use Dahdi::Utils;
use Dahdi::Xpp;
use Dahdi::Xpp::Line;
+
+=head1 NAME
+
+Dahdi::Xpp::Xpd - Perl interface to the Xorcom Astribank XPDs (spans)
+
+=head1 SYNOPSIS
+
+ # Listing all Astribanks:
+ use Dahdi::Xpp;
+ # scans hardware:
+ my @xbuses = Dahdi::Xpp::xbuses("SORT_CONNECTOR");
+ for my $xbus (@xbuses) {
+ print $xbus->name." (".$xbus->label .", ". $xbus->connector .")\n";
+ for my $xpd ($xbus->xpds) {
+ print " - ".$xpd->fqn,"\n";
+ }
+ }
+
+=head1 xbus
+
+The parent L<Dahdi::Xpp::Xbus>
+
+=head1 id
+
+The two-digit ID in the Xbus. Normally 0I<x> for digital spans and
+I<x>0 for analog ones (for some digit, I<x>).
+
+=head1 unit
+
+First digit of the ID. Zero-based number of the module inside the
+Astribank,
+
+=head1 subunit
+
+Second digit of the ID. Zero-based sub-part inside the module.
+Applicable only to digital (BRI/PRI) modules and always 0 for others.
+
+=head1 FQN
+
+Textual name: E.g. C<XPD-10>.
+
+=head1 dir
+
+The ProcFS directory with information about the XPD. e.g.
+C</proc/xpp/XBUS-00/XPD-10>.
+
+=head1 sysfs_dir
+
+The SysFS directory with information about the module. E.g.
+C</sys/bus/astribanks/devices/xbus-00/00:1:0>.
+
+=head1 channels
+
+A list of L<Dahdi::Xpp:Chan> channels of this span. In a scalar context
+this will be the number of channels in the span.
+
+=head1 spanno
+
+0 if not registered with Dahdi. Otherwise, the number of the span it is
+registered as.
+
+=head1 type
+
+The type of the XPD. One of: C<FXS>, C<FXO>, C<BRI_TE>, C<BRI_NT>,
+C<E1>, C<T1>.
+
+=head1 is_bri
+
+True if this XPD is BRI.
+
+=head1 is_pri
+
+True if this XPD is PRI (E1/T1).
+
+=head1 is_digital
+
+True if this XPD is a digital port (BRI / PRI).
+
+=head1 termtype
+
+For a digital span: C<TE> or C<NT>.
+
+=head1 dchan_hardhdlc
+
+For a BRI port: true if the driver with hardhdlc support (rather than
+bri_dchan).
+
+=cut
my %file_warned; # Prevent duplicate warnings about same file.
More information about the svn-commits
mailing list