2004-09-02 Mikael Hallendal <micke@imendio.com>
* loudmouth/lm-connection.c: (lm_connection_set_proxy):
- Use NULL to unset the proxy settings
* docs/reference/tmp/lm-proxy.sgml: Updated LmProxyType docs
--- a/ChangeLog Mon Aug 30 21:37:04 2004 +0000
+++ b/ChangeLog Thu Sep 02 18:17:01 2004 +0000
@@ -1,3 +1,9 @@
+2004-09-02 Mikael Hallendal <micke@imendio.com>
+
+ * loudmouth/lm-connection.c: (lm_connection_set_proxy):
+ - Use NULL to unset the proxy settings
+ * docs/reference/tmp/lm-proxy.sgml: Updated LmProxyType docs
+
2004-08-30 Mikael Hallendal <micke@imendio.com>
* Released 0.17.1
--- a/docs/reference/tmpl/lm-proxy.sgml Mon Aug 30 21:37:04 2004 +0000
+++ b/docs/reference/tmpl/lm-proxy.sgml Thu Sep 02 18:17:01 2004 +0000
@@ -35,7 +35,7 @@
The type of the proxy.
</para>
-@LM_PROXY_TYPE_NONE: Use this to unset the proxy on an #LmConnection.
+@LM_PROXY_TYPE_NONE: Unused
@LM_PROXY_TYPE_HTTP: An HTTP proxy.
<!-- ##### FUNCTION lm_proxy_new ##### -->
--- a/loudmouth/lm-connection.c Mon Aug 30 21:37:04 2004 +0000
+++ b/loudmouth/lm-connection.c Thu Sep 02 18:17:01 2004 +0000
@@ -1659,15 +1659,13 @@
* @connection: an #LmConnection
* @proxy: an #LmProxy
*
- * Sets the proxy to use for this connection. To unset pass a proxy of type
- * #LM_PROXY_TYPE_NONE to this function.
+ * Sets the proxy to use for this connection. To unset pass #NULL.
*
**/
void
lm_connection_set_proxy (LmConnection *connection, LmProxy *proxy)
{
g_return_if_fail (connection != NULL);
- g_return_if_fail (proxy != NULL);
if (lm_connection_is_open (connection)) {
g_warning ("Can't change server proxy while connected");
@@ -1679,7 +1677,7 @@
connection->proxy = NULL;
}
- if (lm_proxy_get_type (proxy) != LM_PROXY_TYPE_NONE) {
+ if (proxy && lm_proxy_get_type (proxy) != LM_PROXY_TYPE_NONE) {
connection->proxy = lm_proxy_ref (proxy);
}
}