diff options
author | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2009-11-04 16:36:21 +0000 |
---|---|---|
committer | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2009-11-04 16:36:21 +0000 |
commit | db77afdbde30d91a64707ef94627cf00938b2664 (patch) | |
tree | da7d141c9bc61fe02fd410808cf571ce0a9a4b1b /xpp/astribank_tool.c | |
parent | 746ff447145a44ea0a8898677be4227bb93a2834 (diff) |
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)
........
git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/branches/2.2@7471 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'xpp/astribank_tool.c')
-rw-r--r-- | xpp/astribank_tool.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/xpp/astribank_tool.c b/xpp/astribank_tool.c index b9bcaaa..caee860 100644 --- a/xpp/astribank_tool.c +++ b/xpp/astribank_tool.c @@ -150,8 +150,6 @@ int main(int argc, char *argv[]) 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 @@ int main(int argc, char *argv[]) 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 @@ int main(int argc, char *argv[]) } 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 @@ int main(int argc, char *argv[]) } } 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..." : ""; |