[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#232500: [Bug#232500: kpilot fail to install because of dependency on libmal0 which is renamed]



Le Friday 13 February 2004 à 11:06:15, Ludovic Rousseau a écrit:
> I am working, with the help of libmal author, on a patch for kpilot to
> make it use libmal1 instead of libmal0. I will send further information
> to this bug report.

I tested the patch and it works for me (compilation and execution of the
conduit).

I propose you to apply it to the Debian package. The patch will also be
sent to kpilot upstream maintainer.

Bye,

-- 
 Dr. Ludovic Rousseau                        Ludovic.Rousseau@free.fr
 -- Normaliser Unix c'est comme pasteuriser le camembert, L.R. --
--- mal-conduit.cc.orig	2004-02-12 23:10:21.490043237 -0500
+++ mal-conduit.cc	2004-02-12 23:41:25.481835606 -0500
@@ -77,6 +77,33 @@
 	return rval;
 }
  
+int32 cbTask (void *out,
+        int32 *returnErrorCode,
+        char *currentTask,
+        AGBool bufferable)
+{
+    if (currentTask) {
+        malconduit_logf ("%s\n", currentTask);
+    }
+
+    return AGCLIENT_CONTINUE;
+}
+
+static int32 cbItem (void *out,
+        int32 *returnErrorCode,
+        int32 currentItemNumber,
+        int32 totalItemCount,
+        char *currentItem)
+{
+    malconduit_logf (".");
+
+    if (currentItemNumber == totalItemCount) {
+        malconduit_logf ("\n");
+    }
+
+    return AGCLIENT_CONTINUE;
+}
+
  
 MALConduit::MALConduit(KPilotDeviceLink * o,
 	const char *n, 
@@ -84,8 +111,6 @@
 	ConduitAction(o, n, a)
 {
 	FUNCTIONSETUP;
-	register_printStatusHook(malconduit_logf);
-	register_printErrorHook(malconduit_logf);
 	conduitInstance=this;
 #ifdef DEBUG
 	DEBUGCONDUIT<<MAL_conduit_id<<endl;
@@ -190,6 +215,12 @@
 		return true;
 	}
 	
+	PalmSyncInfo* pInfo=syncInfoNew();
+	if (!pInfo) {
+		kdWarning() << k_funcinfo << ": Could not allocate SyncInfo!" << endl;
+		emit logError(i18n("MAL synchronization failed (no SyncInfo)."));
+		return false;
+	}
 	
 	// Set all proxy settings
 	switch (eProxyType) 
@@ -199,23 +230,27 @@
 #ifdef DEBUG
 			DEBUGCONDUIT<<" Using HTTP proxy server \""<<fProxyServer<<"\", Port "<<fProxyPort<<", User "<<fProxyUser<<", Password "<<( (fProxyPassword.isEmpty())?QString("not "):QString())<<"set"<<endl;
 #endif
-				setHttpProxy(const_cast<char *>(fProxyServer.latin1()));
-  			if (fProxyPort>0 && fProxyPort<65536) setHttpProxyPort( fProxyPort );
-  			else setHttpProxyPort(80);
+				// XXX not sure if this is right
+                                pInfo->httpProxy = const_cast<char *>(fProxyServer.latin1());
+  			if (fProxyPort>0 && fProxyPort<65536) pInfo->httpProxyPort = fProxyPort;
+  			else pInfo->httpProxyPort = 80;
   			
   			if (!fProxyUser.isEmpty()) 
   			{
-					setProxyUsername( const_cast<char *>(fProxyUser.latin1()) );
-					if (!fProxyPassword.isEmpty()) setProxyPassword( const_cast<char *>(fProxyPassword.latin1()) );
+					// XXX not sure if this is right
+                                        pInfo->proxyUsername = const_cast<char *>(fProxyUser.latin1());
+					// XXX not sure if this is right
+					if (!fProxyPassword.isEmpty()) pInfo->proxyPassword = const_cast<char *>(fProxyPassword.latin1());
   			}
   			break;
   		case eProxySOCKS:
   #ifdef DEBUG
   			DEBUGCONDUIT<<" Using SOCKS proxy server \""<<fProxyServer<<"\",  Port "<<fProxyPort<<", User "<<fProxyUser<<", Password "<<( (fProxyPassword.isEmpty())?QString("not "):QString() )<<"set"<<endl;
   #endif
- 			setSocksProxy( const_cast<char *>(fProxyServer.latin1()) );
-  			if (fProxyPort>0 && fProxyPort<65536) setSocksProxyPort( fProxyPort );
-  			else setSocksProxyPort(1080);
+ 			// XXX not sure if this is right
+                        pInfo->socksProxy = const_cast<char *>(fProxyServer.latin1());
+  			if (fProxyPort>0 && fProxyPort<65536) pInfo->socksProxyPort = fProxyPort;
+  			else pInfo->socksProxyPort = 1080;
   			break; 
 		default:
 			break;
@@ -223,13 +258,10 @@
 
 
 	// Now initiate the sync.
-	PalmSyncInfo* pInfo=syncInfoNew();
-	if (!pInfo) {
-		kdWarning() << k_funcinfo << ": Could not allocate SyncInfo!" << endl;
-		emit logError(i18n("MAL synchronization failed (no SyncInfo)."));
-		return false;
-	}
-	malsync( pilotSocket(), pInfo);
+        pInfo->sd = pilotSocket();
+        pInfo->taskFunc = cbTask;
+        pInfo->itemFunc = cbItem;
+	malsync(pInfo);
 	syncInfoFree(pInfo);
 
 	saveConfig();

Reply to: