glib/gio
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
..
fam Bug 556910 – [fam-helper.c:223]: Memory leak: sub 2008-10-24 04:04:42 +00:00
fen Remove gtk-doc warnings 2009-05-18 13:07:39 +02:00
inotify Remove gtk-doc warnings 2009-05-18 13:07:39 +02:00
libasyncns Misc networking build fixes 2009-06-01 14:21:05 -04:00
tests Fix multiple bugs in g_srv_target_list_sort() 2009-06-01 14:31:48 -04:00
win32 Updated msvc build files 2009-05-30 15:29:23 +02:00
xdgmime Misc warning fixes 2009-05-01 10:37:45 -04:00
.gitignore Bug 549771 – improved .gitignore for glib 2008-09-02 18:40:39 +00:00
abicheck.sh Fix copy-and-paste leftovers 2007-11-28 18:45:08 +00:00
ChangeLog Update README files to refer to git 2009-03-31 19:39:16 -04:00
gappinfo.c Add g_app_info_get_commandline. Requested by Hans Petter Jansson. 2008-11-28 23:16:45 +00:00
gappinfo.h Doc addition 2009-01-19 07:05:07 +00:00
gasynchelper.c Make GSocketSourceFunc return the GSocket 2009-05-14 18:12:40 +02:00
gasynchelper.h Make GSocketSourceFunc return the GSocket 2009-05-14 18:12:40 +02:00
gasyncinitable.c Fix references to nonexisting functions 2009-05-27 22:44:31 -04:00
gasyncinitable.h Import GInitable, GSocket and dependencies from gnio 2009-05-14 15:44:36 +02:00
gasyncresult.c 543504 – crash in Epiphany Web Browser: Opening local file 2008-07-20 00:34:58 +00:00
gasyncresult.h big header formatting cleanup: indentation, vtable formatting, consistent 2008-09-02 19:05:58 +00:00
gbufferedinputstream.c Bug 568723 – g_buffered_input_stream_fill_async doesn't take count == -1 2009-01-22 19:18:26 +00:00
gbufferedinputstream.h big header formatting cleanup: indentation, vtable formatting, consistent 2008-09-02 19:05:58 +00:00
gbufferedoutputstream.c Bug 568394 – dropping the last reference to a stream filter closes the 2009-01-21 14:09:56 +00:00
gbufferedoutputstream.h fix parent_class member to be GFilterOutputStreamClass (not 2008-09-02 17:30:02 +00:00
gcancellable.c Include io.h for write() on win32 2009-05-30 15:14:01 +02:00
gcancellable.h Match up parameter names to help gtk-doc 2009-05-02 23:17:29 -04:00
gcontenttype.c Don't ever sniff desktop files when the filename is known. In other words, 2009-02-20 07:46:57 +00:00
gcontenttype.h big header formatting cleanup: indentation, vtable formatting, consistent 2008-09-02 19:05:58 +00:00
gcontenttypeprivate.h gio/ docs/reference/gio Merged gio-standalone into glib. 2007-11-26 16:13:05 +00:00
gdatainputstream.c Fix docs 2009-03-01 17:12:58 +00:00
gdatainputstream.h Bug 568575 – _async functions for GDataInputStream 2009-01-28 16:39:39 +00:00
gdataoutputstream.c Include "config.h" instead of <config.h> Command used: find -name 2008-06-22 15:10:51 +00:00
gdataoutputstream.h big header formatting cleanup: indentation, vtable formatting, consistent 2008-09-02 19:05:58 +00:00
gdesktopappinfo.c Don't try to ref NULL pointer in g_desktop_app_info_dup() 2009-05-05 22:16:59 +03:00
gdesktopappinfo.h big header formatting cleanup: indentation, vtable formatting, consistent 2008-09-02 19:05:58 +00:00
gdrive.c Fix "it's" vs "its" confusion throughout the source. Patch by Will 2009-02-23 04:30:06 +00:00
gdrive.h big header formatting cleanup: indentation, vtable formatting, consistent 2008-09-02 19:05:58 +00:00
gdummyfile.c Bug 566747 - URIs opened with firefox %u load as local files 2009-02-04 08:01:42 +00:00
gdummyfile.h big header formatting cleanup: indentation, vtable formatting, consistent 2008-09-02 19:05:58 +00:00
gemblem.c cast a "char **" to "const char **" to avoid a warning. 2009-01-05 16:57:55 +00:00
gemblem.h big header formatting cleanup: indentation, vtable formatting, consistent 2008-09-02 19:05:58 +00:00
gemblemedicon.c Bug 540461 – GEmblemedIcon leak 2009-02-27 18:19:05 +00:00
gemblemedicon.h big header formatting cleanup: indentation, vtable formatting, consistent 2008-09-02 19:05:58 +00:00
gfile.c Documentation and coding style fixups 2009-05-27 18:20:08 -04:00
gfile.h Update the docs for the new network APIs 2009-05-18 13:07:43 +02:00
gfileattribute-priv.h Move GFileAttributeValue to a private header, as its sort of ugly. 2007-12-14 15:56:56 +00:00
gfileattribute.c Move hex_digits to rodata 2009-04-03 00:35:43 -04:00
gfileattribute.h Bug 554745 - GFileAttributeInfoList should be boxed 2008-10-06 21:59:29 +00:00
gfileenumerator.c Update the docs for the new network APIs 2009-05-18 13:07:43 +02:00
gfileenumerator.h big header formatting cleanup: indentation, vtable formatting, consistent 2008-09-02 19:05:58 +00:00
gfileicon.c Use P_ for translatable param spec strings 2009-04-22 16:11:38 +02:00
gfileicon.h big header formatting cleanup: indentation, vtable formatting, consistent 2008-09-02 19:05:58 +00:00
gfileinfo.c Fix "it's" vs "its" confusion throughout the source. Patch by Will 2009-02-23 04:30:06 +00:00
gfileinfo.h Fix "it's" vs "its" confusion throughout the source. Patch by Will 2009-02-23 04:30:06 +00:00
gfileinputstream.c Remove mention of non-existing calls from docs 2009-05-25 15:46:35 +02:00
gfileinputstream.h Bug 562613 – Missing const modifier in string parameters 2009-03-03 15:50:13 +00:00
gfileiostream.c Remove mention of non-existing calls from docs 2009-05-25 15:46:35 +02:00
gfileiostream.h Add GFileIOStream class 2009-05-13 14:42:46 +02:00
gfilemonitor.c Take a reference on the gio file monitors while signaling pending file changes 2009-05-20 14:23:53 +02:00
gfilemonitor.h big header formatting cleanup: indentation, vtable formatting, consistent 2008-09-02 19:05:58 +00:00
gfilenamecompleter.c gfilenamecompleter.c glocaldirectorymonitor.c gmountoperation.c 2008-08-11 19:45:08 +00:00
gfilenamecompleter.h big header formatting cleanup: indentation, vtable formatting, consistent 2008-09-02 19:05:58 +00:00
gfileoutputstream.c Remove mention of non-existing calls from docs 2009-05-25 15:46:35 +02:00
gfileoutputstream.h Bug 562613 – Missing const modifier in string parameters 2009-03-03 15:50:13 +00:00
gfilterinputstream.c Correct the grammar in some property documentation. 2009-02-06 14:08:19 +00:00
gfilterinputstream.h Bug 568394 – dropping the last reference to a stream filter closes the 2009-01-21 14:09:56 +00:00
gfilteroutputstream.c Correct the grammar in some property documentation. 2009-02-06 14:08:19 +00:00
gfilteroutputstream.h Bug 568394 – dropping the last reference to a stream filter closes the 2009-01-21 14:09:56 +00:00
gicon.c free the tokens when done with them 2008-12-12 20:59:54 +00:00
gicon.h Bug 555740 - gicon serialization Based on patch from David Zeuthen 2008-10-21 11:51:48 +00:00
ginetaddress.c Documentation and coding style fixups 2009-05-27 18:20:08 -04:00
ginetaddress.h Add g_inet_address_get_native_size (#583205) 2009-05-25 11:33:56 +02:00
ginetsocketaddress.c Fix make check 2009-05-28 00:30:21 -04:00
ginetsocketaddress.h Add network address and socket types 2009-04-22 08:36:10 -04:00
ginitable.c Documentation and coding style fixups 2009-05-27 18:20:08 -04:00
ginitable.h Documentation and coding style fixups 2009-05-27 18:20:08 -04:00
ginputstream.c Check that close_fn is not %NULL before calling (#578499) 2009-05-20 13:41:25 +02:00
ginputstream.h big header formatting cleanup: indentation, vtable formatting, consistent 2008-09-02 19:05:58 +00:00
gio-marshal.list Import all the highlevel socket classes from gnio 2009-05-15 21:26:24 +02:00
gio.h Import all the highlevel socket classes from gnio 2009-05-15 21:26:24 +02:00
gio.rc.in Version resource template for gio 2009-05-30 15:24:06 +02:00
gio.symbols Add g_inet_address_get_native_size (#583205) 2009-05-25 11:33:56 +02:00
gioenums.h Documentation and coding style fixups 2009-05-27 18:20:08 -04:00
gioenumtypes.c.template Fix typo. 2007-12-01 23:49:34 +00:00
gioenumtypes.h.template introduce an ENUMPREFIX substitution. 2008-06-23 12:06:39 +00:00
gioerror.c Import GInitable, GSocket and dependencies from gnio 2009-05-14 15:44:36 +02:00
gioerror.h big header formatting cleanup: indentation, vtable formatting, consistent 2008-09-02 19:05:58 +00:00
giomodule-priv.h Split out the extension point registration code to its own function. 2009-02-27 15:22:11 +00:00
giomodule.c Use a separate lock for extension point registration to avoid deadlock. 2009-03-02 03:50:09 +00:00
giomodule.h big header formatting cleanup: indentation, vtable formatting, consistent 2008-09-02 19:05:58 +00:00
gioscheduler.c Fix "it's" vs "its" confusion throughout the source. Patch by Will 2009-02-23 04:30:06 +00:00
gioscheduler.h big header formatting cleanup: indentation, vtable formatting, consistent 2008-09-02 19:05:58 +00:00
giostream.c Documentation and coding style fixups 2009-05-27 18:20:08 -04:00
giostream.h Import GIOStream from gnio 2009-05-13 14:42:38 +02:00
giotypes.h Documentation and coding style fixups 2009-05-27 18:20:08 -04:00
gloadableicon.c 543504 – crash in Epiphany Web Browser: Opening local file 2008-07-20 00:34:58 +00:00
gloadableicon.h big header formatting cleanup: indentation, vtable formatting, consistent 2008-09-02 19:05:58 +00:00
glocaldirectorymonitor.c gfilenamecompleter.c glocaldirectorymonitor.c gmountoperation.c 2008-08-11 19:45:08 +00:00
glocaldirectorymonitor.h big header formatting cleanup: indentation, vtable formatting, consistent 2008-09-02 19:05:58 +00:00
glocalfile.c Local file implementation of GFileIOStream and ops 2009-05-13 14:42:57 +02:00
glocalfile.h big header formatting cleanup: indentation, vtable formatting, consistent 2008-09-02 19:05:58 +00:00
glocalfileenumerator.c Add a G_IO_ERROR_TOO_MANY_OPEN_FILES error code. Requested by Olivier 2009-01-08 01:32:15 +00:00
glocalfileenumerator.h big header formatting cleanup: indentation, vtable formatting, consistent 2008-09-02 19:05:58 +00:00
glocalfileinfo.c Fix error message in set_mtime_atime() 2009-05-17 15:17:57 +03:00
glocalfileinfo.h Bug 562613 – Missing const modifier in string parameters 2009-03-03 15:50:13 +00:00
glocalfileinputstream.c Local file implementation of GFileIOStream and ops 2009-05-13 14:42:57 +02:00
glocalfileinputstream.h Local file implementation of GFileIOStream and ops 2009-05-13 14:42:57 +02:00
glocalfileiostream.c Local file implementation of GFileIOStream and ops 2009-05-13 14:42:57 +02:00
glocalfileiostream.h Local file implementation of GFileIOStream and ops 2009-05-13 14:42:57 +02:00
glocalfilemonitor.c Moved all relevant typedefs into these files. 2008-07-01 06:32:35 +00:00
glocalfilemonitor.h big header formatting cleanup: indentation, vtable formatting, consistent 2008-09-02 19:05:58 +00:00
glocalfileoutputstream.c Preserve errno when using g_set_error with _() and g_strerror() 2009-05-20 13:47:55 +02:00
glocalfileoutputstream.h Local file implementation of GFileIOStream and ops 2009-05-13 14:42:57 +02:00
glocalvfs.c Bug 561172 – gnome-open fails on local URIs with anchors 2009-03-03 19:02:16 +00:00
glocalvfs.h big header formatting cleanup: indentation, vtable formatting, consistent 2008-09-02 19:05:58 +00:00
gmemoryinputstream.c Moved all relevant typedefs into these files. 2008-07-01 06:32:35 +00:00
gmemoryinputstream.h big header formatting cleanup: indentation, vtable formatting, consistent 2008-09-02 19:05:58 +00:00
gmemoryoutputstream.c Bug 540461 – g_memory_output_stream_get_data_size() doesn't behave as 2009-02-26 15:41:29 +00:00
gmemoryoutputstream.h big header formatting cleanup: indentation, vtable formatting, consistent 2008-09-02 19:05:58 +00:00
gmount.c Update the docs for the new network APIs 2009-05-18 13:07:43 +02:00
gmount.h Update the docs for the new network APIs 2009-05-18 13:07:43 +02:00
gmountoperation.c Clarify docs 2009-02-27 21:02:19 +00:00
gmountoperation.h Add an "aborted" signal to abort a mount operation from the backend side. 2009-02-17 00:02:06 +00:00
gmountprivate.h Add is_supported() to GNativeVolumeMonitorClass so that we can avoid 2007-12-17 16:00:33 +00:00
gnativevolumemonitor.c Include "config.h" instead of <config.h> Command used: find -name 2008-06-22 15:10:51 +00:00
gnativevolumemonitor.h big header formatting cleanup: indentation, vtable formatting, consistent 2008-09-02 19:05:58 +00:00
gnetworkaddress.c Misc networking build fixes 2009-06-01 14:21:05 -04:00
gnetworkaddress.h Documentation and coding style fixups 2009-05-27 18:20:08 -04:00
gnetworkingprivate.h Misc networking build fixes 2009-06-01 14:21:05 -04:00
gnetworkservice.c Fix make check 2009-05-28 00:30:21 -04:00
gnetworkservice.h GResolver wrappers: GNetworkAddress, GNetworkService, GSocketConnectable 2009-04-22 08:36:38 -04:00
goutputstream.c Check that close_fn is not %NULL before calling (#578499) 2009-05-20 13:41:25 +02:00
goutputstream.h big header formatting cleanup: indentation, vtable formatting, consistent 2008-09-02 19:05:58 +00:00
gpollfilemonitor.c Moved all relevant typedefs into these files. 2008-07-01 06:32:35 +00:00
gpollfilemonitor.h big header formatting cleanup: indentation, vtable formatting, consistent 2008-09-02 19:05:58 +00:00
gresolver.c Misc networking build fixes 2009-06-01 14:21:05 -04:00
gresolver.h Documentation and coding style fixups 2009-05-27 18:20:08 -04:00
gseekable.c 543504 – crash in Epiphany Web Browser: Opening local file 2008-07-20 00:34:58 +00:00
gseekable.h big header formatting cleanup: indentation, vtable formatting, consistent 2008-09-02 19:05:58 +00:00
gsimpleasyncresult.c Use g_error_new_valist instead of a private copy of it 2009-05-23 17:53:01 +02:00
gsimpleasyncresult.h Add g_simple_async_result_is_valid(). Implementation by Dan Winship. 2009-01-05 06:57:16 +00:00
gsocket.c Clarify some GSocket docs 2009-06-01 14:24:44 -04:00
gsocket.h Remove protocol names, instead use an enum with common protocols 2009-05-20 12:14:50 +02:00
gsocketaddress.c Documentation and coding style fixups 2009-05-27 18:20:08 -04:00
gsocketaddress.h Add GError to g_socket_address_to_native 2009-05-18 21:31:28 +02:00
gsocketaddressenumerator.c Documentation and coding style fixups 2009-05-27 18:20:08 -04:00
gsocketaddressenumerator.h Documentation and coding style fixups 2009-05-27 18:20:08 -04:00
gsocketclient.c Documentation and coding style fixups 2009-05-27 18:20:08 -04:00
gsocketclient.h Documentation and coding style fixups 2009-05-27 18:20:08 -04:00
gsocketconnectable.c Fix make check 2009-05-28 00:30:21 -04:00
gsocketconnectable.h Documentation and coding style fixups 2009-05-27 18:20:08 -04:00
gsocketconnection.c Documentation and coding style fixups 2009-05-27 18:20:08 -04:00
gsocketconnection.h Documentation and coding style fixups 2009-05-27 18:20:08 -04:00
gsocketcontrolmessage.c Misc networking build fixes 2009-06-01 14:21:05 -04:00
gsocketcontrolmessage.h Add padding to new classes 2009-05-15 10:28:30 +02:00
gsocketinputstream.c Fix make check 2009-05-28 00:30:21 -04:00
gsocketinputstream.h Import all the highlevel socket classes from gnio 2009-05-15 21:26:24 +02:00
gsocketlistener.c Documentation and coding style fixups 2009-05-27 18:20:08 -04:00
gsocketlistener.h Remove protocol names, instead use an enum with common protocols 2009-05-20 12:14:50 +02:00
gsocketoutputstream.c Fix make check 2009-05-28 00:30:21 -04:00
gsocketoutputstream.h Import all the highlevel socket classes from gnio 2009-05-15 21:26:24 +02:00
gsocketservice.c Documentation and coding style fixups 2009-05-27 18:20:08 -04:00
gsocketservice.h Documentation and coding style fixups 2009-05-27 18:20:08 -04:00
gsrvtarget.c Fix multiple bugs in g_srv_target_list_sort() 2009-06-01 14:31:48 -04:00
gsrvtarget.h Add GResolver, a glib-ish interface to DNS 2009-04-22 08:36:32 -04:00
gtcpconnection.c Documentation and coding style fixups 2009-05-27 18:20:08 -04:00
gtcpconnection.h Add support for graceful disconnect to GTcpConnection 2009-05-20 11:19:47 +02:00
gthemedicon.c Update the docs for the new network APIs 2009-05-18 13:07:43 +02:00
gthemedicon.h big header formatting cleanup: indentation, vtable formatting, consistent 2008-09-02 19:05:58 +00:00
gthreadedresolver.c Fix deadlock in threaded resolver 2009-05-15 10:05:55 +02:00
gthreadedresolver.h Add GResolver, a glib-ish interface to DNS 2009-04-22 08:36:32 -04:00
gthreadedsocketservice.c Fix make check 2009-05-28 00:30:21 -04:00
gthreadedsocketservice.h Add max_threads argument to g_threaded_socket_service_new 2009-05-18 08:47:49 +02:00
gunionvolumemonitor.c Bug 573970 – crash in gunixvolumemonitor:update_mounts when unmounting 2009-03-04 10:45:10 +00:00
gunionvolumemonitor.h big header formatting cleanup: indentation, vtable formatting, consistent 2008-09-02 19:05:58 +00:00
gunixconnection.c Documentation and coding style fixups 2009-05-27 18:20:08 -04:00
gunixconnection.h Documentation and coding style fixups 2009-05-27 18:20:08 -04:00
gunixfdmessage.c Fix make check 2009-05-28 00:30:21 -04:00
gunixfdmessage.h Documentation and coding style fixups 2009-05-27 18:20:08 -04:00
gunixinputstream.c Use P_ for translatable param spec strings 2009-04-22 16:11:38 +02:00
gunixinputstream.h Add "fd" and "close-fd" properties including getters and setters. Patch by 2008-12-08 05:41:43 +00:00
gunixmount.c Add a GMount::pre-unmount signal 2009-05-05 14:45:18 -04:00
gunixmount.h big header formatting cleanup: indentation, vtable formatting, consistent 2008-09-02 19:05:58 +00:00
gunixmounts.c Bug 570073 – Add support for reading filesystems on Interix 2009-02-25 16:37:35 +00:00
gunixmounts.h big header formatting cleanup: indentation, vtable formatting, consistent 2008-09-02 19:05:58 +00:00
gunixoutputstream.c Use P_ for translatable param spec strings 2009-04-22 16:11:38 +02:00
gunixoutputstream.h Add "fd" and "close-fd" properties including getters and setters. Patch by 2008-12-08 05:41:43 +00:00
gunixresolver.c Misc networking build fixes 2009-06-01 14:21:05 -04:00
gunixresolver.h Add GResolver, a glib-ish interface to DNS 2009-04-22 08:36:32 -04:00
gunixsocketaddress.c Misc networking build fixes 2009-06-01 14:21:05 -04:00
gunixsocketaddress.h Add support for abstract unix socket addresses 2009-05-18 21:31:28 +02:00
gunixvolume.c Don't dereference identifier_type if it is NULL (#579558) 2009-05-20 14:46:51 +02:00
gunixvolume.h big header formatting cleanup: indentation, vtable formatting, consistent 2008-09-02 19:05:58 +00:00
gunixvolumemonitor.c Bug 573970 – crash in gunixvolumemonitor:update_mounts when unmounting 2009-03-04 10:45:10 +00:00
gunixvolumemonitor.h big header formatting cleanup: indentation, vtable formatting, consistent 2008-09-02 19:05:58 +00:00
gvfs.c Doc fixes 2008-07-21 02:19:56 +00:00
gvfs.h big header formatting cleanup: indentation, vtable formatting, consistent 2008-09-02 19:05:58 +00:00
gvolume.c Add a note about handling non-hal backends 2009-04-09 21:34:49 -04:00
gvolume.h Add an "aborted" signal to abort a mount operation from the backend side. 2009-02-17 00:02:06 +00:00
gvolumemonitor.c Fix "it's" vs "its" confusion throughout the source. Patch by Will 2009-02-23 04:30:06 +00:00
gvolumemonitor.h Deprecate g_volume_monitor_adopt_orphan_mount() (#555331). 2008-10-12 17:05:17 +00:00
gwin32appinfo.c Bug 545350 – GAppInfo deletion Bug 545351 – Reset associations for 2008-09-26 19:57:36 +00:00
gwin32appinfo.h big header formatting cleanup: indentation, vtable formatting, consistent 2008-09-02 19:05:58 +00:00
gwin32mount.c Don't unref icon if NULL. 2008-09-04 20:41:50 +00:00
gwin32mount.h big header formatting cleanup: indentation, vtable formatting, consistent 2008-09-02 19:05:58 +00:00
gwin32resolver.c Add GResolver, a glib-ish interface to DNS 2009-04-22 08:36:32 -04:00
gwin32resolver.h Add GResolver, a glib-ish interface to DNS 2009-04-22 08:36:32 -04:00
gwin32volumemonitor.c gfilenamecompleter.c glocaldirectorymonitor.c gmountoperation.c 2008-08-11 19:45:08 +00:00
gwin32volumemonitor.h big header formatting cleanup: indentation, vtable formatting, consistent 2008-09-02 19:05:58 +00:00
Makefile.am Import all the highlevel socket classes from gnio 2009-05-15 21:26:24 +02:00
makefile.msc Updated msvc build files 2009-05-30 15:29:23 +02:00
makegioalias.pl Makefile.am. build with G_DISABLE_SINGLE_INCLUDES to prevent code from 2008-05-05 15:12:13 +00:00
pltcheck.sh Fix make check 2009-05-28 00:30:21 -04:00