[libsoup/gnome-3-6] soup-message: fix up add_header_handler()/add_status_handler() docs
- From: Dan Winship <danw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup/gnome-3-6] soup-message: fix up add_header_handler()/add_status_handler() docs
- Date: Thu, 10 Jan 2013 14:39:09 +0000 (UTC)
commit d7c6b9a06f8783f45f663e73f6079b80c69622fc
Author: Dan Winship <danw gnome org>
Date: Thu Dec 13 15:55:27 2012 +0100
soup-message: fix up add_header_handler()/add_status_handler() docs
soup_message_add_header_handler() and
soup_message_add_status_handler() used to have the semantics that the
handlers they added wouldn't be called if the message was cancelled by
a preceding signal handler. This feature accidentally got lost in
2.32, but no one appears to have noticed. Fix up the docs to
correspond to the current reality.
Also, fix part of the add_header_handler() docs that *never*
corresponded to reality.
libsoup/soup-message.c | 30 +++++++-----------------------
1 files changed, 7 insertions(+), 23 deletions(-)
---
diff --git a/libsoup/soup-message.c b/libsoup/soup-message.c
index 2271cd0..31ab10d 100644
--- a/libsoup/soup-message.c
+++ b/libsoup/soup-message.c
@@ -1163,11 +1163,6 @@ header_handler_metamarshal (GClosure *closure, GValue *return_value,
const char *header_name = marshal_data;
SoupMessageHeaders *hdrs;
-#ifdef FIXME
- if (priv->io_status != SOUP_MESSAGE_IO_STATUS_RUNNING)
- return;
-#endif
-
hdrs = priv->server_side ? msg->request_headers : msg->response_headers;
if (soup_message_headers_get_one (hdrs, header_name)) {
closure->marshal (closure, return_value, n_param_values,
@@ -1185,16 +1180,11 @@ header_handler_metamarshal (GClosure *closure, GValue *return_value,
* @user_data: data to pass to @handler_cb
*
* Adds a signal handler to @msg for @signal, as with
- * g_signal_connect(), but with two differences: the @callback will
- * only be run if @msg has a header named @header, and it will only be
- * run if no earlier handler cancelled or requeued the message.
- *
- * If @signal is one of the "got" signals (eg, "got_headers"), or
- * "finished" or "restarted", then @header is matched against the
- * incoming message headers (that is, the #request_headers for a
- * client #SoupMessage, or the #response_headers for a server
- * #SoupMessage). If @signal is one of the "wrote" signals, then
- * @header is matched against the outgoing message headers.
+ * g_signal_connect(), but the @callback will only be run if @msg's
+ * incoming messages headers (that is, the
+ * <literal>request_headers</literal> for a client #SoupMessage, or
+ * the <literal>response_headers</literal> for a server #SoupMessage)
+ * contain a header named @header.
*
* Return value: the handler ID from g_signal_connect()
**/
@@ -1232,11 +1222,6 @@ status_handler_metamarshal (GClosure *closure, GValue *return_value,
SoupMessage *msg = g_value_get_object (¶m_values[0]);
guint status = GPOINTER_TO_UINT (marshal_data);
-#ifdef FIXME
- if (priv->io_status != SOUP_MESSAGE_IO_STATUS_RUNNING)
- return;
-#endif
-
if (msg->status_code == status) {
closure->marshal (closure, return_value, n_param_values,
param_values, invocation_hint,
@@ -1253,9 +1238,8 @@ status_handler_metamarshal (GClosure *closure, GValue *return_value,
* @user_data: data to pass to @handler_cb
*
* Adds a signal handler to @msg for @signal, as with
- * g_signal_connect() but with two differences: the @callback will
- * only be run if @msg has the status @status_code, and it will only
- * be run if no earlier handler cancelled or requeued the message.
+ * g_signal_connect(), but the @callback will only be run if @msg has
+ * the status @status_code.
*
* @signal must be a signal that will be emitted after @msg's status
* is set. For a client #SoupMessage, this means it can't be a "wrote"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]