[svn-commits] kpfleming: branch 1.4 r3383 - in /branches/1.4: ./ wctdm24xxp/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Dec 10 10:54:40 CST 2007


Author: kpfleming
Date: Mon Dec 10 10:54:39 2007
New Revision: 3383

URL: http://svn.digium.com/view/zaptel?view=rev&rev=3383
Log:
for broken analog ports, retain the signaling type that would have been supported if the port wasn't broken
in ztscan, report the port types of analog ports instead of the signaling type

Modified:
    branches/1.4/wctdm.c
    branches/1.4/wctdm24xxp/base.c
    branches/1.4/ztscan.c

Modified: branches/1.4/wctdm.c
URL: http://svn.digium.com/view/zaptel/branches/1.4/wctdm.c?view=diff&rev=3383&r1=3382&r2=3383
==============================================================================
--- branches/1.4/wctdm.c (original)
+++ branches/1.4/wctdm.c Mon Dec 10 10:54:39 2007
@@ -2099,7 +2099,7 @@
 				wc->chans[x].sigcap = ZT_SIG_FXSKS | ZT_SIG_FXSLS | ZT_SIG_SF | ZT_SIG_CLEAR;
 			else
 				wc->chans[x].sigcap = ZT_SIG_FXOKS | ZT_SIG_FXOLS | ZT_SIG_FXOGS | ZT_SIG_SF | ZT_SIG_EM | ZT_SIG_CLEAR;
-		} else if (!(wc->chans[x].sigcap == ZT_SIG_BROKEN)) {
+		} else if (!(wc->chans[x].sigcap & ZT_SIG_BROKEN)) {
 			wc->chans[x].sigcap = 0;
 		}
 	}
@@ -2217,7 +2217,7 @@
 					printk("Module %d: Installed -- MANUAL FXS\n",x);
 				} else {
 					printk("Module %d: FAILED FXS (%s)\n", x, fxshonormode ? fxo_modes[_opermode].name : "FCC");
-					wc->chans[x].sigcap = ZT_SIG_BROKEN;
+					wc->chans[x].sigcap = __ZT_SIG_FXO | ZT_SIG_BROKEN;
 				} 
 			} else if (!(ret = wctdm_init_voicedaa(wc, x, 0, 0, sane))) {
 				wc->cardflag |= (1 << x);

Modified: branches/1.4/wctdm24xxp/base.c
URL: http://svn.digium.com/view/zaptel/branches/1.4/wctdm24xxp/base.c?view=diff&rev=3383&r1=3382&r2=3383
==============================================================================
--- branches/1.4/wctdm24xxp/base.c (original)
+++ branches/1.4/wctdm24xxp/base.c Mon Dec 10 10:54:39 2007
@@ -3129,7 +3129,7 @@
 				wc->chans[x].sigcap = ZT_SIG_FXOKS | ZT_SIG_FXOLS | ZT_SIG_FXOGS | ZT_SIG_SF | ZT_SIG_EM | ZT_SIG_CLEAR;
 			else if (wc->modtype[x] == MOD_TYPE_QRV)
 				wc->chans[x].sigcap = ZT_SIG_SF | ZT_SIG_EM | ZT_SIG_CLEAR;
-		} else if (!(wc->chans[x].sigcap == ZT_SIG_BROKEN)) {
+		} else if (!(wc->chans[x].sigcap & ZT_SIG_BROKEN)) {
 			wc->chans[x].sigcap = 0;
 		}
 	}
@@ -3992,7 +3992,7 @@
 					printk("Port %d: Installed -- MANUAL FXS\n",x + 1);
 				} else {
 					printk("Port %d: FAILED FXS (%s)\n", x + 1, fxshonormode ? fxo_modes[_opermode].name : "FCC");
-					wc->chans[x].sigcap = ZT_SIG_BROKEN;
+					wc->chans[x].sigcap = ZT_SIG_BROKEN | __ZT_SIG_FXO;
 				} 
 			} else if (!(ret = wctdm_init_voicedaa(wc, x, 0, 0, sane))) {
 				wc->cardflag |= (1 << x);

Modified: branches/1.4/ztscan.c
URL: http://svn.digium.com/view/zaptel/branches/1.4/ztscan.c?view=diff&rev=3383&r1=3382&r2=3383
==============================================================================
--- branches/1.4/ztscan.c (original)
+++ branches/1.4/ztscan.c Mon Dec 10 10:54:39 2007
@@ -149,18 +149,18 @@
 					continue;
 				};
 				fprintf(stdout, "port=%d,", y);
-				if (params.sigcap == ZT_SIG_BROKEN)
-					fprintf(stdout, "FXS FAILED");
-				else switch (params.sigcap & (__ZT_SIG_FXO | __ZT_SIG_FXS)) {
+				switch (params.sigcap & (__ZT_SIG_FXO | __ZT_SIG_FXS)) {
 				case __ZT_SIG_FXO:
-					fprintf(stdout, "FXO");
+					fprintf(stdout, "FXS");
 					break;
 				case __ZT_SIG_FXS:
-					fprintf(stdout, "FXS");
+					fprintf(stdout, "FXO");
 					break;
 				default:
 					fprintf(stdout, "none");
 				}
+				if (params.sigcap & ZT_SIG_BROKEN)
+					fprintf(stdout, " FAILED");
 				fprintf(stdout, "\n");
 			}
 		}




More information about the svn-commits mailing list