rpms/wvdial/devel wvdial-1.56-remotename.patch, NONE, 1.1 wvdial-1.53-remotename.patch, 1.3, NONE

Harald Hoyer (harald) fedora-extras-commits at redhat.com
Thu Jun 28 13:36:10 UTC 2007


Author: harald

Update of /cvs/pkgs/rpms/wvdial/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31970

Added Files:
	wvdial-1.56-remotename.patch 
Removed Files:
	wvdial-1.53-remotename.patch 
Log Message:
added new patch

wvdial-1.56-remotename.patch:

--- NEW FILE wvdial-1.56-remotename.patch ---
--- wvdial-1.56/wvdial.1.remotename	2006-02-22 19:08:04.000000000 +0100
+++ wvdial-1.56/wvdial.1	2007-06-28 14:05:48.000000000 +0200
@@ -68,6 +68,12 @@
 configurations, or you want to avoid having dial-up information (usernames,
 passwords, calling card numbers, etc.) in a system wide configuration file.
 .TP
+.B \-\-remotename
+Override the Remote Name setting in the dialer configuration section of the
+configuration file. This is mainly useful when you dial to multiple systems
+with the same user name and password, and you don't want to use inheritance
+to override this setting (which is the recommended way to do it).
+.TP
 .B \-n, \-\-no\-syslog
 Don't output debug information to the syslog daemon (only useful together
 with \-\-chat).
--- wvdial-1.56/wvdialer.cc.remotename	2005-12-07 19:13:00.000000000 +0100
+++ wvdial-1.56/wvdialer.cc	2007-06-28 14:06:40.000000000 +0200
@@ -52,7 +52,8 @@
 //       WvDialer Public Functions
 //**************************************************
 
-WvDialer::WvDialer( WvConf &_cfg, WvStringList *_sect_list, bool _chat_mode )
+WvDialer::WvDialer( WvConf &_cfg, WvStringList *_sect_list, bool _chat_mode,
+                    WvString *_remote_name )
 /***************************************************************************/
 : WvStreamClone( 0 ),
     cfg(_cfg), log( "WvDial", WvLog::Debug ),
@@ -122,6 +123,12 @@
 	return;
     }
     
+    // Override configuration settings with any we got from the command-line.
+    if( _remote_name != NULL ) {
+        options.remote = *_remote_name;
+        options.remote.unique();
+    }
+
     if (options.provider.len()) 
     {
 	log( WvLog::Notice, "Dialing %s %s.\n",
@@ -1198,6 +1205,8 @@
 	options.new_pppd && options.idle_seconds >= 0 ? (const char *)idle_seconds : NULL, 
 	"logfd", buffer1,
 //	!!buffer2 ? "passwordfd" : NULL, !!buffer2 ? (const char *)buffer2 : NULL,
+	options.remote.len() ? "remotename"   : NULL,
+	options.remote.len() ? (const char *) options.remote : NULL,
 	NULL
     };
     
--- wvdial-1.56/wvdial.cc.remotename	2005-12-07 19:13:00.000000000 +0100
+++ wvdial-1.56/wvdial.cc	2007-06-28 14:04:32.000000000 +0200
@@ -76,7 +76,6 @@
     return false;
 }
 
-
 int main(int argc, char **argv)
 /********************************/
 {
@@ -96,6 +95,7 @@
     
     bool chat_mode = false;
     bool write_syslog = true;
+    WvString *remote_name = NULL;
     
     signal(SIGTERM, signalhandler);
     signal(SIGINT, signalhandler);
@@ -137,7 +140,13 @@
 	WvStringList::Iter i(remaining_args);
 	for (i.rewind(); i.next(); )
 	{
-	    if (strchr(i(), '=' ))
+	  if( !strcmp( i(), "--remotename" ) ) 
+ 	    {
+	      i.next();
+	      remote_name = new WvString(i());
+	      continue;
+ 	    }
+            else if (strchr(i(), '=' ))
 		cmdlineopts.append(new WvString(i()),true);
 	    else
 		sections.append(new WvString("Dialer %s", i()), true);
@@ -210,7 +219,7 @@
 	} 
     }
     
-    WvDialer dialer(cfg, &sections, chat_mode);
+    WvDialer dialer(cfg, &sections, chat_mode, remote_name);
     
     if (!chat_mode)
 	if (dialer.isok() && dialer.options.ask_password)
--- wvdial-1.56/wvdialer.h.remotename	2005-11-17 21:44:36.000000000 +0100
+++ wvdial-1.56/wvdialer.h	2007-06-28 13:53:04.000000000 +0200
@@ -43,7 +43,8 @@
 /***********************************/
 {
 public:
-    WvDialer( WvConf &_cfg, WvStringList *_sect_list, bool _chat_mode = false );
+    WvDialer( WvConf &_cfg, WvStringList *_sect_list, bool _chat_mode = false,
+	      WvString *_remote_name = NULL );
     virtual ~WvDialer();
    
     bool	dial();


--- wvdial-1.53-remotename.patch DELETED ---




More information about the fedora-extras-commits mailing list