platform/upstream/glib.git
15 years agoClarify some GSocket docs
Dan Winship [Sun, 24 May 2009 00:49:47 +0000 (21:49 -0300)]
Clarify some GSocket docs

15 years agoMisc networking build fixes
Dan Winship [Mon, 27 Apr 2009 21:35:04 +0000 (17:35 -0400)]
Misc networking build fixes

http://bugzilla.gnome.org/show_bug.cgi?id=580301
http://bugzilla.gnome.org/show_bug.cgi?id=584176

15 years agoBump _WIN32_WINNT to 0x0501
Tor Lillqvist [Mon, 1 Jun 2009 11:04:49 +0000 (14:04 +0300)]
Bump _WIN32_WINNT to 0x0501

Needed to get prototypes for getaddrinfo() and friends on mingw.

15 years agoDefine fstat() for msvc build
Hans Breuer [Sat, 30 May 2009 13:33:14 +0000 (15:33 +0200)]
Define fstat() for msvc build

15 years agoUpdated msvc build files
Hans Breuer [Sat, 30 May 2009 13:29:23 +0000 (15:29 +0200)]
Updated msvc build files

15 years agoVersion resource template for gio
Hans Breuer [Sat, 30 May 2009 13:24:06 +0000 (15:24 +0200)]
Version resource template for gio

15 years agoHandle EAI_NODATA==EAI_NONAME in win32 SDK
Hans Breuer [Sat, 30 May 2009 13:18:02 +0000 (15:18 +0200)]
Handle EAI_NODATA==EAI_NONAME in win32 SDK

15 years agoInclude io.h for write() on win32
Hans Breuer [Sat, 30 May 2009 13:14:01 +0000 (15:14 +0200)]
Include io.h for write() on win32

15 years agoSimplified for pre-built package use
Hans Breuer [Sat, 30 May 2009 13:08:29 +0000 (15:08 +0200)]
Simplified for pre-built package use

15 years agoReplace FIXME with proper SDK version define
Hans Breuer [Sat, 30 May 2009 13:02:14 +0000 (15:02 +0200)]
Replace FIXME with proper SDK version define

15 years agoBump version
Matthias Clasen [Fri, 29 May 2009 03:50:48 +0000 (23:50 -0400)]
Bump version

15 years agoRelease 2.21.1 2.21.1
Matthias Clasen [Fri, 29 May 2009 03:44:48 +0000 (23:44 -0400)]
Release 2.21.1

15 years agoUpdate NEWS once more
Matthias Clasen [Fri, 29 May 2009 03:06:24 +0000 (23:06 -0400)]
Update NEWS once more

15 years agoAnother pedantic docs fix
Matthias Clasen [Thu, 28 May 2009 18:40:04 +0000 (14:40 -0400)]
Another pedantic docs fix

15 years agoRef the right type in g_socket_control_message_deserialize
Alexander Larsson [Thu, 28 May 2009 13:34:07 +0000 (15:34 +0200)]
Ref the right type in g_socket_control_message_deserialize

We were not looking at the right type at all due to a typo.

15 years agoDocument g_socket_control_message_deserialize
Alexander Larsson [Thu, 28 May 2009 13:33:52 +0000 (15:33 +0200)]
Document g_socket_control_message_deserialize

