openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/glib-2.0/1_2.60.3-r0/glib-2.60.3/gio/goutputstream.c
gboolean g_output_stream_set_pending(GOutputStream* stream, GError** error)
{
    g_return_val_if_fail(G_IS_OUTPUT_STREAM(stream), FALSE);

    if (stream->priv->closed)
    {
        g_set_error_literal(error, G_IO_ERROR, G_IO_ERROR_CLOSED,
                            _("Stream is already closed"));
        return FALSE;
    }

    if (stream->priv->pending)
    {
        g_set_error_literal(error, G_IO_ERROR, G_IO_ERROR_PENDING,
                            /* Translators: This is an error you get if there is
                             * already an operation running against this stream
                             * when you try to start one */
                            _("Stream has outstanding operation"));
        return FALSE;
    }

    stream->priv->pending = TRUE;
    return TRUE;
}
/**
 * g_output_stream_set_pending:
 * @stream: a #GOutputStream.
 * @error: a #GError location to store the error occurring, or %NULL to
 * ignore.
 *
 * Sets @stream to have actions pending. If the pending flag is
 * already set or @stream is closed, it will return %FALSE and set
 * @error.
 *
 * Returns: %TRUE if pending was previously unset and is now set.
 **/


Sets @stream to have actions pending. If the pending flag is
already set or @stream is closed, it will return %FALSE and set
@error.

%TRUE if pending was previously unset and is now set.
Sets @stream to have actions pending . If the pending flag is already set or @stream is closed it will return %FALSE and set @error . %TRUE if pending was previously unset and is now set .
gboolean g_output_stream_set_pending(GOutputStream* stream, GError** error)
{
    g_return_val_if_fail(G_IS_OUTPUT_STREAM(stream), FALSE);
    if (stream->priv->closed)
    {
        g_set_error_literal(error, G_IO_ERROR, G_IO_ERROR_CLOSED,
                            _("Stream is already closed"));
        return FALSE;
    }
    if (stream->priv->pending)
    {
        g_set_error_literal(error, G_IO_ERROR, G_IO_ERROR_PENDING,
                            _("Stream has outstanding operation"));
        return FALSE;
    }
    stream->priv->pending = TRUE;
    return TRUE;
}
gboolean g_output_stream_set_pending ( GOutputStream * stream , GError * * error ) { g_return_val_if_fail ( G_IS_OUTPUT_STREAM ( stream ) , FALSE ) ; if ( stream -> priv -> closed ) { g_set_error_literal ( error , G_IO_ERROR , G_IO_ERROR_CLOSED , _ ( " " ) ) ; return FALSE ; } if ( stream -> priv -> pending ) { g_set_error_literal ( error , G_IO_ERROR , G_IO_ERROR_PENDING , _ ( " " ) ) ; return FALSE ; } stream -> priv -> pending = TRUE ; return TRUE ; }
g_output_stream_set_pending:
 @stream: a #GOutputStream.
g_output_stream_set_pending : @stream : a #GOutputStream .
/* Translators: This is an error you get if there is
                             * already an operation running against this stream
                             * when you try to start one */