[zaptel-commits] tzafrir: trunk r2916 - in /trunk: ./ fxotune.c patgen.c patlooptest.c pattest.c

SVN commits to the Zaptel project zaptel-commits at lists.digium.com
Tue Aug 21 03:56:51 CDT 2007


Author: tzafrir
Date: Tue Aug 21 03:56:51 2007
New Revision: 2916

URL: http://svn.digium.com/view/zaptel?view=rev&rev=2916
Log:
* Add an explicit mode to the callto open (the default one that is used
  anyway).
* Clarify error message.
* Remove the mode parameter when opening a zap device (it is ignored
  anyway). Fix patgen's usage message while we're there.

closes #10505 on Zaptel trunk.

Merged revisions 2914 via svnmerge from 
https://origsvn.digium.com/svn/zaptel/branches/1.2
Merged revisions 2915 via svnmerge from 
https://origsvn.digium.com/svn/zaptel/branches/1.4

Modified:
    trunk/   (props changed)
    trunk/fxotune.c
    trunk/patgen.c
    trunk/patlooptest.c
    trunk/pattest.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/fxotune.c
URL: http://svn.digium.com/view/zaptel/trunk/fxotune.c?view=diff&rev=2916&r1=2915&r2=2916
==============================================================================
--- trunk/fxotune.c (original)
+++ trunk/fxotune.c Tue Aug 21 03:56:51 2007
@@ -824,10 +824,10 @@
 	char zapdev[80] = "";
 	struct wctdm_echo_coefs coefs;
 	
-	configfd = open(configfile, O_CREAT|O_TRUNC|O_WRONLY);
+	configfd = open(configfile, O_CREAT|O_TRUNC|O_WRONLY, 0666);
 
 	if (configfd < 0) {
-		fprintf(stderr, "open: %s\n", strerror(errno));
+		fprintf(stderr, "Cannot generate config file %s: open: %s\n", configfile, strerror(errno));
 		return -1;
 	}
 

Modified: trunk/patgen.c
URL: http://svn.digium.com/view/zaptel/trunk/patgen.c?view=diff&rev=2916&r1=2915&r2=2916
==============================================================================
--- trunk/patgen.c (original)
+++ trunk/patgen.c Tue Aug 21 03:56:51 2007
@@ -37,10 +37,10 @@
 	unsigned char c=0;
 	unsigned char outbuf[BLOCK_SIZE];
 	if (argc < 2) {
-		fprintf(stderr, "Usage: markhdlctest <tor device>\n");
+		fprintf(stderr, "Usage: %s <zap device>\n",argv[0]);
 		exit(1);
 	}
-	fd = open(argv[1], O_RDWR, 0600);
+	fd = open(argv[1], O_RDWR);
 	if (fd < 0) {
 		fprintf(stderr, "Unable to open %s: %s\n", argv[1], strerror(errno));
 		exit(1);

Modified: trunk/patlooptest.c
URL: http://svn.digium.com/view/zaptel/trunk/patlooptest.c?view=diff&rev=2916&r1=2915&r2=2916
==============================================================================
--- trunk/patlooptest.c (original)
+++ trunk/patlooptest.c Tue Aug 21 03:56:51 2007
@@ -47,7 +47,7 @@
 		fprintf(stderr, "Usage: %s <zaptel device (optional timeout)>\n",argv[0]);
 		exit(1);
 	}
-	fd = open(argv[1], O_RDWR, 0600);
+	fd = open(argv[1], O_RDWR);
 	if (fd < 0) {
 		fprintf(stderr, "Unable to open %s: %s\n", argv[1], strerror(errno));
 		exit(1);

Modified: trunk/pattest.c
URL: http://svn.digium.com/view/zaptel/trunk/pattest.c?view=diff&rev=2916&r1=2915&r2=2916
==============================================================================
--- trunk/pattest.c (original)
+++ trunk/pattest.c Tue Aug 21 03:56:51 2007
@@ -45,7 +45,7 @@
 		fprintf(stderr, "Usage: %s <zap device> [optional timeout]\n",argv[0]);
 		exit(1);
 	}
-	fd = open(argv[1], O_RDWR, 0600);
+	fd = open(argv[1], O_RDWR);
 	if (fd < 0) {
 		fprintf(stderr, "Unable to open %s: %s\n", argv[1], strerror(errno));
 		exit(1);




More information about the zaptel-commits mailing list