Blob Blame History Raw
#added support for up to 9 alternative numbers instead of 4(#178025)
#Fedora specific

diff -ru orig/wvdial.conf.5 wvdial/wvdial.conf.5
--- orig/wvdial.conf.5	2003-11-15 03:46:13.000000000 +0800
+++ wvdial/wvdial.conf.5	2006-01-16 16:19:16.000000000 +0800
@@ -78,7 +78,7 @@
 .I Phone
 The phone number you want
 .B wvdial
-to dial. You can add up to 4 other phone numbers that
+to dial. You can add up to 9 other phone numbers that
 .B wvdial
 will dial in order, by adding:
 .TP
@@ -90,6 +90,16 @@
 .TP
 .I Phone4
 .TP
+.I Phone5
+.TP
+.I Phone6
+.TP
+.I Phone7
+.TP
+.I Phone8
+.TP
+.I Phone9
+.TP
 .I Dial Prefix
 .B wvdial
 will insert this string after the dial command and before the phone number.
diff -ru orig/wvdialer.cc wvdial/wvdialer.cc
--- orig/wvdialer.cc	2003-11-15 03:46:13.000000000 +0800
+++ wvdial/wvdialer.cc	2007-01-16 16:14:59.000000000 +0800
@@ -213,7 +213,29 @@
 	    { 
 		phnum_max++;
           	if(options.phnum4.len()) 
-		    phnum_max++;
+ 		{ 
+ 		    phnum_max++;
+		    if(options.phnum5.len()) 
+		    { 
+			phnum_max++;
+			if(options.phnum6.len()) 
+			{ 
+			    phnum_max++;
+			    if(options.phnum7.len()) 
+			    { 
+				phnum_max++;
+				if(options.phnum8.len()) 
+				{ 
+				    phnum_max++;
+				    if(options.phnum9.len()) 
+				    { 
+					phnum_max++;
+				    }
+				}
+			    }
+			}
+		    }
+    		}
 	    }
 	}
     }
@@ -592,6 +612,11 @@
     	{ "Phone2",          &options.phnum2,       NULL, "",               0 },
     	{ "Phone3",          &options.phnum3,       NULL, "",               0 },
     	{ "Phone4",          &options.phnum4,       NULL, "",               0 },
+    	{ "Phone5",          &options.phnum5,       NULL, "",               0 },
+    	{ "Phone6",          &options.phnum6,       NULL, "",               0 },
+    	{ "Phone7",          &options.phnum7,       NULL, "",               0 },
+    	{ "Phone8",          &options.phnum8,       NULL, "",               0 },
+    	{ "Phone9",          &options.phnum9,       NULL, "",               0 },
     	{ "Dial Prefix",     &options.dial_prefix,  NULL, "",               0 },
     	{ "Area Code",       &options.areacode,     NULL, "",               0 },
     	{ "Dial Command",    &options.dial_cmd,     NULL, "ATDT",           0 },
@@ -874,9 +899,24 @@
             case 3:     
 		this_str = &options.phnum3;     
 		break;
-            case 4:
+            case 4:     
+		this_str = &options.phnum4;     
+		break;
+            case 5:     
+		this_str = &options.phnum5;     
+		break;
+            case 6:     
+		this_str = &options.phnum6;     
+		break;
+            case 7:     
+		this_str = &options.phnum7;     
+		break;
+            case 8:     
+		this_str = &options.phnum8;     
+		break;
+            case 9:
             default:
-                this_str = &options.phnum4;     
+                this_str = &options.phnum9;     
 		break;
         }
 
diff -ru orig/wvdialer.h wvdial/wvdialer.h
--- orig/wvdialer.h	2003-11-15 03:46:13.000000000 +0800
+++ wvdial/wvdialer.h	2006-01-16 20:12:54.000000000 +0800
@@ -103,6 +103,11 @@
 	WvString	        phnum2;
 	WvString	        phnum3;
 	WvString	        phnum4;
+	WvString	        phnum5;
+	WvString	        phnum6;
+	WvString	        phnum7;
+	WvString	        phnum8;
+	WvString	        phnum9;
 	WvString	        dial_prefix;
 	WvString	        areacode;
 	WvString	        dial_cmd;