[conduit/syncml: 82/244] Actually pass credentials on to libsyncml



commit 9624718e84af734e39cd4438ae5d288490d11c68
Author: John Carr <john carr unrouted co uk>
Date:   Fri Apr 24 05:27:57 2009 -0700

    Actually pass credentials on to libsyncml
---
 conduit/modules/SyncmlModule/SyncmlModule.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/conduit/modules/SyncmlModule/SyncmlModule.py b/conduit/modules/SyncmlModule/SyncmlModule.py
index e353f18..7bda0c2 100644
--- a/conduit/modules/SyncmlModule/SyncmlModule.py
+++ b/conduit/modules/SyncmlModule/SyncmlModule.py
@@ -252,6 +252,10 @@ class HttpClient(SyncmlDataProvider):
         self.syncobj = pysyncml.SyncObject.new(enums.SML_SESSION_TYPE_CLIENT, enums.SML_TRANSPORT_HTTP_CLIENT, pysyncml.byref(err))
         self.syncobj.set_option(enums.SML_TRANSPORT_CONFIG_URL, self._address_, pysyncml.byref(err))
 
+        if self.username != None and len(self.username) > 0:
+            self.syncobj.set_option(enums.SML_DATA_SYNC_CONFIG_AUTH_USERNAME, self.username, pysyncml.byref(err))
+            self.syncobj.set_option(enums.SML_DATA_SYNC_CONFIG_AUTH_PASSWORD, self.password, pysyncml.byref(err))
+
         self._session_type = enums.SML_SESSION_TYPE_CLIENT
 
     def config_setup(self, config):



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