Ticket #4105 (closed Bugs: fixed)

Opened 3 years ago

Last modified 3 years ago

$DEVSTATE not defined in functions in callforward 2.7.0.1

Reported by: pwalker Assigned to:
Priority: minor Milestone: 2.8
Component: Call Forward Version: 2.7-branch
Keywords: hook FCBEEPONLY USEDEVSTATE cf Cc:
Confirmation: Unreviewed Distro:
Backend Engine: All Distro Ver:
Backend Ver: SVN Revision (if applicable):

Description

callforward 2.7.0.1:

In function callforward_cfon($c),

... new ext_setvar($DEVSTATE ...

(lines 197, 202)

is not working, since

        global $version;

        $DEVSTATE = version_compare($version, "1.6", "ge") ? "DEVICE_STATE" : "DEVSTATE";

is missing.

Same problem in:

  • function callforward_cfoff_any($c)
  • function callforward_cfoff($c)

Change History

03/04/10 17:17:05 changed by p_lindheimer

  • status changed from new to closed.
  • resolution set to fixed.

(In [9079]) fixes #4102, fixes #4104, fixes #4105 global variables not exposed and label typo

03/08/10 03:08:26 changed by pwalker

The fix for this is not 100% correct in my opinion. There could be situations where $DEVSTATE could still be undefined in 2.7.0.2.

$DEVSTATE is defined in function callforward_get_config($engine):

$DEVSTATE = version_compare($version, "1.6", "ge") ? "DEVICE_STATE" : "DEVSTATE";

But it's not global there, while in each of the other functions it's used with:

global $DEVSTATE;

I've seen it working even without "global $DEVSTATE" in callforward_get_config, but I assume that the variable is set in some other module before. So that's why I conclude that it may not work if something changes just a little, e.g. that other module isn't installed. (I'm working on a slightly modified version of callforward based on 2.7.0.2, which I've renamed to "cfplus" and there, I don't have $DEVSTATE set in the other functions.)

(Can you please re-open this ticket or should I open a new one?)

03/08/10 12:11:27 changed by p_lindheimer

(follow-up: ↓ 5 ) 03/08/10 12:14:22 changed by p_lindheimer

btw - I changed you to a Contributor status so if you logout of the website and then back in, you should be able to re-open the ticket yourself in the future as well as some other enhanced privileges here and on the main site.

(in reply to: ↑ 4 ) 03/08/10 13:00:39 changed by pwalker

Replying to p_lindheimer:

btw - I changed you to a Contributor status so if you logout of the website and then back in, you should be able to re-open the ticket yourself in the future as well as some other enhanced privileges here and on the main site.

Thanks Philippe: Hope I'm not getting on your nerves too much with my Bug reports. Otherwise, don't hesitate to contact me, if I should change my bug reporting habits... (sorry, I used to be a software tester in my "previous live"...)

03/08/10 13:06:40 changed by p_lindheimer

bug reports are great, especially when they come complete with fixes. Where possible, svn diffs are great (either svn -ubB orignal_file propsed_fixed_file or if done right in svn (the best way to do them), svn diff)

but either way, all is good, they are all relevant...

03/11/10 21:10:38 changed by p_lindheimer

(In [9137]) Merged revisions 9075-9111,9113-9122,9124-9136 via svnmerge from http://svn.freepbx.org/modules/branches/2.7

........

r9079 | p_lindheimer | 2010-03-04 14:17:04 -0800 (Thu, 04 Mar 2010) | 1 line

fixes #4102, fixes #4104, fixes #4105 global variables not exposed and label typo

........

r9080 | p_lindheimer | 2010-03-04 14:17:36 -0800 (Thu, 04 Mar 2010) | 1 line

Module Publish Script: callforward 2.7.0.2

........

r9083 | p_lindheimer | 2010-03-05 15:29:27 -0800 (Fri, 05 Mar 2010) | 1 line

Auto Check-in of any outstanding patches

........

r9084 | p_lindheimer | 2010-03-05 15:29:47 -0800 (Fri, 05 Mar 2010) | 1 line

Module Publish Script: music 2.7.0.3

........

r9085 | p_lindheimer | 2010-03-05 16:37:14 -0800 (Fri, 05 Mar 2010) | 1 line

fixes #4102 check if set before checking value

........

r9092 | p_lindheimer | 2010-03-07 16:17:42 -0800 (Sun, 07 Mar 2010) | 1 line

fixes #4101 - hang up instead of goto h,1 no feedback on ticket so I hope it fixes it, fixes #4112 - forget all the commas in the goto target label, replace them with and then use CUT for each part in the goto, works on 1.4 needs confirming on 1.6, fixes #4113 adds option to force detection part of dialplan, ext-fax will still not be generated since that requires native detection and instead external sources will have to supply an equivalent.

........

r9093 | p_lindheimer | 2010-03-07 16:18:23 -0800 (Sun, 07 Mar 2010) | 1 line

Module Publish Script: fax 2.7.0.16

........

r9096 | p_lindheimer | 2010-03-08 08:16:47 -0800 (Mon, 08 Mar 2010) | 1 line

fixes #4100 use CUT() exclusively in parsing recordings, also unrelated puts Macro(user-callerid) back into pri 1 of all outbound routes which won't be executed but for custom code and maybe custom contexts out there using these routes it retains previous behavior while not affecting anything in the main dialplan

........

r9097 | p_lindheimer | 2010-03-08 08:30:21 -0800 (Mon, 08 Mar 2010) | 1 line

fixes #4099 don't put double quotes around Set() assignments. Please test patch and respond if possible before we publish

........

r9098 | p_lindheimer | 2010-03-08 09:10:21 -0800 (Mon, 08 Mar 2010) | 1 line

fixes 105 again where DEVSTATE was not made global and worked by accident from previous declarations

........

r9105 | mickecarlsson | 2010-03-09 22:57:50 -0800 (Tue, 09 Mar 2010) | 1 line

Fixed small typo in queues, updated all langauges

........

r9111 | p_lindheimer | 2010-03-10 09:53:22 -0800 (Wed, 10 Mar 2010) | 1 line

don't put faxdetect into sip configuration if no detection is enabled, part of solution but not final fix re #4117

........

r9113 | p_lindheimer | 2010-03-10 09:57:20 -0800 (Wed, 10 Mar 2010) | 1 line

Module Publish Script: queues 2.7.0.1

........

r9118 | mickecarlsson | 2010-03-10 10:47:17 -0800 (Wed, 10 Mar 2010) | 1 line

Re #4120, fixed typo

........

r9119 | p_lindheimer | 2010-03-10 10:49:32 -0800 (Wed, 10 Mar 2010) | 1 line

Module Publish Script: queues 2.7.0.2

........

r9120 | p_lindheimer | 2010-03-10 11:12:48 -0800 (Wed, 10 Mar 2010) | 1 line

fixes #4117 add faxdetect=no to all extensions

........