[Pkg-voip-commits] r5513 - in /freepbx-modules/trunk: ./ _cache/ debian/ debian/patches/ modules/core/

tzafrir-guest at alioth.debian.org tzafrir-guest at alioth.debian.org
Mon Apr 7 21:44:15 UTC 2008


Author: tzafrir-guest
Date: Mon Apr  7 21:44:14 2008
New Revision: 5513

URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=5513
Log:
* Actually include packages of v. 2.3.
* s/dpatch/quilt/.
* Patch sqlite_trunk_query: Yet another sqlite fix.
* Patch checkperms_indications: check the status of fopen.

Added:
    freepbx-modules/trunk/debian/README.Debian
    freepbx-modules/trunk/debian/patches/
    freepbx-modules/trunk/debian/patches/checkperms_indications
    freepbx-modules/trunk/debian/patches/series
    freepbx-modules/trunk/debian/patches/sqlite_trunk_query
Modified:
    freepbx-modules/trunk/   (props changed)
    freepbx-modules/trunk/_cache/   (props changed)
    freepbx-modules/trunk/debian/TODO.Debian
    freepbx-modules/trunk/debian/changelog
    freepbx-modules/trunk/debian/control
    freepbx-modules/trunk/debian/rules
    freepbx-modules/trunk/modules/core/functions.inc.php

Propchange: freepbx-modules/trunk/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Apr  7 21:44:14 2008
@@ -1,0 +1,2 @@
+.pc
+modules*.xml

Propchange: freepbx-modules/trunk/_cache/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Apr  7 21:44:14 2008
@@ -1,0 +1,1 @@
+*.tgz

Added: freepbx-modules/trunk/debian/README.Debian
URL: http://svn.debian.org/wsvn/pkg-voip/freepbx-modules/trunk/debian/README.Debian?rev=5513&op=file
==============================================================================
--- freepbx-modules/trunk/debian/README.Debian (added)
+++ freepbx-modules/trunk/debian/README.Debian Mon Apr  7 21:44:14 2008
@@ -1,0 +1,7 @@
+The following modules were ommited:
+
+* framework: replicates the package freepbx, and not newer.
+* versionupgrade: Unsupported functionality.
+* ZoIP: huge.
+* irc: pjirc should probably be in its own package. cgiirc works nicely.
+* javassh: License is not clear. ajaxterm works nicely.

Modified: freepbx-modules/trunk/debian/TODO.Debian
URL: http://svn.debian.org/wsvn/pkg-voip/freepbx-modules/trunk/debian/TODO.Debian?rev=5513&op=diff
==============================================================================
--- freepbx-modules/trunk/debian/TODO.Debian (original)
+++ freepbx-modules/trunk/debian/TODO.Debian Mon Apr  7 21:44:14 2008
@@ -1,3 +1,18 @@
 * Copyright / license inspection.
-* Don't install all the modules at once.
 * FreePBX doesn't like installing modules when Asterisk is not running.
+* Installation / removal is painfully slow.
+* Still impossible to install separate modules.
+* ARI runs in a separate window and is not functional.
+* Other PHP errors:
+  - FreePBX System Status:
+    Notice: Undefined offset: 2 in
+    /usr/share/freepbx/modules/core/functions.inc.php on line 1868
+  - Customer DB: bad DB error.
+  - PHPAGI Config:
+    Warning: extract() [function.extract]: First argument should be an
+    array in /usr/share/freepbx/modules/phpagiconf/page.phpagiconf.php
+    on line 68
+* Asterisk Log Files:
+  shows "full" rather than "messages"
+
+And what about pgsql?

Modified: freepbx-modules/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-voip/freepbx-modules/trunk/debian/changelog?rev=5513&op=diff
==============================================================================
--- freepbx-modules/trunk/debian/changelog (original)
+++ freepbx-modules/trunk/debian/changelog Mon Apr  7 21:44:14 2008
@@ -1,4 +1,4 @@
-freepbx-modules (2.3.1) unstable; urgency=low
+freepbx-modules (2.3.1) UNRELEASED; urgency=low
 
   [Diego Iastrubni]
   * First release
