[Pkg-voip-commits] [dahdi-tools] 207/285: xpp: astribank_hexload: allow empty span specs

tzafrir at debian.org tzafrir at debian.org
Thu Jul 7 19:18:58 UTC 2016


This is an automated email from the git hooks/post-receive script.

tzafrir pushed a commit to branch master
in repository dahdi-tools.

commit d4537e46ceda4011c3db9c0f34d15a12f43cf539
Author: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
Date:   Thu Jul 31 17:57:32 2014 +0300

    xpp: astribank_hexload: allow empty span specs
    
    DAHDI 2.9.2 added support for -S (span specs). However if this option
    was not specified, it fails to run.
    
    Signed-off-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
---
 xpp/astribank_hexload.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/xpp/astribank_hexload.c b/xpp/astribank_hexload.c
index 582dd40..643fe57 100644
--- a/xpp/astribank_hexload.c
+++ b/xpp/astribank_hexload.c
@@ -39,6 +39,7 @@
 #define	DBG_MASK	0x80
 #define	MAX_HEX_LINES	64000
 #define HAVE_OCTASIC	1
+#define DEF_SPAN_SPEC_FORMAT	"*:%c1" /* %c: 'E' or 'T' */
 
 static char	*progname;
 
@@ -166,6 +167,7 @@ int main(int argc, char *argv[])
 #if HAVE_OCTASIC
 	int			opt_alaw = 0;
 	const char		*span_spec = NULL;
+	char			def_span_spec[sizeof(DEF_SPAN_SPEC_FORMAT)];
 #endif
 	int			opt_dest = 0;
 	int			opt_sum = 0;
@@ -252,6 +254,13 @@ int main(int argc, char *argv[])
 		ERR("Missing device path.\n");
 		usage();
 	}
+# ifdef HAVE_OCTASIC
+	if (!span_spec) {
+		snprintf(def_span_spec, sizeof(def_span_spec),
+				DEF_SPAN_SPEC_FORMAT, opt_alaw? 'E' : 'T');
+		span_spec = def_span_spec;
+	}
+#endif
 	if(opt_dest) {
 		/*
 		 * MPP Interface

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/dahdi-tools.git



More information about the Pkg-voip-commits mailing list