15 years agoFix string length bugs in GWinHttpFile (#580347)
Shixin Zeng [Thu, 28 May 2009 09:52:23 +0000 (12:52 +0300)]
Fix string length bugs in GWinHttpFile (#580347)

15 years agoFix make check
Matthias Clasen [Thu, 28 May 2009 04:30:21 +0000 (00:30 -0400)]
Fix make check

15 years agoUpdate for 2.21.1
Matthias Clasen [Thu, 28 May 2009 04:08:42 +0000 (00:08 -0400)]
Update for 2.21.1

15 years agoFix references to nonexisting functions
Matthias Clasen [Thu, 28 May 2009 02:44:31 +0000 (22:44 -0400)]
Fix references to nonexisting functions

15 years agoDocumentation and coding style fixups
Matthias Clasen [Wed, 27 May 2009 22:20:08 +0000 (18:20 -0400)]
Documentation and coding style fixups

Lots of pedanic changes.

15 years agoFix the an index title
Matthias Clasen [Wed, 27 May 2009 16:07:13 +0000 (12:07 -0400)]
Fix the an index title

15 years agoFix a locking problem in g_main_context_iterate()
Matthias Clasen [Wed, 27 May 2009 16:01:14 +0000 (12:01 -0400)]
Fix a locking problem in g_main_context_iterate()

We failed to ensure that the context is locked on every exit of
the function. This fixes bug 583324.

15 years agoCorrect reference and implement close_fn (#578769)
Hans Breuer [Wed, 27 May 2009 12:12:31 +0000 (15:12 +0300)]
Correct reference and implement close_fn (#578769)

Do proper referencing and unreferencing of
GWinHttpFileInputStream::file and
GWinHttpFileInputStream::file::vfs. Implement
GWinHttpFileInputStream::close_fn.

15 years agoAdd required defines on solaris for GSocket to build (#582856)
Alexander Larsson [Wed, 27 May 2009 09:11:37 +0000 (11:11 +0200)]
Add required defines on solaris for GSocket to build (#582856)

Turns out that the msg_control and related things are not defined in the
system headers unless you define some _XOPEN_SOURCE things.

15 years agoRemove mention of non-existing calls from docs
Alexander Larsson [Mon, 25 May 2009 13:46:35 +0000 (15:46 +0200)]
Remove mention of non-existing calls from docs

The docs mentions a separate seekable API for the various file streams
which don't actually exists. Change this to refer to the generic
GSeekable calls.

15 years agoDon't end enum with comma (#583663)
Alexander Larsson [Mon, 25 May 2009 10:47:12 +0000 (12:47 +0200)]
Don't end enum with comma (#583663)

This is valid C but breaks C++, so don't put it in headers.

15 years agoDon't return something from a void function (#583408)
Alexander Larsson [Mon, 25 May 2009 10:46:03 +0000 (12:46 +0200)]
Don't return something from a void function (#583408)

15 years agoAdd g_inet_address_get_native_size (#583205)
Alexander Larsson [Mon, 25 May 2009 09:33:56 +0000 (11:33 +0200)]
Add g_inet_address_get_native_size (#583205)

This can be used to get the size of g_inet_address_to_bytes().

15 years agoAdded Valencian-Catalan translation
Miquel Esplà [Sun, 24 May 2009 22:23:58 +0000 (00:23 +0200)]
Added Valencian-Catalan translation

15 years agoUpdated Spanish translation
Jorge Gonzalez [Sat, 23 May 2009 18:00:22 +0000 (20:00 +0200)]
Updated Spanish translation

15 years agoFix grammar in error message
Christian Persch [Tue, 27 May 2008 21:45:08 +0000 (23:45 +0200)]
Fix grammar in error message

Bug #583198.

15 years agoPlug a mem leak
Christian Persch [Sat, 24 May 2008 18:51:07 +0000 (20:51 +0200)]
Plug a mem leak

Bug #583196.

15 years agoAdd G_G[U]INTPTR_FORMAT and G_GINTPTR_MODIFIER
Christian Persch [Tue, 27 Jan 2009 19:39:37 +0000 (20:39 +0100)]
Add G_G[U]INTPTR_FORMAT and G_GINTPTR_MODIFIER

Add macros for printf formatting for g[u]intptr. Bug 569376.

15 years agoDocument g[u]intptr
Christian Persch [Tue, 27 Jan 2009 18:54:27 +0000 (19:54 +0100)]
Document g[u]intptr

Bug 569375.

15 years agoUse g_error_new_valist instead of a private copy of it
Christian Persch [Mon, 20 Apr 2009 11:46:09 +0000 (13:46 +0200)]
Use g_error_new_valist instead of a private copy of it

15 years agoMake g_error_new_valist public
Yeti [Mon, 20 Apr 2009 11:22:17 +0000 (13:22 +0200)]
Make g_error_new_valist public

Bug #569024.

15 years agoFix connect on win32
Alexander Larsson [Wed, 20 May 2009 14:28:20 +0000 (16:28 +0200)]
Fix connect on win32

We should not wait before calling connect for non-blocking connect.
Also, use the right error code for the nonblocking pending case on win32.

15 years agoFix build on win32
Alexander Larsson [Wed, 20 May 2009 13:59:11 +0000 (15:59 +0200)]
Fix build on win32

15 years agoDon't add unix specific APIs on win32
Alexander Larsson [Wed, 20 May 2009 13:58:28 +0000 (15:58 +0200)]
Don't add unix specific APIs on win32

15 years agoClarify g_cancellable_push_current docs wrt cancellable being NULL (#575013)
Alexander Larsson [Wed, 20 May 2009 12:55:14 +0000 (14:55 +0200)]
Clarify g_cancellable_push_current docs wrt cancellable being NULL (#575013)

15 years agoDon't dereference identifier_type if it is NULL (#579558)
Alexander Larsson [Wed, 20 May 2009 12:46:51 +0000 (14:46 +0200)]
Don't dereference identifier_type if it is NULL (#579558)

15 years agoTake a reference on the gio file monitors while signaling pending file changes
Robert Bragg [Wed, 6 May 2009 08:20:43 +0000 (09:20 +0100)]
Take a reference on the gio file monitors while signaling pending file changes

It was possible for a signal handler to remove the last reference and
dispose the monitor.  If there were remaining pending_file_changes they
tried to dereference the disposed monitor.

This patch simply calls g_object_{ref,unref} around the loop that signals
the changes.

15 years agoUse G_GSSIZE_FORMAT where needed (#577884)
Alexander Larsson [Wed, 20 May 2009 12:17:27 +0000 (14:17 +0200)]
Use G_GSSIZE_FORMAT where needed (#577884)

15 years agoPropagate errors from g_network_service_address_enumerator_next_async in its _finish...
Sjoerd Simons [Wed, 20 May 2009 11:59:50 +0000 (13:59 +0200)]
Propagate errors from g_network_service_address_enumerator_next_async in its _finish function

15 years agoTypedef GResolverClass in the standard way
Jonathon Jongsma [Tue, 19 May 2009 05:10:57 +0000 (00:10 -0500)]
Typedef GResolverClass in the standard way

It's a bit lame, but some of our C++ wrapping scripts expect objects to be
typedefed like:
    typedef struct _FooClass FooClass;
    struct {} _FooClass;

Rather than:
    typedef struct {} FooClass;

Functionally they're the same, but the former makes our lives easier in the
short term

15 years agoDon't return something from void function (#583229)
Alexander Larsson [Wed, 20 May 2009 11:49:47 +0000 (13:49 +0200)]
Don't return something from void function (#583229)

g_async_initable_init_async is void, don't return something from it.

15 years agoPreserve errno when using g_set_error with _() and g_strerror()
Christian Persch [Tue, 27 May 2008 21:44:35 +0000 (23:44 +0200)]
Preserve errno when using g_set_error with _() and g_strerror()

15 years agoUse g_set_error_literal
Christian Persch [Tue, 19 May 2009 13:03:14 +0000 (15:03 +0200)]
Use g_set_error_literal

Bug #583206.

15 years agoCheck that close_fn is not %NULL before calling (#578499)
Alexander Larsson [Wed, 20 May 2009 11:37:55 +0000 (13:37 +0200)]
Check that close_fn is not %NULL before calling (#578499)

Some streams have no close function, so this caused a crash.

15 years agodocs: fix typo
Stefan Kost [Tue, 19 May 2009 11:33:25 +0000 (14:33 +0300)]
docs: fix typo

15 years agoAdd helper functions for connecting to service (#583061)
Sjoerd Simons [Wed, 20 May 2009 10:41:50 +0000 (12:41 +0200)]
Add helper functions for connecting to service (#583061)

15 years agoIgnore SIGPIPE when using GSocket
Dan Winship [Mon, 18 May 2009 00:44:54 +0000 (20:44 -0400)]
Ignore SIGPIPE when using GSocket

http://bugzilla.gnome.org/show_bug.cgi?id=583001

15 years agoRemove non-existing parameter from docs
Alexander Larsson [Wed, 20 May 2009 10:14:04 +0000 (12:14 +0200)]
Remove non-existing parameter from docs

g_unix_socket_address_abstract_names_supported has no address argument

15 years agoAdd missing symbols to gio.symbols
Alexander Larsson [Wed, 20 May 2009 10:10:33 +0000 (12:10 +0200)]
Add missing symbols to gio.symbols

15 years agoAdd missing types to gio.types
Alexander Larsson [Wed, 20 May 2009 10:07:30 +0000 (12:07 +0200)]
Add missing types to gio.types

15 years agoRemove protocol names, instead use an enum with common protocols
Alexander Larsson [Wed, 20 May 2009 10:01:29 +0000 (12:01 +0200)]
Remove protocol names, instead use an enum with common protocols

The whole protocol name thing is pretty weird. The getprotobyname functions
seem to only specify one mapping for name <-> ids, so all families/types
must use the same values. Plus the values used for the protocols are
standardized by IANA, so are always the same.

So, we drop using names for protocols, intead introducing an enum with
a few commonly availible and used protocols.

15 years agoClarify "current condition" in g_socket_create_source docs
Alexander Larsson [Wed, 20 May 2009 09:30:43 +0000 (11:30 +0200)]
Clarify "current condition" in g_socket_create_source docs

15 years agoActually implement max_threads for GThreadedSocketService
Alexander Larsson [Wed, 20 May 2009 09:28:27 +0000 (11:28 +0200)]
Actually implement max_threads for GThreadedSocketService

15 years agoAdd support for graceful disconnect to GTcpConnection
Alexander Larsson [Wed, 20 May 2009 09:19:47 +0000 (11:19 +0200)]
Add support for graceful disconnect to GTcpConnection

15 years agoCall sync close function directly in async implementation
Alexander Larsson [Wed, 20 May 2009 09:18:34 +0000 (11:18 +0200)]
Call sync close function directly in async implementation

The g_io_stream_wrapper fails since there is already an outstanding
operation (the async close).

15 years agoAdd send-data, a g_socket_client test case
Alexander Larsson [Tue, 19 May 2009 11:44:11 +0000 (13:44 +0200)]
Add send-data, a g_socket_client test case

15 years agoSet the listen backlog before calling listen.
Alexander Larsson [Tue, 19 May 2009 10:06:29 +0000 (12:06 +0200)]
Set the listen backlog before calling listen.

If we set it after it won't be used.

15 years agoFix g_unix_socket_address_abstract_names_supported docs
Alexander Larsson [Tue, 19 May 2009 09:53:42 +0000 (11:53 +0200)]
Fix g_unix_socket_address_abstract_names_supported docs

The previous description was a cut-n-paste from another function.

15 years agoAdd g_socket_shutdown
Alexander Larsson [Tue, 19 May 2009 09:52:33 +0000 (11:52 +0200)]
Add g_socket_shutdown

15 years agoDocument GOutputVector and GInputVector
Alexander Larsson [Tue, 19 May 2009 09:27:07 +0000 (11:27 +0200)]
Document GOutputVector and GInputVector

15 years agoRename g_socket_check_pending_error to g_socket_check_connect_result
Alexander Larsson [Tue, 19 May 2009 08:57:58 +0000 (10:57 +0200)]
Rename g_socket_check_pending_error to g_socket_check_connect_result

This is only used for connect anyway, and this describes the operation
better.

15 years agoUpdate docs on listen backlog
Alexander Larsson [Tue, 19 May 2009 08:47:55 +0000 (10:47 +0200)]
Update docs on listen backlog

Mention g_socket_set_listen_backlog in g_socket_listen.
Explain that listen backlock needs to be set before calling
listen. Also verify this with a g_return_if_fail.

15 years agoRead socket state in g_socket_get_local/remote_address
Alexander Larsson [Tue, 19 May 2009 08:40:27 +0000 (10:40 +0200)]
Read socket state in g_socket_get_local/remote_address

Previously we saved the location in various places which is unnecessary
and sometimes even wrong. For instance, we saved the address we bound to
which may not have the final port set.

15 years agoClean up refereces to @protocol_id in g_socket_new docs
Alexander Larsson [Tue, 19 May 2009 08:16:32 +0000 (10:16 +0200)]
Clean up refereces to @protocol_id in g_socket_new docs

This was not fully updated from the protocol to protocol_id change.

15 years agoIgnore error when setting SO_REUSEADDR
Alexander Larsson [Mon, 18 May 2009 21:24:13 +0000 (23:24 +0200)]
Ignore error when setting SO_REUSEADDR

The main error would be "not supported" which could happen for e.g.
unix domain sockets, we don't really care, as this is mainly something
for TCP to help out a bit.

15 years agoAdd support for abstract unix socket addresses
Alexander Larsson [Mon, 18 May 2009 19:30:33 +0000 (21:30 +0200)]
Add support for abstract unix socket addresses

15 years agoAdd GError to g_socket_address_to_native
Alexander Larsson [Mon, 18 May 2009 12:10:07 +0000 (14:10 +0200)]
Add GError to g_socket_address_to_native

This is nice for some callers so they can report an error.
It is also required to support opional address types like
abstract paths for unix domain sockets.

15 years agoUpdated Spanish translation
Jorge Gonzalez [Mon, 18 May 2009 18:19:05 +0000 (20:19 +0200)]
Updated Spanish translation

15 years agoUpdate the docs for the new network APIs
Alexander Larsson [Mon, 18 May 2009 11:02:11 +0000 (13:02 +0200)]
Update the docs for the new network APIs

This imports the network APIs into the gio reference docs, and cleans
up a bunch of gtk-doc warnings and documentation issues.

15 years agoRemove gtk-doc warnings
Alexander Larsson [Mon, 18 May 2009 09:30:48 +0000 (11:30 +0200)]
Remove gtk-doc warnings

Some code was using gtk-doc comment blocks for non-gtk-doc contents, just
turn it into ordinary comments.

15 years agoAdd more internal headers for gtk-doc to ignore
Alexander Larsson [Mon, 18 May 2009 09:29:11 +0000 (11:29 +0200)]
Add more internal headers for gtk-doc to ignore

This gives less bogus output in gio-unused.txt

15 years agoMake all non-static functions start with underscore
Alexander Larsson [Mon, 18 May 2009 09:27:49 +0000 (11:27 +0200)]
Make all non-static functions start with underscore

We don't want to export a lot of non-namespaced internal symbols.

15 years agoRemove g_socket_set/get_reuse_address from header
Alexander Larsson [Mon, 18 May 2009 07:28:26 +0000 (09:28 +0200)]
Remove g_socket_set/get_reuse_address from header

These functions have been removed.

15 years agoAdd max_threads argument to g_threaded_socket_service_new
Alexander Larsson [Mon, 18 May 2009 06:47:10 +0000 (08:47 +0200)]
Add max_threads argument to g_threaded_socket_service_new

15 years agoFix error message in set_mtime_atime()
Paul Pogonyshev [Sun, 17 May 2009 12:17:57 +0000 (15:17 +0300)]
Fix error message in set_mtime_atime()

Bug #578786.

15 years agoAdd test apps for highlevel socket classes
Alexander Larsson [Fri, 15 May 2009 19:34:14 +0000 (21:34 +0200)]
Add test apps for highlevel socket classes

echo-server - simple echo server
httpd - simple http server

15 years agoAdd references to highlevel classes in GSocket docs
Alexander Larsson [Fri, 15 May 2009 19:27:54 +0000 (21:27 +0200)]
Add references to highlevel classes in GSocket docs

15 years agoImport all the highlevel socket classes from gnio
Alexander Larsson [Fri, 15 May 2009 19:26:24 +0000 (21:26 +0200)]
Import all the highlevel socket classes from gnio

15 years agoRemove unused variable
Alexander Larsson [Fri, 15 May 2009 18:58:27 +0000 (20:58 +0200)]
Remove unused variable

15 years agoInclude stdlib.h to avoid warning
Alexander Larsson [Fri, 15 May 2009 18:43:02 +0000 (20:43 +0200)]
Include stdlib.h to avoid warning

Fixes a "implicit declaration of function ‘strtol’" warning

15 years agoForgot to return the allocated data in async_op_wrapper_new
Alexander Larsson [Fri, 15 May 2009 18:42:04 +0000 (20:42 +0200)]
Forgot to return the allocated data in async_op_wrapper_new

15 years agoMake cancellable pipe fds close-on-exec
Alexander Larsson [Fri, 15 May 2009 08:42:28 +0000 (10:42 +0200)]
Make cancellable pipe fds close-on-exec

GCancellable is purely an in-process thing, so ensure that no cancellable
fds accidentally leak to child processes.

15 years agoAdd padding to new classes
Alexander Larsson [Fri, 15 May 2009 08:28:30 +0000 (10:28 +0200)]
Add padding to new classes

15 years agoAdd test apps for GSocket API
Alexander Larsson [Fri, 15 May 2009 08:08:18 +0000 (10:08 +0200)]
Add test apps for GSocket API

15 years agoFix deadlock in threaded resolver
Alexander Larsson [Fri, 15 May 2009 08:05:55 +0000 (10:05 +0200)]
Fix deadlock in threaded resolver

When you're using the threaded resolver and using a sync call
without a cancellable the resolve_sync forgot to unlock the
initial req->mutex lock, leading to a deadlock when unrefing
the request.

15 years agoStore protocol by id, add lookup function for name
Alexander Larsson [Fri, 15 May 2009 07:10:23 +0000 (09:10 +0200)]
Store protocol by id, add lookup function for name

We want to use the protocol id for lookup in the GSocketConnection
code, so we expose it. We also make GSocket store the protocol
as an int for less memory use and to allow platform specific protocols
to be specified.

Also added g_socket_protocol_id_lookup_by_name() to allow the higher
level code to specify the name by string, and g_socket_get_protocol_name()
to get it.

15 years agoMake GSocketSourceFunc return the GSocket
Alexander Larsson [Thu, 14 May 2009 14:58:47 +0000 (16:58 +0200)]
Make GSocketSourceFunc return the GSocket

This is very useful when you have multiple sockets with sources.

15 years agoSet optlen before calling getsockopt
Alexander Larsson [Thu, 14 May 2009 14:19:07 +0000 (16:19 +0200)]
Set optlen before calling getsockopt

We were sometimes failing in g_socket_check_pending_error because
we were not setting optlen on input and it was sometimes randomly
less than sizeof(int).

15 years agoImport GInitable, GSocket and dependencies from gnio
Alexander Larsson [Thu, 14 May 2009 13:26:37 +0000 (15:26 +0200)]
Import GInitable, GSocket and dependencies from gnio

This adds:
GInitable - failable object constructor interface
GAsyncInitable - async failable object constructor interface
GSocket - Platform independent lowlevel berkely socket style object
GSocketControlMessage - For passing control messages over GSocket
GUnixFDMessage - unix fd passing socket control message

Some changes were done during the import from gnio to make things
work in glib. For instance, types were moved to other headers, header
file boiler plate were updated to glib style and gio.symbols stuff
was added.

15 years agoAdd g_network_address_parse
Alexander Larsson [Thu, 14 May 2009 08:53:53 +0000 (10:53 +0200)]
Add g_network_address_parse

This is useful if you want to allow users to specify
the hostname and optionally a port.

15 years agoAdd the new GFile ops to gio.symbols
Alexander Larsson [Thu, 14 May 2009 13:32:55 +0000 (15:32 +0200)]
Add the new GFile ops to gio.symbols

This adds all the symbols related to GFile GIOStream support that was
recently added.

15 years agoAdd tests for local GIOStream GFile ops
Alexander Larsson [Wed, 13 May 2009 11:06:58 +0000 (13:06 +0200)]
Add tests for local GIOStream GFile ops

15 years agoLocal file implementation of GFileIOStream and ops
Alexander Larsson [Wed, 13 May 2009 11:03:47 +0000 (13:03 +0200)]
Local file implementation of GFileIOStream and ops

This implements all the GIOStream file ops for local files.
We use the "fallback to output stream" for all GFileIOStream ops.
Some helpers stuff was added to the local input and output streams
so they could be reused.

15 years agoAdd GIOStream operations to GFile
Alexander Larsson [Wed, 13 May 2009 11:00:26 +0000 (13:00 +0200)]
Add GIOStream operations to GFile

g_file_open_readwrite, g_file_create_readwrite, g_file_replace_readwrite
and async variants, with default implementations using threads.