@@ -10,5 +10,9 @@
   * Remove empty dir, make files non-executable, as per lintian.
   * Move actions from arch-dependent targets.
   * ITP filed (Closes: #464927).
+  * Actually include packages of v. 2.3.
+  * s/dpatch/quilt/.
+  * Patch sqlite_trunk_query: Yet another sqlite fix.
+  * Patch checkperms_indications: check the status of fopen.
   
  -- Tzafrir Cohen <tzafrir.cohen at xorcom.com>  Thu,  7 Feb 2008 01:02:23 +0200

Modified: freepbx-modules/trunk/debian/control
URL: http://svn.debian.org/wsvn/pkg-voip/freepbx-modules/trunk/debian/control?rev=5513&op=diff
==============================================================================
--- freepbx-modules/trunk/debian/control (original)
+++ freepbx-modules/trunk/debian/control Mon Apr  7 21:44:14 2008
@@ -4,7 +4,7 @@
 Maintainer: Debian VoIP Team <pkg-voip-maintainers at lists.alioth.debian.org>
 Uploaders: Tzafrir Cohen <tzafrir.cohen at xorcom.com>, Diego Iastrubni <diego.iastrubni at xorcom.com>, Chris Halls <halls at debian.org>
 Build-Depends: debhelper (>= 4.0.0)
-Build-Depends-Indep: sharutils
+Build-Depends-Indep: sharutils, quilt
 Standards-Version: 3.7.3
 Homepage: http://www.freepbx.org/
 Vcs-Svn: svn://svn.debian.org/pkg-voip/freepbx-modules/trunk/

Added: freepbx-modules/trunk/debian/patches/checkperms_indications
URL: http://svn.debian.org/wsvn/pkg-voip/freepbx-modules/trunk/debian/patches/checkperms_indications?rev=5513&op=file
==============================================================================
--- freepbx-modules/trunk/debian/patches/checkperms_indications (added)
+++ freepbx-modules/trunk/debian/patches/checkperms_indications Mon Apr  7 21:44:14 2008
@@ -1,0 +1,19 @@
+If we failed to open indications.conf, warn, but fail gracefully.
+
+Upstream issue: http://freepbx.org/trac/ticket/2779 .
+--- trunk.orig/modules/core/functions.inc.php
++++ trunk/modules/core/functions.inc.php
+@@ -2690,6 +2690,13 @@ function general_generate_indications() 
+ 	$filename = isset($asterisk_conf["astetcdir"]) && $asterisk_conf["astetcdir"] != '' ? rtrim($asterisk_conf["astetcdir"],DIRECTORY_SEPARATOR) : "/etc/asterisk";
+ 	$filename .= "/indications.conf";
+ 	$fd = fopen($filename, "w");
++
++	if ( ($fd = fopen($filename, "w")) === FALSE) {
++		// TODO: Also add errno information.
++		echo "Failed to open indications file for writing: $filename.<br>\n";
++		return;
++	}
++
+ 	fwrite($fd, "[general]\ncountry=".$result['value']."\n\n");
+ 
+ 	$zonelist = general_get_zonelist();

Added: freepbx-modules/trunk/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-voip/freepbx-modules/trunk/debian/patches/series?rev=5513&op=file
==============================================================================
--- freepbx-modules/trunk/debian/patches/series (added)
+++ freepbx-modules/trunk/debian/patches/series Mon Apr  7 21:44:14 2008
@@ -1,0 +1,2 @@
+sqlite_trunk_query
+checkperms_indications

Added: freepbx-modules/trunk/debian/patches/sqlite_trunk_query
URL: http://svn.debian.org/wsvn/pkg-voip/freepbx-modules/trunk/debian/patches/sqlite_trunk_query?rev=5513&op=file
==============================================================================
--- freepbx-modules/trunk/debian/patches/sqlite_trunk_query (added)
+++ freepbx-modules/trunk/debian/patches/sqlite_trunk_query Mon Apr  7 21:44:14 2008
@@ -1,0 +1,31 @@
+Replace a complex query that doesn't work with two simpler ones and a
+bit of PHP code.
+
+Upstream issue: http://freepbx.org/trac/ticket/2778
+
+--- trunk.orig/modules/core/functions.inc.php
++++ trunk/modules/core/functions.inc.php
+@@ -1802,20 +1802,9 @@ function core_trunks_list($assoc = false
+ 	
+ 	if ($amp_conf["AMPDBENGINE"] == "sqlite3")
+ 	{
+-		// TODO: sqlite work arround - diego
+-		// TODO: WILL NOT WORK, need to remove the usage of SUBSTRING
+-		// need to reorder the trunks in PHP code
+-		$sqlstr  = "SELECT t.variable, t.value, d.value state FROM `globals` t ";
+-		$sqlstr .= "JOIN (SELECT x.variable, x.value FROM globals x WHERE x.variable LIKE 'OUTDISABLE\_%') d ";
+-		$sqlstr .= "ON substring(t.variable,5) = substring(d.variable,12) WHERE t.variable LIKE 'OUT\_%' ";
+-		$sqlstr .= "UNION ALL ";
+-		$sqlstr .= "SELECT v.variable, v.value, concat(substring(v.value,1,0),'off') state  FROM `globals` v ";
+-		$sqlstr .= "WHERE v.variable LIKE 'OUT\_%' AND concat('OUTDISABLE_',substring(v.variable,5)) NOT IN ";
+-		$sqlstr .= " ( SELECT variable from globals WHERE variable LIKE 'OUTDISABLE\_%' ) ";
+-		$sqlstr .= "ORDER BY variable";
+-
+-		//$unique_trunks = sql("SELECT * FROM globals WHERE variable LIKE 'OUT_%' ORDER BY variable","getAll"); 
+-		$unique_trunks = sql($sqlstr,"getAll"); 
++		$possible_trunks = sql("SELECT * FROM globals WHERE variable LIKE 'OUT_%' ORDER BY variable,value","getAll");
++		$disabled_trunks = sql("SELECT * FROM globals WHERE variable LIKE 'OUTDISABLE_%' ORDER BY variable,value","getAll");
++		$unique_trunks = array_diff($possible_trunks, $disabled_trunks);
+ 	}
+ 	else
+ 	{

Modified: freepbx-modules/trunk/debian/rules
URL: http://svn.debian.org/wsvn/pkg-voip/freepbx-modules/trunk/debian/rules?rev=5513&op=diff
==============================================================================
--- freepbx-modules/trunk/debian/rules (original)
+++ freepbx-modules/trunk/debian/rules Mon Apr  7 21:44:14 2008
@@ -8,6 +8,8 @@
 
 # Uncomment this to turn on verbose mode.
 # export DH_VERBOSE=1
+
+-include /usr/share/quilt/quilt.make
 
 configure: configure-stamp
 configure-stamp: 

Modified: freepbx-modules/trunk/modules/core/functions.inc.php
URL: http://svn.debian.org/wsvn/pkg-voip/freepbx-modules/trunk/modules/core/functions.inc.php?rev=5513&op=diff
==============================================================================
--- freepbx-modules/trunk/modules/core/functions.inc.php (original)
+++ freepbx-modules/trunk/modules/core/functions.inc.php Mon Apr  7 21:44:14 2008
@@ -1802,20 +1802,9 @@
 	
 	if ($amp_conf["AMPDBENGINE"] == "sqlite3")
 	{
-		// TODO: sqlite work arround - diego
-		// TODO: WILL NOT WORK, need to remove the usage of SUBSTRING
-		// need to reorder the trunks in PHP code
-		$sqlstr  = "SELECT t.variable, t.value, d.value state FROM `globals` t ";
-		$sqlstr .= "JOIN (SELECT x.variable, x.value FROM globals x WHERE x.variable LIKE 'OUTDISABLE\_%') d ";
-		$sqlstr .= "ON substring(t.variable,5) = substring(d.variable,12) WHERE t.variable LIKE 'OUT\_%' ";
-		$sqlstr .= "UNION ALL ";
-		$sqlstr .= "SELECT v.variable, v.value, concat(substring(v.value,1,0),'off') state  FROM `globals` v ";
-		$sqlstr .= "WHERE v.variable LIKE 'OUT\_%' AND concat('OUTDISABLE_',substring(v.variable,5)) NOT IN ";
-		$sqlstr .= " ( SELECT variable from globals WHERE variable LIKE 'OUTDISABLE\_%' ) ";
-		$sqlstr .= "ORDER BY variable";
-
-		//$unique_trunks = sql("SELECT * FROM globals WHERE variable LIKE 'OUT_%' ORDER BY variable","getAll"); 
-		$unique_trunks = sql($sqlstr,"getAll"); 
+		$possible_trunks = sql("SELECT * FROM globals WHERE variable LIKE 'OUT_%' ORDER BY variable,value","getAll");
+		$disabled_trunks = sql("SELECT * FROM globals WHERE variable LIKE 'OUTDISABLE_%' ORDER BY variable,value","getAll");
+		$unique_trunks = array_diff($possible_trunks, $disabled_trunks);
 	}
 	else
 	{
@@ -2701,6 +2690,13 @@
 	$filename = isset($asterisk_conf["astetcdir"]) && $asterisk_conf["astetcdir"] != '' ? rtrim($asterisk_conf["astetcdir"],DIRECTORY_SEPARATOR) : "/etc/asterisk";
 	$filename .= "/indications.conf";
 	$fd = fopen($filename, "w");
+
+	if ( ($fd = fopen($filename, "w")) === FALSE) {
+		// TODO: Also add errno information.
+		echo "Failed to open indications file for writing: $filename.<br>\n";
+		return;
+	}
+
 	fwrite($fd, "[general]\ncountry=".$result['value']."\n\n");
 
 	$zonelist = general_get_zonelist();




More information about the Pkg-voip-commits mailing list