- if (g_output_stream_is_closed (output_stream))
- {
- g_set_error (error, G_IO_ERROR, G_IO_ERROR_CLOSED,
- _("Stream is already closed"));
- return NULL;
- }
-
- if (g_output_stream_has_pending (output_stream))
- {
- g_set_error (error, G_IO_ERROR, G_IO_ERROR_PENDING,
- _("Stream has outstanding operation"));
- return NULL;
- }