From: <dg...@su...> - 2009-01-28 13:39:01
|
Author: bellmich Date: Wed Jan 28 14:37:36 2009 New Revision: 901 URL: http://libsyncml.opensync.org/changeset/901 Log: only set configuration options if they are present Modified: trunk/libsyncml/data_sync_api/transport_http_client.c trunk/libsyncml/data_sync_api/transport_http_server.c Modified: trunk/libsyncml/data_sync_api/transport_http_client.c ============================================================================== --- trunk/libsyncml/data_sync_api/transport_http_client.c Wed Jan 28 14:36:11 2009 (r900) +++ trunk/libsyncml/data_sync_api/transport_http_client.c Wed Jan 28 14:37:36 2009 (r901) @@ -33,17 +33,20 @@ smlTrace(TRACE_ENTRY, "%s(%p, %p)", __func__, dsObject, error); CHECK_ERROR_REF - if (!smlTransportSetConfigOption( + if (dsObject->url != NULL && + !smlTransportSetConfigOption( dsObject->tsp, SML_TRANSPORT_CONFIG_URL, dsObject->url, error)) goto error; - if (!smlTransportSetConfigOption( + if (dsObject->username != NULL && + !smlTransportSetConfigOption( dsObject->tsp, SML_TRANSPORT_CONFIG_USERNAME, dsObject->username, error)) goto error; - if (!smlTransportSetConfigOption( + if (dsObject->password != NULL && + !smlTransportSetConfigOption( dsObject->tsp, SML_TRANSPORT_CONFIG_PASSWORD, dsObject->password, error)) Modified: trunk/libsyncml/data_sync_api/transport_http_server.c ============================================================================== --- trunk/libsyncml/data_sync_api/transport_http_server.c Wed Jan 28 14:36:11 2009 (r900) +++ trunk/libsyncml/data_sync_api/transport_http_server.c Wed Jan 28 14:37:36 2009 (r901) @@ -29,7 +29,8 @@ smlTrace(TRACE_ENTRY, "%s(%p, %p)", __func__, dsObject, error); CHECK_ERROR_REF - if (!smlTransportSetConfigOption( + if (dsObject->url != NULL && + !smlTransportSetConfigOption( dsObject->tsp, SML_TRANSPORT_CONFIG_URL, dsObject->url, error)) |