[Pkg-voip-commits] r1912 - in asterisk-spandsp-plugins/trunk/debian: . receive_fax

Kilian Krause kilian at costa.debian.org
Sat Jun 17 14:21:56 UTC 2006


Author: kilian
Date: 2006-06-17 14:21:56 +0000 (Sat, 17 Jun 2006)
New Revision: 1912

Modified:
   asterisk-spandsp-plugins/trunk/debian/changelog
   asterisk-spandsp-plugins/trunk/debian/control
   asterisk-spandsp-plugins/trunk/debian/copyright
   asterisk-spandsp-plugins/trunk/debian/receive_fax/receive_fax
Log:
update receive_fax to 1.0-5 and make Recommends Sarge-compatible.


Modified: asterisk-spandsp-plugins/trunk/debian/changelog
===================================================================
--- asterisk-spandsp-plugins/trunk/debian/changelog	2006-06-17 14:06:37 UTC (rev 1911)
+++ asterisk-spandsp-plugins/trunk/debian/changelog	2006-06-17 14:21:56 UTC (rev 1912)
@@ -1,8 +1,10 @@
 asterisk-spandsp-plugins (0.0.20060218-2) UNRELEASED; urgency=low
 
   * NOT RELEASED YET
+  * Update receive_fax to 1.0-5
+  * Update Recommends to Sarge compatible versions.
 
- -- Kilian Krause <kilian at debian.org>  Sun, 19 Feb 2006 15:06:44 +0000
+ -- Kilian Krause <kilian at debian.org>  Sat, 17 Jun 2006 16:20:12 +0200
 
 asterisk-spandsp-plugins (0.0.20060218-1) unstable; urgency=low
 

Modified: asterisk-spandsp-plugins/trunk/debian/control
===================================================================
--- asterisk-spandsp-plugins/trunk/debian/control	2006-06-17 14:06:37 UTC (rev 1911)
+++ asterisk-spandsp-plugins/trunk/debian/control	2006-06-17 14:21:56 UTC (rev 1912)
@@ -9,7 +9,7 @@
 Package: asterisk-app-fax
 Architecture: any
 Depends: ${shlibs:Depends},
-Recommends: libmime-lite-perl, libfile-sync-perl, libconfig-tiny-perl, psutils, gs-common, libpaperg, libstorable-perl, liblocale-gettext-perl
+Recommends: libmime-lite-perl, libfile-sync-perl, libconfig-tiny-perl, libtiff-tools, psutils, gs-common, libpaper-utils, liblocale-gettext-perl
 Description: Softfax application for Asterisk
  This will allow you to send and receive faxes using the Asterisk PBX by
  generating Fax tones using a software DSP.

Modified: asterisk-spandsp-plugins/trunk/debian/copyright
===================================================================
--- asterisk-spandsp-plugins/trunk/debian/copyright	2006-06-17 14:06:37 UTC (rev 1911)
+++ asterisk-spandsp-plugins/trunk/debian/copyright	2006-06-17 14:21:56 UTC (rev 1912)
@@ -27,3 +27,6 @@
 On Debian systems, the complete text of the GNU General
 Public License can be found in `/usr/share/common-licenses/GPL'.
 
+
+Other components:
+receive_fax script Copyright (C) 2005,2006 Florian Zumbiehl <florz at gmx.de>

Modified: asterisk-spandsp-plugins/trunk/debian/receive_fax/receive_fax
===================================================================
--- asterisk-spandsp-plugins/trunk/debian/receive_fax/receive_fax	2006-06-17 14:06:37 UTC (rev 1911)
+++ asterisk-spandsp-plugins/trunk/debian/receive_fax/receive_fax	2006-06-17 14:21:56 UTC (rev 1912)
@@ -238,6 +238,12 @@
 	my($recipient,$which)=@_;
 	open(my $fax_cnt_lock,'>',"$fax_counter_dir/lock")||die();
 	flock($fax_cnt_lock,LOCK_EX)||die();
+	unlink("$fax_counter_dir/$recipient.new"); # just in case an old version of this script left one of those lying around ...
+	if(stat("$fax_counter_dir/$recipient.new2")){
+		commit_counters($recipient);
+	}elsif(!$!{ENOENT}){
+		die();
+	}
 	my $recv_counter=0;
 	my $fax_counter=0;
 	if(open(my $fax_cnt,'<',"$fax_counter_dir/$recipient.cnt")){
@@ -258,18 +264,29 @@
 	}else{
 		die();
 	}
-	open(my $fax_cnt,'>',"$fax_counter_dir/$recipient.new")||die();
+	open(my $fax_cnt,'>',"$fax_counter_dir/$recipient.new1")||die();
 	print($fax_cnt "1\n")||die();
 	print($fax_cnt "$recv_counter\n")||die();
 	print($fax_cnt "$fax_counter\n")||die();
+	close($fax_cnt)||die();
+	open($fax_cnt,'<',"$fax_counter_dir/$recipient.new1")||die();
 	fsync($fax_cnt)||die();
 	close($fax_cnt)||die();
-	rename("$fax_counter_dir/$recipient.new","$fax_counter_dir/$recipient.cnt")||die();
-	open(my $fax_cnt_dir,'<',$fax_counter_dir)||die();
-	fsync($fax_cnt_dir)||die();
-	close($fax_cnt_dir)||die();
+	rename("$fax_counter_dir/$recipient.new1","$fax_counter_dir/$recipient.new2")||die();
+	commit_counters($recipient);
 	flock($fax_cnt_lock,LOCK_UN)||die();
 	close($fax_cnt_lock)||die();
 	return($recv_counter,$fax_counter);
 }
 
+sub commit_counters{
+	my($recipient)=@_;
+	open(my $fax_cnt_dir,'<',$fax_counter_dir)||die();
+	fsync($fax_cnt_dir)||die();
+	unlink("$fax_counter_dir/$recipient.cnt")||$!{ENOENT}||die();
+	link("$fax_counter_dir/$recipient.new2","$fax_counter_dir/$recipient.cnt")||die();
+	fsync($fax_cnt_dir)||die();
+	unlink("$fax_counter_dir/$recipient.new2")||die();
+	close($fax_cnt_dir)||die();
+}
+




More information about the Pkg-voip-commits mailing list