Commit Graph

741 Commits

Author SHA1 Message Date
Alexander Larsson
0bb5739f32 Reformat g_themed_icon_get_names return type to make gtk-doc work
Seems the gtk-doc scanner needs "const gchar* const *" to work, so switching
to that.
2009-06-01 22:10:41 +02:00
Dan Winship
ce6fbd6231 Fix multiple bugs in g_srv_target_list_sort()
In particular, targets with weight 0 should be very UNlikely to be
selected, not very likely, as they were before. However, even ignoring
that bug in the logic, there was an additional bug (swapping list
items would cause the 0-weight items to get re-ordered incorrectly
anyway), and the code contained several fencepost errors.

This patch also adds gio/tests/srvtarget.c, which confirms that for a
sample list of targets, we now generate all possible correct random
sortings and no incorrect sortings, and the correct sortings occur in
roughly the expected proportions (though if the current code is
still wrong, those proportions may be wrong as well).

http://bugzilla.gnome.org/show_bug.cgi?id=583398
2009-06-01 14:31:48 -04:00
Dan Winship
1ca91a2125 Clarify some GSocket docs 2009-06-01 14:24:44 -04:00
Dan Winship
5b3d62a7a6 Misc networking build fixes
http://bugzilla.gnome.org/show_bug.cgi?id=580301
http://bugzilla.gnome.org/show_bug.cgi?id=584176
2009-06-01 14:21:05 -04:00
Tor Lillqvist
85816117e3 Bump _WIN32_WINNT to 0x0501
Needed to get prototypes for getaddrinfo() and friends on mingw.
2009-06-01 14:04:49 +03:00
Hans Breuer
75ef018248 Updated msvc build files 2009-05-30 15:29:23 +02:00
Hans Breuer
780185449f Version resource template for gio 2009-05-30 15:24:06 +02:00
Hans Breuer
73dbe591fb Handle EAI_NODATA==EAI_NONAME in win32 SDK 2009-05-30 15:18:02 +02:00
Hans Breuer
cbca0ac5d9 Include io.h for write() on win32 2009-05-30 15:14:01 +02:00
Hans Breuer
f4e89ab877 Replace FIXME with proper SDK version define 2009-05-30 15:02:14 +02:00
Matthias Clasen
62abf79be2 Another pedantic docs fix 2009-05-28 14:40:18 -04:00
Alexander Larsson
d32226da6d Ref the right type in g_socket_control_message_deserialize
We were not looking at the right type at all due to a typo.
2009-05-28 15:34:57 +02:00
Alexander Larsson
390549f6c4 Document g_socket_control_message_deserialize 2009-05-28 15:34:57 +02:00
Shixin Zeng
dbe7408a5c Fix string length bugs in GWinHttpFile (#580347) 2009-05-28 12:55:11 +03:00
Matthias Clasen
a859f883cf Fix make check 2009-05-28 00:30:21 -04:00
Matthias Clasen
576839adbe Fix references to nonexisting functions 2009-05-27 22:44:31 -04:00
Matthias Clasen
06144900ec Documentation and coding style fixups
Lots of pedanic changes.
2009-05-27 18:20:08 -04:00
Hans Breuer
209a662c2f Correct reference and implement close_fn (#578769)
Do proper referencing and unreferencing of
GWinHttpFileInputStream::file and
GWinHttpFileInputStream::file::vfs. Implement
GWinHttpFileInputStream::close_fn.
2009-05-27 15:12:31 +03:00
Alexander Larsson
f99be75ff9 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.
2009-05-25 15:46:35 +02:00
Alexander Larsson
3c0feca7f1 Don't end enum with comma (#583663)
This is valid C but breaks C++, so don't put it in headers.
2009-05-25 12:47:12 +02:00
Alexander Larsson
c93c98732a Don't return something from a void function (#583408) 2009-05-25 12:46:03 +02:00
Alexander Larsson
ce171195d9 Add g_inet_address_get_native_size (#583205)
This can be used to get the size of g_inet_address_to_bytes().
2009-05-25 11:33:56 +02:00
Christian Persch
54b43229f4 Use g_error_new_valist instead of a private copy of it 2009-05-23 17:53:01 +02:00
Alexander Larsson
14d53dcfa8 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.
2009-05-20 16:40:55 +02:00
Alexander Larsson
bb66fdcce3 Fix build on win32 2009-05-20 16:40:54 +02:00
Alexander Larsson
c897cca601 Don't add unix specific APIs on win32 2009-05-20 16:40:54 +02:00
Alexander Larsson
5a46e4d140 Clarify g_cancellable_push_current docs wrt cancellable being NULL (#575013) 2009-05-20 14:55:14 +02:00
Alexander Larsson
ab29e09dac Don't dereference identifier_type if it is NULL (#579558) 2009-05-20 14:46:51 +02:00
Robert Bragg
d0d10e847f 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.
2009-05-20 14:23:53 +02:00
Alexander Larsson
6a9df8256a Use G_GSSIZE_FORMAT where needed (#577884) 2009-05-20 14:17:27 +02:00
Sjoerd Simons
7498049a16 Propagate errors from g_network_service_address_enumerator_next_async in its _finish function 2009-05-20 13:59:50 +02:00
Jonathon Jongsma
2be66c0458 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
2009-05-20 13:58:13 +02:00
Alexander Larsson
cb7a300e31 Don't return something from void function (#583229)
g_async_initable_init_async is void, don't return something from it.
2009-05-20 13:49:47 +02:00
Christian Persch
1cbdd2495d Preserve errno when using g_set_error with _() and g_strerror() 2009-05-20 13:47:55 +02:00
Christian Persch
80cfd099f3 Use g_set_error_literal
Bug #583206.
2009-05-20 13:46:39 +02:00
Alexander Larsson
c20b8d4d53 Check that close_fn is not %NULL before calling (#578499)
Some streams have no close function, so this caused a crash.
2009-05-20 13:41:25 +02:00
Sjoerd Simons
9033b37589 Add helper functions for connecting to service (#583061) 2009-05-20 12:41:50 +02:00
Dan Winship
25800ed4a3 Ignore SIGPIPE when using GSocket
http://bugzilla.gnome.org/show_bug.cgi?id=583001
2009-05-20 12:32:58 +02:00
Alexander Larsson
2ea22d8f46 Remove non-existing parameter from docs
g_unix_socket_address_abstract_names_supported has no address argument
2009-05-20 12:14:55 +02:00
Alexander Larsson
9d36c86f8a Add missing symbols to gio.symbols 2009-05-20 12:14:55 +02:00
Alexander Larsson
5cd86fbda6 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.
2009-05-20 12:14:50 +02:00
Alexander Larsson
6d01593b06 Clarify "current condition" in g_socket_create_source docs 2009-05-20 11:30:43 +02:00
Alexander Larsson
8088182644 Actually implement max_threads for GThreadedSocketService 2009-05-20 11:28:27 +02:00
Alexander Larsson
053f9e72b1 Add support for graceful disconnect to GTcpConnection 2009-05-20 11:19:47 +02:00
Alexander Larsson
f061765e54 Call sync close function directly in async implementation
The g_io_stream_wrapper fails since there is already an outstanding
operation (the async close).
2009-05-20 11:18:34 +02:00
Alexander Larsson
fdfdec36d0 Add send-data, a g_socket_client test case 2009-05-19 13:44:11 +02:00
Alexander Larsson
18373cfbe8 Set the listen backlog before calling listen.
If we set it after it won't be used.
2009-05-19 12:06:29 +02:00
Alexander Larsson
64383fa3d9 Fix g_unix_socket_address_abstract_names_supported docs
The previous description was a cut-n-paste from another function.
2009-05-19 11:53:42 +02:00
Alexander Larsson
0ffe722193 Add g_socket_shutdown 2009-05-19 11:52:33 +02:00
Alexander Larsson
03441e724a Document GOutputVector and GInputVector 2009-05-19 11:27:07 +02:00