[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdenetwork/kppp
From:       Kevin Krammer <kevin.krammer () gmx ! at>
Date:       2007-11-25 18:51:27
Message-ID: 1196016687.440369.4623.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 741487 by krake:

State machine never completed initialization because its state variables
always got reset during the second init string (at least on my system).

Restart timeout timer for each command sent to the modem.
Not sure why the KDE3 version works dispite this.



 M  +13 -10    connect.cpp  


--- trunk/KDE/kdenetwork/kppp/connect.cpp #741486:741487
@@ -320,16 +320,19 @@
 
     QString initStr = gpppdata.modemInitStr(substate);
     if (!initStr.isEmpty()) {
-	// send a carriage return and then wait a bit so that the modem will
-	// let us issue commands.
-	if(gpppdata.modemPreInitDelay() > 0) {
-	    usleep(gpppdata.modemPreInitDelay() * 5000);
-	    writeline("");
-	    usleep(gpppdata.modemPreInitDelay() * 5000);
-	}
-	setExpect(gpppdata.modemInitResp());
-	writeline(initStr);
-	usleep(gpppdata.modemInitDelay() * 10000); // 0.01 - 3.0 sec
+      timeout_timer->stop();
+
+      // send a carriage return and then wait a bit so that the modem will
+      // let us issue commands.
+      if(gpppdata.modemPreInitDelay() > 0) {
+        usleep(gpppdata.modemPreInitDelay() * 5000);
+        writeline("");
+        usleep(gpppdata.modemPreInitDelay() * 5000);
+      }
+      setExpect(gpppdata.modemInitResp());
+      writeline(initStr);
+      timeout_timer->start(gpppdata.modemTimeout()*1000);
+      usleep(gpppdata.modemInitDelay() * 10000); // 0.01 - 3.0 sec
     }
 
     substate++;
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic