Projects
Extra
gtk-gnutella
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 5
View file
gtk-gnutella.changes
Changed
@@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Sun Feb 12 08:37:02 UTC 2017 - olaf@aepfle.de + +- Update to 1.1.11 + +------------------------------------------------------------------- Sun May 8 15:15:13 UTC 2016 - aloisio@gmx.com - Update to 1.1.9
View file
gtk-gnutella.spec
Changed
@@ -17,7 +17,7 @@ Name: gtk-gnutella -Version: 1.1.9 +Version: 1.1.11 Release: 0.pm.1 Summary: Gnutella Peer to Peer Client License: GPL-2.0+ (GPL-2.0+) @@ -25,6 +25,7 @@ Url: http://gtk-gnutella.sourceforge.net/ Source: http://prdownloads.sourceforge.net/gtk-gnutella/gtk-gnutella-%{version}.tar.bz2 Source1: %{name}.changes +Patch0: gtk-gnutella.enum-msg.patch BuildRequires: dbus-1-devel BuildRequires: dbus-1-glib-devel BuildRequires: gcc @@ -47,6 +48,7 @@ %prep %setup -q +%patch0 -p1 # fix builddate info # Remove build time references so build-compare can do its work FAKE_BUILDTIME=$(LC_ALL=C date -u -r %{SOURCE1} '+%%H:%%M')
View file
gtk-gnutella.enum-msg.patch
Added
@@ -0,0 +1,11 @@ +--- a/scripts/enum-msg.pl ++++ b/scripts/enum-msg.pl +@@ -290,7 +290,7 @@ sub create_file { + my $time = scalar localtime; + print $fd <<EOC; + /* +- * Generated on $time by $me -- DO NOT EDIT ++ * Generated by $me -- DO NOT EDIT + * + * Command: $0 $input + */
View file
gtk-gnutella-1.1.9.tar.bz2/ChangeLog -> gtk-gnutella-1.1.11.tar.bz2/ChangeLog
Changed
@@ -1,3 +1,111 @@ +# v 1.1.11 2016-11-11 stable + +This release fixes a portability issue on FreeBSD and introduces a main core +feature and minor new GUI features. + +The main feature is the additiona of "equivalence classes" defining word +aliases, used when sharing files and querying for them. + +Currently, the only supported equivalence class deals with naming of series. +Indeed, there are various conventions that can be used to represent these, +and it makes searching inefficient: either one will lookup for all the +possible variations, or one will miss some of the files. + +For instance, episode #8 of an hypothetical season #4 can be represented by +any of these strings: + + { "s04e08", "4x08", "408", "04x08", "0408" } + +Thanks to the equivalence class, a file bearing one of these strings can +be searched for (and located successfully) by using any of the other strings. +Of course, since this is a local processing, the more servents out there are +deployed with this aliasing support, the more efficient the feature becomes! + +There are also new GUI features: the "Clear completed" button from the Download +pane is now doing someething useful, and the current page of different notebooks +is remembered across sessions. The only one which is not restored on normal +resuming is the main notebook tab. It will be restored if GTKG is restarted +after a crash, but otherwise the application will always start up within the +Network tab. + +In the Uploads tab, upload requests coming from a G2 servent will not be +flagged with a "G2" tab right after the IP address. This helps seeing how +the Gnutella and G2 network unification is evolving. + +New Features: +- Flag uploads coming from G2 servents with a "G2" tag after IP address. +- Added alias support in sharing/querying. +- Made the "Clear completed" button in Downloads/Tools do something useful. +- Moved "Clear completed" button to the bottom right of the download pane. +- Remember fileinfo notebook tab number across sessions. +- Remember main notebook tab number across sessions, only restored after crash. +- Remember Gnet stats notebook tab number across sessions. +- Remember download info / tools notebook tab number across sessions. + +Improvements: +- Added --cleanup to explicitly request for final memory cleanup sequence. +- Updated Italian translation. +- Updated GeoIP databases. + +Bug Fixes: +- Leaf nodes could end-up being connected to more ultrapeers than configured. +- Fixed monitoring of alien threads, important when GTK file selector is used. + +Under the Hood: +- Debian compatibility level changed from 4 to 5. +- Make sure we can deal with older pkg-config, which needs leading arguments. +- Use "embedded" symbols for xmalloc(), xfree() and friends. +- Added "query_trace" property to trace all queries which were searched. +- Moved halloc-based string functions like h_strdup() to dedicated hstrfn.c. +- Expanded search mask to 64 bits to be able to hold all digits and letters. +- Count aliased queries and hits from aliases. +- Pre-compute shared file media type at record creation time. +- Pass query limits to st_search() to avoid needless pattern matching. +- Added h_strsplit() and h_strsplit_set(). +- Added strvec_append_with() to expand vector by appending another vector. +- crash_assert_logv(): don't call crash_mode() if assert failure was recorded. +- entropy_clock_time(): mix the entropy nonce through hashing for more diffusion. +- node_can_accept_connection(): only send headers back when handshaking. +- qrp_add_file(): optimized to avoid computing word length if not required. +- thread_stack_check_overflow(): ignore virtual addresses outside stack range. +- vmm_init_once(): ensure any shared library for stacktrace unwinding is loaded. + +# v 1.1.10 2016-09-01 stable + +This is mostly a bug-fixing release and should be the last update on the +1.1.x release tree, before important core changes in the upcoming 1.2. + +Improvements: +- FAQ cleanups. +- Added the ".ape" file extension to the default list of shared files. +- Remember hosts to which a TCP connection failed recently to avoid hammering. +- Updated French and Turkish translations. +- Updated GeoIP databases. + +Bug Fixes: +- Don't embed build date if SOURCE_DATE_EPOCH is set for reproducibile builds. +- Missed ":" in variable substitution request, in scripts/nm-list +- nm-list: fixed date computation on BSD systems. + +Under the Hood: +- Need TLS 2.12 to generate an X.509 self-signed certificate. +- Added G_PRINTF() hint to tls_logfmt() and tls_cert_log() to avoid warnings. +- Fixed CPP file inclusion protection symbol for lib/mime_type.h. +- Added the "ape" MIME type linked to the ".ape" file extension. +- Ensure we do not suspend threads during an interrupt. +- Track where context was taken in our setjmp wrappers to ease debugging. +- Keep track of "once" initializations in case we end-up recursing. +- Trace which new lock is overflowing the lock stack. +- once: make sure we can insert routine in our tracking table. +- once: arbitrarily limit nesting level in one thread to 32. +- dht_update_size_estimate(): return if our KUID was not initialized yet. +- keys_reclaim(): we can have values attached to key if we can remove it. +- symbols_load_from(): must release write lock when falling back to pre-computed. +- thread_element_block_until(): was not checking for concurrent unblocking. +- thread_element_block_until(): revisited signal handling. +- thread_suspend_others(): don't wait for busy threads already marked suspended. +- walloc: prevent race condition on walloc_stopped being set. + # v 1.1.9 2016-03-06 stable This is mostly a bug-fixing release.
View file
gtk-gnutella-1.1.9.tar.bz2/Configure -> gtk-gnutella-1.1.11.tar.bz2/Configure
Changed
@@ -16,9 +16,9 @@ # The dist package (which contains metaconfig) is available via SVN: # svn co https://svn.code.sf.net/p/dist/code/trunk/dist -# $Id: Head.U 167 2013-05-08 17:58:00Z rmanfredi $ +# $Id$ # -# Generated on Sat Jan 23 12:12:15 CET 2016 metaconfig 3.5-200 +# Generated on Wed Oct 26 14:27:45 CEST 2016 metaconfig 3.5-203 cat >c1$$ <<EOF ARGGGHHHH!!!!! @@ -1051,7 +1051,7 @@ esac shift ;; - -V) echo "$me generated by metaconfig 3.5-200." >&2 + -V) echo "$me generated by metaconfig 3.5-203." >&2 exit 0;; --) break;; -*) echo "$me: unknown option $1" >&2; shift; error=true;; @@ -9453,6 +9453,7 @@ echo " " echo "Checking how we can gather information about GLib..." >&4 d_glib="$undef" +version= if "$glibversion" = 1 && glib-config --cflags >/dev/null 2>&1 ; then glibconfig='glib-config' @@ -9460,16 +9461,26 @@ elif pkg-config $glibpackage --cflags >/dev/null 2>&1; then glibconfig="pkg-config $glibpackage" modver=--modversion +elif pkg-config --cflags $glibpackage >/dev/null 2>&1; then + version=`pkg-config --version` + echo "(You have a weird pkg-config, version $version)" + glibcflags=`pkg-config --cflags $glibpackage` + glibldflags=`pkg-config --libs $glibpackage` + version=`pkg-config --modversion $glibpackage | head -1` else echo "You've got problems! Do you have GLib installed?" >&4 glibconfig='false' modver='' fi -echo "(I'll use '$glibconfig' to gather that information.)" -glibcflags=`$glibconfig --cflags` -glibldflags=`$glibconfig --libs` -version=`$glibconfig $modver` +case "$version" in +'') + echo "(I'll use '$glibconfig' to gather that information.)" + glibcflags=`$glibconfig --cflags` + glibldflags=`$glibconfig --libs` + version=`$glibconfig $modver | head -1` + ;; +esac echo " " echo "Checking whether glib.h can be compiled against..." >&4 $cat >try.c <<EOC @@ -9490,16 +9501,12 @@ $cat >>try.c <<EOC #endif -#if $glibversion >= 2 -#include <glib-object.h> -#endif - int main(void) { gpointer p; #if $glibversion >= 2 - p = g_object_new(G_TYPE_OBJECT, "blah", (void *) 0); + p = g_string_overwrite_len(NULL, 0, NULL, 0); #else p = g_malloc(23); #endif @@ -9521,6 +9528,7 @@ : how can we find information about GTK? d_gtk="$undef" +version= case "$d_headless" in "$define") gtkcflags="$glibcflags" @@ -9535,13 +9543,25 @@ elif pkg-config $gtkpackage --cflags >/dev/null 2>&1; then gtkconfig="pkg-config $gtkpackage" modver=--modversion +elif pkg-config --cflags $gtkpackage >/dev/null 2>&1; then + version=`pkg-config --version` + echo "(You have a weird pkg-config, version $version)" + gtkcflags=`pkg-config --cflags $gtkpackage` + gtkldflags=`pkg-config --libs $gtkpackage` + version=`pkg-config --modversion $gtkpackage | head -1` else echo "You've got problems! Do you have GTK+ installed?" >&4 gtkconfig='false' modver='' fi -echo "(I'll use '$gtkconfig' to gather that information.)" -version=`$gtkconfig $modver` +case "$version" in +'') + echo "(I'll use '$gtkconfig' to gather that information.)" + gtkcflags=`$gtkconfig --cflags` + gtkldflags=`$gtkconfig --libs` + version=`$gtkconfig $modver | head -1` + ;; +esac case "$gtkversion" in 1) case "$version" in @@ -9578,8 +9598,6 @@ exit 1 ;; esac -gtkcflags=`$gtkconfig --cflags` -gtkldflags=`$gtkconfig --libs` missing=false allok=true for flag in "$glibcflags"; do @@ -10711,7 +10729,7 @@ $cat <<EOH Your yacc program may need extra flags to normally process the parser sources. -Do NOT specify any -d or -v flags here, since those are explicitely known +Do NOT specify any -d or -v flags here, since those are explicitly known by the various Makefiles. However, if your machine has strange/undocumented options (like -Sr# on SCO to specify the maximum number of grammar rules), then please add them here. To use no flags, specify the word "none".
View file
gtk-gnutella-1.1.9.tar.bz2/MANIFEST -> gtk-gnutella-1.1.11.tar.bz2/MANIFEST
Changed
@@ -284,6 +284,8 @@ src/common.h src/core/Jmakefile src/core/Makefile.SH +src/core/alias.c +src/core/alias.h src/core/alive.c src/core/alive.h src/core/ban.c @@ -648,6 +650,8 @@ src/lib/atomic.h src/lib/atoms.c src/lib/atoms.h +src/lib/balloc.c +src/lib/balloc.h src/lib/barrier.c src/lib/barrier.h src/lib/base16.c @@ -826,6 +830,8 @@ src/lib/hikset.h src/lib/host_addr.c src/lib/host_addr.h +src/lib/hstrfn.c +src/lib/hstrfn.h src/lib/html.c src/lib/html.h src/lib/html_entities.h @@ -907,6 +913,7 @@ src/lib/patricia.h src/lib/pattern.c src/lib/pattern.h +src/lib/pcell.h src/lib/plist.c src/lib/plist.h src/lib/pmsg.c
View file
gtk-gnutella-1.1.9.tar.bz2/README -> gtk-gnutella-1.1.11.tar.bz2/README
Changed
@@ -60,8 +60,6 @@ It is released under the GNU General Public License (GPL). For further information on Gnutella, try: - http://www.the-gdf.com/ - http://www.infoanarchy.org/wiki/wiki.pl?Gnutella http://rfc-gnutella.sourceforge.net/ The gtk-gnutella Home Page is:
View file
gtk-gnutella-1.1.9.tar.bz2/U/packages/glibconfig.U -> gtk-gnutella-1.1.11.tar.bz2/U/packages/glibconfig.U
Changed
@@ -23,6 +23,7 @@ echo " " echo "Checking how we can gather information about GLib..." >&4 d_glib="$undef" +version= if "$glibversion" = 1 && glib-config --cflags >/dev/null 2>&1 ; then glibconfig='glib-config' @@ -30,19 +31,30 @@ elif pkg-config $glibpackage --cflags >/dev/null 2>&1; then glibconfig="pkg-config $glibpackage" modver=--modversion +elif pkg-config --cflags $glibpackage >/dev/null 2>&1; then + version=`pkg-config --version` + echo "(You have a weird pkg-config, version $version)" +?X: this weird pkg-config (older than 0.29?) needs --cflags and --libs first + glibcflags=`pkg-config --cflags $glibpackage` + glibldflags=`pkg-config --libs $glibpackage` + version=`pkg-config --modversion $glibpackage | head -1` else echo "You've got problems! Do you have GLib installed?" >&4 glibconfig='false' modver='' fi -echo "(I'll use '$glibconfig' to gather that information.)" -glibcflags=`$glibconfig --cflags` -glibldflags=`$glibconfig --libs` +case "$version" in +'') + echo "(I'll use '$glibconfig' to gather that information.)" + glibcflags=`$glibconfig --cflags` + glibldflags=`$glibconfig --libs` + version=`$glibconfig $modver | head -1` + ;; +esac ?X: ?X: check that we've got the version they asked for ?X: -version=`$glibconfig $modver` echo " " echo "Checking whether glib.h can be compiled against..." >&4 $cat >try.c <<EOC @@ -63,16 +75,13 @@ $cat >>try.c <<EOC #endif -#if $glibversion >= 2 -#include <glib-object.h> -#endif - int main(void) { gpointer p; #if $glibversion >= 2 - p = g_object_new(G_TYPE_OBJECT, "blah", (void *) 0); +?X: g_string_overwrite_len() present in GLib since 2.14 + p = g_string_overwrite_len(NULL, 0, NULL, 0); #else p = g_malloc(23); #endif
View file
gtk-gnutella-1.1.9.tar.bz2/U/packages/gtkconfig.U -> gtk-gnutella-1.1.11.tar.bz2/U/packages/gtkconfig.U
Changed
@@ -21,6 +21,7 @@ ?T:modver version vint flag missing allok : how can we find information about GTK? d_gtk="$undef" +version= case "$d_headless" in "$define") ?X: Since there is no GUI, simply include the GLib flags @@ -37,14 +38,27 @@ elif pkg-config $gtkpackage --cflags >/dev/null 2>&1; then gtkconfig="pkg-config $gtkpackage" modver=--modversion +elif pkg-config --cflags $gtkpackage >/dev/null 2>&1; then + version=`pkg-config --version` + echo "(You have a weird pkg-config, version $version)" +?X: this weird pkg-config (older than 0.29?) needs --cflags and --libs first + gtkcflags=`pkg-config --cflags $gtkpackage` + gtkldflags=`pkg-config --libs $gtkpackage` + version=`pkg-config --modversion $gtkpackage | head -1` else echo "You've got problems! Do you have GTK+ installed?" >&4 gtkconfig='false' modver='' fi -echo "(I'll use '$gtkconfig' to gather that information.)" +case "$version" in +'') + echo "(I'll use '$gtkconfig' to gather that information.)" + gtkcflags=`$gtkconfig --cflags` + gtkldflags=`$gtkconfig --libs` + version=`$gtkconfig $modver | head -1` + ;; +esac ?X: check that we've got the version they asked for -version=`$gtkconfig $modver` case "$gtkversion" in 1) case "$version" in @@ -81,8 +95,6 @@ exit 1 ;; esac -gtkcflags=`$gtkconfig --cflags` -gtkldflags=`$gtkconfig --libs` ?X: ?X: Make sure all the GLib C flags are included, append all if any missing. ?X:
View file
gtk-gnutella-1.1.9.tar.bz2/config_h.SH -> gtk-gnutella-1.1.11.tar.bz2/config_h.SH
Changed
@@ -31,7 +31,7 @@ * that running config_h.SH again will wipe out any changes you've made. * For a more permanent change edit $CONFIG_SH and rerun config_h.SH. * - * \$Id: Config_h.U 167 2013-05-08 17:58:00Z rmanfredi $ + * \$Id$ */ /* @@ -437,7 +437,7 @@ #$d_getuid HAS_GETUID /* HAS_GNULIBC: - * This symbol, if defined, indicates to the C program that + * This symbol, if defined, indicates to the C program that * the GNU C library is being used. A better check is to use * the __GLIBC__ and __GLIBC_MINOR__ symbols supplied with glibc. */ @@ -485,7 +485,7 @@ #$d_ipv6 HAS_IPV6 /**/ /* HAS_ISASCII: - * This manifest constant lets the C program know that isascii + * This manifest constant lets the C program know that isascii * is available. */ #$d_isascii HAS_ISASCII /**/ @@ -761,8 +761,12 @@ */ #$d_sigprocmask HAS_SIGPROCMASK /**/ -/* Sigjmp_buf: - * This is the buffer type to be used with Sigsetjmp and Siglongjmp. +/* HAS_SIGSETJMP: + * This variable indicates to the C program that the sigsetjmp() + * routine is available to save the calling process's registers + * and stack environment for later use by siglongjmp(), and + * to optionally save the process's signal mask. See + * Sigjmp_buf, Sigsetjmp, and Siglongjmp. */ /* Sigsetjmp: * This macro is used in the same way as sigsetjmp(), but will invoke
View file
gtk-gnutella-1.1.9.tar.bz2/debian/changelog -> gtk-gnutella-1.1.11.tar.bz2/debian/changelog
Changed
@@ -1,3 +1,15 @@ +gtk-gnutella (1.1.11-1) unstable; urgency=medium + + * Bug-fixing release from upstream. + + -- Raphael Manfredi <Raphael_Manfredi@pobox.com> Fri, 11 Nov 2016 13:39:44 +0000 + +gtk-gnutella (1.1.10-1) unstable; urgency=medium + + * Bug-fixing release from upstream. + + -- Raphael Manfredi <Raphael_Manfredi@pobox.com> Thu, 1 Sep 2016 08:02:01 +0000 + gtk-gnutella (1.1.9-1) unstable; urgency=medium * Bug-fixing release from upstream.
View file
gtk-gnutella-1.1.9.tar.bz2/debian/compat -> gtk-gnutella-1.1.11.tar.bz2/debian/compat
Changed
@@ -1,1 +1,1 @@ -4 +5
View file
gtk-gnutella-1.1.9.tar.bz2/extra_files/en/FAQ -> gtk-gnutella-1.1.11.tar.bz2/extra_files/en/FAQ
Changed
@@ -37,12 +37,12 @@ <li><a href="#gnet7">Why doesn't my HTTP proxy work?</a></li> <li><a href="#gnet8">How can I increase the timeouts?</a></li> <li><a href="#gnet-auto">How does auto mode decide between ultra and leaf?</a></li> + <li><a href="#gnet-cache">I am running as ultrapeer, why GTKG keeps struggling to reach the maximum number of connected ultrapeers while the number of connected leaves is steadily close to 100%?</a></li> </ul> <h2>Searches</h2> <ul> <li><a href="#search0">How can I get more results?</a></li> - <li><a href="#search3">How can I ignore files with no SHA1?</a></li> <li><a href="#search-entry">Where did the search entry box go?</a></li> <li><a href="#search-passive">What are "Passive" searches?</a></li> <li><a href="#search-local">How can I copy the magnet link of a file I'm sharing?</a></li> @@ -295,6 +295,11 @@ bytes/s per gnet connection available.</li> </ol> + <h3><a name="gnet-cache">I am running as ultrapeer, why GTKG keeps struggling to reach the maximum number of connected ultrapeers while the number of connected leaves is steadily close to 100%?</a></h3> + <p> + There could be mainly two reasons for such behavior: 1) there is an overall shortage of ultrapeers on Gnutella network, 2) you are experiencing outgoing connection problems. The latter is the more likely explanation. When running as ultrapeer, many leaves try to connect to you. Similarly, a relatively smaller number of ultrapeers is trying to connect to you. Also, you are trying to connect to other ultrapeers but not to leaves. If your outgoing connection is poor (saturated bandwidth, provider having problems, etc) you will be unable to connect to some ultrapeers, so their IP addresses is removed from your local ultrapeer host cache. Probably you also noticed that in the cache page the regular host cache gradually reaches its maximum, while the ultrapeers hosts cache is much emptier and sometimes the number of nodes decreases instead of increasing. Actually there is not much you can do. Try to reduce the number of concurrent connections and/or the number of ultrapeers and leaves connection slots; alternatively run in leaf mode. + </p> + <h2>Searches</h2> @@ -303,12 +308,6 @@ to connect to you (see <a href="#gnet1">port forwarding</a>) and on the <a href="#gnet0">number of connections</a> to other hosts.</p> - <h3><a name="search3">How can I ignore files with no SHA1?</a></h3> - <p>Click with right mouse button on a search result without a SHA1 and - select "Drop results...->with the same urn:sha1" from the popup menu. - That will drop all results with this SHA1 - in this case none - from your - results. You'll miss a lot of spam.</p> - <h3><a name="search-entry">Where did the search entry box go?</a></h3> <p>Searches are now entered in the <q><em>Search:</em></q> box in the sidebar.</p>
View file
gtk-gnutella-1.1.9.tar.bz2/extra_files/en/glossary -> gtk-gnutella-1.1.11.tar.bz2/extra_files/en/glossary
Changed
@@ -19,7 +19,7 @@ <h3>Bootstrap</h3> <p> - The process of joining the Gnutella network by discovering peers is called bootstrapping. More informations <a href="?page=bootstrap">here</a>. + The process of joining the Gnutella network by discovering peers is called bootstrapping. </p> @@ -27,8 +27,6 @@ <p> A <em>bucket</em> is a portion of the node ID space covered by the routing table. Each bucket can only hold K nodes, currently eight, before becoming "full". When a bucket is full of known good nodes, no more nodes may be added unless our own node ID falls within the range of the bucket. In that case, the bucket is replaced by two new buckets each with half the range of the old bucket and the nodes from the old bucket are distributed among the two new ones. This is called "bucket SPLIT". The opposite operation involving buckets is called MERGE.<br /> Every node maintains a routing table of known good nodes. The nodes in the routing table are used as starting points for queries in the DHT. Nodes from the routing table are returned in response to queries from other nodes. It is important that each node's routing table must contain only known good nodes. A good node is a node has responded to one of our queries within the last 15 minutes. A node is also good if it has ever responded to one of our queries and has sent us a query within the last 15 minutes. After 15 minutes of inactivity, a node becomes questionable. Nodes become bad when they fail to respond to multiple queries in a row. Nodes that we know are good are given priority over nodes with unknown status.<br /> - - The above informations have been readapted from <a href="http://www.bittorrent.org/beps/bep_0005.html" target="_blank">BitTorrent DHT protocol</a> where more details can be found. </p> @@ -66,6 +64,12 @@ <h2>F</h2> +<h3>Flow Control (FC) mode</h3> + +<p> + Servents pile outgoing packets in a queue where they are broadcasted in a first-in-first-out (FIFO) mode. If outgoing bandwidth is small and many packets need to be broadcasted, the queue gets overloaded and the servent enters in <em>Flow Control (FC) mode</em>. While in FC mode all incoming queries on the connection are dropped. Of course servents should avoid entering FC mode by being granted more bandwidth or reducing the number of connected nodes. +</p> + <h3>Flooding</h3> <p> @@ -86,7 +90,7 @@ <h3>GGEP</h3> <p> - Gnutella Generic Extension Protocol (GGEP) includes new functions added to the original Gnutella 0.4 protocol: more informations <a href="http://rfc-gnutella.sourceforge.net/src/GnutellaGenericExtensionProtocol.0.51.html" target="_blank">here</a>. + Gnutella Generic Extension Protocol (GGEP) includes new functions added to the original Gnutella 0.4 protocol. </p> @@ -130,7 +134,7 @@ <h3>HSEP</h3> <p> - The Horizon Size Estimation Protocol (HSEP) refers to the estimation of the number of reachable resources within the Gnutella network, e.g. the number of reachable Gnutella nodes, shared files and shared kibibytes. More informations <a href="http://www.schuerger.com/gnutella/hsep.html" target="_blank">here</a>. + The Horizon Size Estimation Protocol (HSEP) refers to the estimation of the number of reachable resources within the Gnutella network, e.g. the number of reachable Gnutella nodes, shared files and shared kibibytes. </p> @@ -194,13 +198,19 @@ <p> A <em>push-proxy</em> is a relaying node. If an ultrapeer is connected to the firewalled leaf, in order to send a <em>push</em> - to that firewalled leaf, a servent can send an UDP message to the ultrapper who will then relay it to the leaf. So the ultrapeer + to that firewalled leaf, a servent can send an UDP message to the ultrapeer who will then relay it to the leaf. So the ultrapeer acts as the push-proxy: it is the relaying target to reach the leaf. </p> <h2>Q</h2> +<h3>QRP</h3> + +<p> + Query Routing Protocol (QRP) is a scheme for avoiding broadcast queries on the Gnutella network. In this scheme, hosts create query route tables by hashing file keywords and regularly exchange them with their neighbors. Standard compression techniques minimize the cost of exchanging tables. This scheme can dramatically reduce Gnutella's bandwidth requirements improving scalability and leaving more bandwidth for files exchange. +</p> + <h3>Query</h3> <p> @@ -249,7 +259,7 @@ <li> browse: List shared files on the specified host. The format is "browse:<em>ip_address:port</em>". Many portions of the GUI have a menu option, available from a right - click, that will browser the specified computer. + click, that will browse the specified computer. </li> <li> http: Download the specified web page. This could be a zip file, a movie, large JPEG, etc. @@ -284,7 +294,7 @@ Mini filters are created with the '+' and '-' signs. The plus sign requires that a word is part of the results. The minus sign doesn't display any results with the given phrase. The plus and minus signs - can be used to select ambigious terms. + can be used to select ambiguous terms. </p> <p> Suppose you wish to find information about apples. You might use a search like <em>apples -computers</em>. @@ -301,7 +311,7 @@ <h3>SOAP</h3> <p> - Simple Object Access Protocol (SOAP) is a lightweight XML-based protocol for exchange of information in a decentralized, distributed environment like P2P networks. More informations <a href="https://www.w3.org/TR/2000/NOTE-SOAP-20000508/" target="_blank">here</a>. + Simple Object Access Protocol (SOAP) is a lightweight XML-based protocol for exchange of information in a decentralized, distributed environment like P2P networks. </p> @@ -310,7 +320,7 @@ <h3>THEX</h3> <p> - The Tree Hash EXchange (THEX) format is used for exchanging Merkle Hash Trees built up from the subrange hashes of discrete digital files. More informations <a href="http://adc.sourceforge.net/draft-jchapweske-thex-02.html" target="_blank">here</a>. + The Tree Hash EXchange (THEX) format is used for exchanging Merkle Hash Trees built up from the subrange hashes of discrete digital files. </p> @@ -341,5 +351,15 @@ typically be connected to 30+ other ultrapeers and connected to 70+ leaf nodes. </p> + +<h2>V</h2> + +<h3>Vendor Code</h3> + +<p> + The Vendor Code is a conventional 4-letter code used in Query Hits to identify the software + running the node that generated the hit. For gtk-gnutella the Vendor Code is <em>GTKG</em>. +</p> + </body> </html>
View file
gtk-gnutella-1.1.9.tar.bz2/extra_files/geo-ip.txt -> gtk-gnutella-1.1.11.tar.bz2/extra_files/geo-ip.txt
Changed
@@ -1,6 +1,6 @@ # From http://www.maxmind.com/app/geoip_country # Redistributed under the OPEN DATA LICENSE (see GEO_LICENCE) -# Conversion for GTKG generated on Sun Mar 6 07:47:57 2016 GMT +# Conversion for GTKG generated on Tue Nov 8 07:32:29 2016 GMT 1.0.0.0 - 1.0.0.255 au 1.0.1.0 - 1.0.3.255 cn 1.0.4.0 - 1.0.7.255 au @@ -38,8 +38,20 @@ 1.22.0.0 - 1.23.255.255 in 1.24.0.0 - 1.31.255.255 cn 1.32.0.0 - 1.32.127.255 my -1.32.128.0 - 1.32.255.255 sg -1.33.0.0 - 1.33.255.255 jp +1.32.128.0 - 1.32.193.255 sg +1.32.194.0 - 1.32.194.255 tw +1.32.195.0 - 1.32.196.255 sg +1.32.197.0 - 1.32.197.255 tw +1.32.198.0 - 1.32.201.255 sg +1.32.202.0 - 1.32.202.127 tw +1.32.202.128 - 1.32.202.255 sg +1.32.203.0 - 1.32.203.127 tw +1.32.203.128 - 1.32.203.255 sg +1.32.204.0 - 1.32.204.127 tw +1.32.204.128 - 1.32.255.255 sg +1.33.0.0 - 1.33.231.255 jp +1.33.232.0 - 1.33.232.255 us +1.33.233.0 - 1.33.255.255 jp 1.34.0.0 - 1.34.0.0 cn 1.34.0.1 - 1.35.255.255 tw 1.36.0.0 - 1.36.255.255 hk @@ -47,7 +59,9 @@ 1.38.0.0 - 1.39.255.255 in 1.40.0.0 - 1.44.255.255 au 1.45.0.0 - 1.45.255.255 cn -1.46.0.0 - 1.47.255.255 th +1.46.0.0 - 1.46.60.0 th +1.46.60.1 - 1.46.60.1 cn +1.46.60.2 - 1.47.255.255 th 1.48.0.0 - 1.51.255.255 cn 1.52.0.0 - 1.55.255.255 vn 1.56.0.0 - 1.63.255.255 cn @@ -71,12 +85,12 @@ 1.201.0.0 - 1.201.255.255 kr 1.202.0.0 - 1.207.255.255 cn 1.208.0.0 - 1.255.255.255 kr -2.0.0.0 - 2.0.0.0 gb -2.0.0.1 - 2.15.255.255 fr +2.0.0.0 - 2.15.255.255 fr 2.16.0.0 - 2.16.5.255 eu 2.16.6.0 - 2.16.7.255 de 2.16.8.0 - 2.16.35.255 eu -2.16.36.0 - 2.16.37.255 il +2.16.36.0 - 2.16.36.255 au +2.16.37.0 - 2.16.37.255 il 2.16.38.0 - 2.16.67.255 eu 2.16.68.0 - 2.16.69.255 se 2.16.70.0 - 2.16.71.255 it @@ -90,9 +104,7 @@ 2.16.178.0 - 2.16.179.255 gr 2.16.180.0 - 2.16.219.255 eu 2.16.220.0 - 2.16.223.255 gr -2.16.224.0 - 2.16.239.255 eu -2.16.240.0 - 2.16.255.255 de -2.17.0.0 - 2.17.19.255 eu +2.16.224.0 - 2.17.19.255 eu 2.17.20.0 - 2.17.23.255 de 2.17.24.0 - 2.17.251.255 eu 2.17.252.0 - 2.17.255.255 de @@ -136,8 +148,7 @@ 2.21.255.0 - 2.21.255.255 nl 2.22.0.0 - 2.22.11.255 eu 2.22.12.0 - 2.22.19.255 gb -2.22.20.0 - 2.22.23.255 fr -2.22.24.0 - 2.22.47.255 eu +2.22.20.0 - 2.22.47.255 eu 2.22.48.0 - 2.22.49.255 fr 2.22.50.0 - 2.22.54.255 eu 2.22.55.0 - 2.22.55.255 be @@ -191,18 +202,33 @@ 2.248.0.0 - 2.255.255.255 se 3.0.0.0 - 4.18.65.255 us 4.18.66.0 - 4.18.67.255 mx -4.18.68.0 - 4.28.141.255 us -4.28.142.0 - 4.28.142.255 ca -4.28.143.0 - 4.69.153.192 us +4.18.68.0 - 4.28.135.255 us +4.28.136.0 - 4.28.143.255 ca +4.28.144.0 - 4.34.20.255 us +4.34.21.0 - 4.34.21.255 gb +4.34.22.0 - 4.34.129.255 us +4.34.130.0 - 4.34.130.5 ca +4.34.130.6 - 4.34.130.6 us +4.34.130.7 - 4.34.130.255 ca +4.34.131.0 - 4.69.153.192 us 4.69.153.193 - 4.69.153.193 nl -4.69.153.194 - 5.0.0.0 us -5.0.0.1 - 5.0.255.255 sy +4.69.153.194 - 4.255.255.255 us +5.0.0.0 - 5.0.255.255 sy 5.1.0.0 - 5.1.31.255 ua 5.1.32.0 - 5.1.39.255 es -5.1.40.0 - 5.1.47.255 cy +5.1.40.0 - 5.1.40.255 kw +5.1.41.0 - 5.1.41.255 sa +5.1.42.0 - 5.1.42.255 bh +5.1.43.0 - 5.1.43.255 lb +5.1.44.0 - 5.1.44.255 ae +5.1.45.0 - 5.1.45.255 qa +5.1.46.0 - 5.1.46.255 om +5.1.47.0 - 5.1.47.255 jo 5.1.48.0 - 5.1.55.255 ru 5.1.56.0 - 5.1.63.255 cz -5.1.64.0 - 5.1.82.255 de +5.1.64.0 - 5.1.67.255 de +5.1.68.0 - 5.1.69.255 gb +5.1.70.0 - 5.1.82.255 de 5.1.83.0 - 5.1.83.255 gb 5.1.84.0 - 5.1.87.255 de 5.1.88.0 - 5.1.88.255 gb @@ -222,10 +248,14 @@ 5.2.128.0 - 5.2.255.255 ro 5.3.0.0 - 5.3.255.255 ru 5.4.0.0 - 5.7.255.255 de -5.8.0.0 - 5.8.31.255 ru -5.8.32.0 - 5.8.35.255 bz -5.8.36.0 - 5.8.39.255 ru -5.8.40.0 - 5.8.43.255 nl +5.8.0.0 - 5.8.23.255 ru +5.8.24.0 - 5.8.27.255 gb +5.8.28.0 - 5.8.31.255 ru +5.8.32.0 - 5.8.32.255 ua +5.8.33.0 - 5.8.33.255 ru +5.8.34.0 - 5.8.34.255 ua +5.8.35.0 - 5.8.39.255 ru +5.8.40.0 - 5.8.43.255 gb 5.8.44.0 - 5.8.44.127 mx 5.8.44.128 - 5.8.44.255 pa 5.8.45.0 - 5.8.45.127 br @@ -234,7 +264,13 @@ 5.8.46.128 - 5.8.46.255 co 5.8.47.0 - 5.8.47.127 pl 5.8.47.128 - 5.8.47.255 it -5.8.48.0 - 5.8.95.255 ru +5.8.48.0 - 5.8.62.255 ru +5.8.63.0 - 5.8.63.255 us +5.8.64.0 - 5.8.67.255 ru +5.8.68.0 - 5.8.71.255 gb +5.8.72.0 - 5.8.87.255 ru +5.8.88.0 - 5.8.91.255 nl +5.8.92.0 - 5.8.95.255 ru 5.8.96.0 - 5.8.127.255 it 5.8.128.0 - 5.8.159.255 lb 5.8.160.0 - 5.8.183.255 ru @@ -254,21 +290,21 @@ 5.10.128.0 - 5.10.135.255 fr 5.10.136.0 - 5.10.159.255 gb 5.10.160.0 - 5.10.191.255 de -5.10.192.0 - 5.10.199.255 br +5.10.192.0 - 5.10.199.255 nl 5.10.200.0 - 5.10.207.255 es 5.10.208.0 - 5.10.223.255 de 5.10.224.0 - 5.10.231.255 iq 5.10.232.0 - 5.10.239.255 gb 5.10.240.0 - 5.10.255.255 az 5.11.0.0 - 5.11.7.255 at -5.11.8.0 - 5.11.15.255 gb -5.11.16.0 - 5.11.31.255 a2 +5.11.8.0 - 5.11.31.255 gb 5.11.32.0 - 5.11.39.255 it 5.11.40.0 - 5.11.47.255 ps 5.11.48.0 - 5.11.55.255 de 5.11.56.0 - 5.11.63.255 gr 5.11.64.0 - 5.11.79.255 ru -5.11.80.0 - 5.11.95.255 gb +5.11.80.0 - 5.11.87.255 nl +5.11.88.0 - 5.11.95.255 gb 5.11.96.0 - 5.11.127.255 it 5.11.128.0 - 5.11.255.255 tr 5.12.0.0 - 5.15.255.255 ro @@ -287,14 +323,14 @@ 5.22.160.0 - 5.22.191.255 rs 5.22.192.0 - 5.22.223.255 ir 5.22.224.0 - 5.22.231.255 gb -5.22.232.0 - 5.22.232.255 se -5.22.233.0 - 5.22.233.255 dk -5.22.234.0 - 5.22.239.255 se +5.22.232.0 - 5.22.239.255 se 5.22.240.0 - 5.22.247.255 de 5.22.248.0 - 5.22.255.255 nl 5.23.0.0 - 5.23.3.255 eu 5.23.4.0 - 5.23.4.7 it -5.23.4.8 - 5.23.7.255 eu +5.23.4.8 - 5.23.5.255 eu +5.23.6.0 - 5.23.6.255 hu +5.23.7.0 - 5.23.7.255 eu 5.23.8.0 - 5.23.8.255 tr 5.23.9.0 - 5.23.9.255 eu 5.23.10.0 - 5.23.10.255 be @@ -325,8 +361,11 @@
View file
gtk-gnutella-1.1.9.tar.bz2/extra_files/geo-ipv6.txt -> gtk-gnutella-1.1.11.tar.bz2/extra_files/geo-ipv6.txt
Changed
@@ -1,6 +1,6 @@ # From http://geolite.maxmind.com/download/geoip/database/GeoIPv6.csv.gz # Redistributed under the OPEN DATA LICENSE (see GEO_LICENCE) -# Conversion for GTKG generated on Sun Mar 6 07:48:04 2016 GMT +# Conversion for GTKG generated on Tue Nov 8 07:32:32 2016 GMT 2001:200::/32 jp 2001:208::/32 sg 2001:218::/32 jp @@ -105,7 +105,9 @@ 2001:500:f0::/48 us 2001:500:f1::/48 ca 2001:500:100::/48 ca +2001:500:110::/48 us 2001:500:120::/48 us +2001:500:200::/48 us 2001:500:3e5::/48 us 2001:500:30ff::/48 us 2001:500:3682::/48 us @@ -161,7 +163,8 @@ 2001:503:f261::/48 us 2001:503:f3da::/48 us 2001:503:ff39::/48 us -2001:504::/46 us +2001:504::/47 us +2001:504:a::/48 us 2001:504:15::/48 ca 2001:504:16::/48 us 2001:504:1a::/48 ca @@ -175,6 +178,7 @@ 2001:504:2e::/48 us 2001:504:2f::/48 ca 2001:504:30::/48 us +2001:504:33::/48 us 2001:504:35::/48 gd 2001:504:36::/48 us 2001:504:37::/48 ca @@ -189,6 +193,8 @@ 2001:504:47::/48 us 2001:504:57::/48 us 2001:504:60::/48 us +2001:504:63::/48 dm +2001:504:64::/48 us 2001:506::/47 us 2001:506:8::/48 us 2001:506:20::/48 ca @@ -217,7 +223,6 @@ 2001:5a8::/32 us 2001:5b0::/32 us 2001:5b8::/32 us -2001:5c0:1000::/48 ca 2001:5c8::/32 us 2001:5d0::/32 us 2001:5d8::/32 us @@ -292,7 +297,6 @@ 2001:678:9c::/48 sk 2001:678:a0::/48 fi 2001:678:a4::/48 at -2001:678:a8::/48 nl 2001:678:ac::/48 se 2001:678:b0::/48 ir 2001:678:c0::/48 de @@ -311,6 +315,109 @@ 2001:678:f4::/48 ru 2001:678:f8::/48 de 2001:678:fc::/48 lt +2001:678:100::/48 bg +2001:678:104::/48 cz +2001:678:108::/48 nl +2001:678:10c::/48 nl +2001:678:110::/48 nl +2001:678:114::/48 nl +2001:678:118::/48 nl +2001:678:11c::/48 ch +2001:678:120::/48 pl +2001:678:124::/48 ru +2001:678:128::/48 ru +2001:678:12c::/48 sk +2001:678:130::/48 se +2001:678:134::/48 no +2001:678:138::/48 no +2001:678:13c::/48 de +2001:678:140::/48 de +2001:678:144::/48 ua +2001:678:148::/48 fi +2001:678:14c::/48 ua +2001:678:150::/48 mo +2001:678:154::/48 de +2001:678:158::/48 fr +2001:678:15c::/48 ro +2001:678:160::/48 cz +2001:678:164::/48 gb +2001:678:168::/48 de +2001:678:16c::/48 bg +2001:678:170::/48 pl +2001:678:174::/48 de +2001:678:178::/48 pl +2001:678:17c::/48 cz +2001:678:180::/48 de +2001:678:184::/48 de +2001:678:188::/48 uz +2001:678:18c::/48 at +2001:678:190::/48 ru +2001:678:194::/48 ua +2001:678:198::/48 nl +2001:678:19c::/48 se +2001:678:1a0::/48 se +2001:678:1a4::/48 tr +2001:678:1a8::/48 de +2001:678:1ac::/48 ua +2001:678:1b0::/48 ru +2001:678:1b4::/48 de +2001:678:1b8::/48 at +2001:678:1bc::/48 ru +2001:678:1c0::/48 pl +2001:678:1c4::/48 ch +2001:678:1c8::/48 nl +2001:678:1cc::/48 pl +2001:678:1d0::/48 de +2001:678:1d4::/48 se +2001:678:1d8::/48 at +2001:678:1dc::/48 pl +2001:678:1e0::/48 de +2001:678:1e4::/48 de +2001:678:1e8::/48 ru +2001:678:1ec::/48 si +2001:678:1f0::/48 gb +2001:678:1f4::/48 ru +2001:678:1f8::/48 bg +2001:678:1fc::/48 se +2001:678:200::/48 pl +2001:678:204::/48 ch +2001:678:208::/48 ua +2001:678:20c::/48 ru +2001:678:210::/48 ro +2001:678:214::/48 hu +2001:678:218::/48 ro +2001:678:21c::/48 ua +2001:678:220::/48 ru +2001:678:224::/48 pl +2001:678:228::/48 se +2001:678:22c::/48 de +2001:678:230::/48 nl +2001:678:234::/48 at +2001:678:238::/48 pl +2001:678:23c::/48 pl +2001:678:240::/48 se +2001:678:244::/48 ru +2001:678:248::/48 de +2001:678:24c::/48 lt +2001:678:250::/48 nl +2001:678:254::/48 ch +2001:678:258::/48 gb +2001:678:25c::/48 lu +2001:678:260::/48 ch +2001:678:264::/48 nl +2001:678:268::/48 gb +2001:678:26c::/48 ua +2001:678:270::/48 at +2001:678:274::/48 de +2001:678:278::/48 ru +2001:678:27c::/48 pl +2001:678:280::/48 ru +2001:678:284::/48 de +2001:678:288::/48 pl +2001:678:28c::/48 ch +2001:678:290::/48 ru +2001:678:294::/48 ch +2001:678:298::/48 ch 2001:67c::/48 ie 2001:67c:4::/48 de 2001:67c:8::/48 ch @@ -340,10 +447,12 @@ 2001:67c:68::/48 cz 2001:67c:6c::/48 is 2001:67c:70::/48 fr +2001:67c:74::/48 de 2001:67c:78::/48 nl 2001:67c:7c::/48 at 2001:67c:80::/48 gb 2001:67c:84::/48 cz +2001:67c:88::/48 nl 2001:67c:8c::/48 ru 2001:67c:90::/48 gb 2001:67c:94::/48 ch @@ -402,7 +511,7 @@ 2001:67c:168::/48 ch 2001:67c:16c::/48 ru 2001:67c:170::/48 ch -2001:67c:174::/48 nl +2001:67c:174::/48 sm 2001:67c:178::/48 at 2001:67c:17c::/48 at 2001:67c:180::/48 at @@ -489,6 +598,7 @@ 2001:67c:2c4::/48 ch 2001:67c:2c8::/48 nl 2001:67c:2cc::/48 de +2001:67c:2d0::/48 nl 2001:67c:2d4::/48 nl 2001:67c:2d8::/48 at
View file
gtk-gnutella-1.1.9.tar.bz2/extra_files/hostiles.txt -> gtk-gnutella-1.1.11.tar.bz2/extra_files/hostiles.txt
Changed
@@ -1839,3 +1839,6 @@ # Fake Shareaza clients 208.103.122.163 208.103.122.164/30 + +# Trident Media Guard +193.107.240.0/22
View file
gtk-gnutella-1.1.9.tar.bz2/osx/gtk-gnutella.bundle -> gtk-gnutella-1.1.11.tar.bz2/osx/gtk-gnutella.bundle
Changed
@@ -79,10 +79,6 @@ ${prefix}/lib/gdk-pixbuf-2.0/${pkg:${gtk}:gtk_binary_version}/loaders/*.so </binary> - <binary> - ${prefix}/lib/pango/${pkg:pango:pango_module_version}/modules/ - </binary> - <!-- Translation filenames, one for each program or library that you want to copy in to the bundle. The "dest" attribute is optional, as usual. Bundler will find all translations of that
View file
gtk-gnutella-1.1.9.tar.bz2/po/POTFILES.in -> gtk-gnutella-1.1.11.tar.bz2/po/POTFILES.in
Changed
@@ -1,5 +1,5 @@ # List of source files containing translatable strings. -# Regenerated on Sun Dec 13 14:34:01 CET 2015 +# Regenerated on Tue Nov 8 08:30:28 CET 2016 src/core/ban.c src/core/downloads.c
View file
gtk-gnutella-1.1.9.tar.bz2/po/de.po -> gtk-gnutella-1.1.11.tar.bz2/po/de.po
Changed
@@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: gtk-gnutella\n" "Report-Msgid-Bugs-To: gtk-gnutella-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-03-06 08:49+0100\n" +"POT-Creation-Date: 2016-11-08 08:30+0100\n" "PO-Revision-Date: 2016-02-15 08:28+0000\n" "Last-Translator: Jeroen Asselman <jeroen@asselman.com>\n" "Language-Team: German (http://www.transifex.com/gtk-gnutella/gtk-gnutella/" @@ -1063,6 +1063,10 @@ msgid "G2 hits on local partial files" msgstr "" +#, fuzzy +msgid "Hits on aliased queries" +msgstr "Verkleinerte Suchanfragen" + msgid "Query hits received for OOB-proxied queries" msgstr "" @@ -1129,6 +1133,9 @@ msgid "SHA1 G2 queries" msgstr "" +msgid "Queries with aliased words" +msgstr "" + msgid "GUESS queries" msgstr "" @@ -4562,6 +4569,10 @@ msgid "No TCP listening socket bound to allow incoming connections." msgstr "" +#, fuzzy +msgid "Defines whether Gnutella queries should be traced." +msgstr "Gibt an, ob die empfangenen Suchanfragen angezeigt werden sollen." + msgid "disable" msgstr "deaktiviert" @@ -5054,7 +5065,7 @@ msgid "" "Remote nodes supporting media type filtering will apply your query " -"specifically on archive / program files such as ZIP, 7z, tar, bz2, gz, dep, " +"specifically on archive / program files such as ZIP, 7z, tar, bz2, gz, deb, " "rpm and also exe files." msgstr ""
View file
gtk-gnutella-1.1.9.tar.bz2/po/el.po -> gtk-gnutella-1.1.11.tar.bz2/po/el.po
Changed
@@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: gtk-gnutella\n" "Report-Msgid-Bugs-To: gtk-gnutella-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-03-06 08:49+0100\n" +"POT-Creation-Date: 2016-11-08 08:30+0100\n" "PO-Revision-Date: 2016-02-15 08:28+0000\n" "Last-Translator: Jeroen Asselman <jeroen@asselman.com>\n" "Language-Team: Greek (http://www.transifex.com/gtk-gnutella/gtk-gnutella/" @@ -1062,6 +1062,10 @@ msgid "G2 hits on local partial files" msgstr "" +#, fuzzy +msgid "Hits on aliased queries" +msgstr "Συμπαγή ερωτήματα" + msgid "Query hits received for OOB-proxied queries" msgstr "Ληφθέντα χτυπήματα ερωτημάτων για ερωτήματα δρομολογημένα μέσω OOB" @@ -1128,6 +1132,9 @@ msgid "SHA1 G2 queries" msgstr "" +msgid "Queries with aliased words" +msgstr "" + msgid "GUESS queries" msgstr "" @@ -4540,6 +4547,10 @@ msgid "No TCP listening socket bound to allow incoming connections." msgstr "" +#, fuzzy +msgid "Defines whether Gnutella queries should be traced." +msgstr "Αν πρέπει να εμφανίζεται οι μέτρηση των ληφθέντων ερωτημάτων." + msgid "disable" msgstr "απενεργοποίηση" @@ -5026,7 +5037,7 @@ msgid "" "Remote nodes supporting media type filtering will apply your query " -"specifically on archive / program files such as ZIP, 7z, tar, bz2, gz, dep, " +"specifically on archive / program files such as ZIP, 7z, tar, bz2, gz, deb, " "rpm and also exe files." msgstr ""
View file
gtk-gnutella-1.1.9.tar.bz2/po/es.po -> gtk-gnutella-1.1.11.tar.bz2/po/es.po
Changed
@@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: gtk-gnutella\n" "Report-Msgid-Bugs-To: gtk-gnutella-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-03-06 08:49+0100\n" +"POT-Creation-Date: 2016-11-08 08:30+0100\n" "PO-Revision-Date: 2016-02-15 08:28+0000\n" "Last-Translator: Jeroen Asselman <jeroen@asselman.com>\n" "Language-Team: Spanish (http://www.transifex.com/gtk-gnutella/gtk-gnutella/" @@ -1064,6 +1064,10 @@ msgid "G2 hits on local partial files" msgstr "" +#, fuzzy +msgid "Hits on aliased queries" +msgstr "Peticiones compactadas" + msgid "Query hits received for OOB-proxied queries" msgstr "Query hits recibidos para peticiones a través de proxy OOB" @@ -1130,6 +1134,9 @@ msgid "SHA1 G2 queries" msgstr "" +msgid "Queries with aliased words" +msgstr "" + msgid "GUESS queries" msgstr "" @@ -4741,6 +4748,11 @@ msgid "No TCP listening socket bound to allow incoming connections." msgstr "" +#, fuzzy +msgid "Defines whether Gnutella queries should be traced." +msgstr "" +"Define cuáles intercambios de encabezados Gnutella deberán ser trazados." + msgid "disable" msgstr "desactivar" @@ -5239,7 +5251,7 @@ msgid "" "Remote nodes supporting media type filtering will apply your query " -"specifically on archive / program files such as ZIP, 7z, tar, bz2, gz, dep, " +"specifically on archive / program files such as ZIP, 7z, tar, bz2, gz, deb, " "rpm and also exe files." msgstr ""
View file
gtk-gnutella-1.1.9.tar.bz2/po/fr.po -> gtk-gnutella-1.1.11.tar.bz2/po/fr.po
Changed
@@ -3,14 +3,14 @@ # This file is distributed under the same license as the PACKAGE package. # # Translators: -# mauron, 2014-2015 +# mauron, 2014-2016 msgid "" msgstr "" "Project-Id-Version: gtk-gnutella\n" "Report-Msgid-Bugs-To: gtk-gnutella-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-03-06 08:49+0100\n" -"PO-Revision-Date: 2016-02-15 08:28+0000\n" -"Last-Translator: Jeroen Asselman <jeroen@asselman.com>\n" +"POT-Creation-Date: 2016-11-08 08:30+0100\n" +"PO-Revision-Date: 2016-08-31 12:04+0000\n" +"Last-Translator: mauron\n" "Language-Team: French (http://www.transifex.com/gtk-gnutella/gtk-gnutella/" "language/fr/)\n" "Language: fr\n" @@ -264,7 +264,7 @@ msgstr "Pas de support pour l'en-tête Content-Encoding (%s)" msgid "Incomplete headers during TLS upgrade" -msgstr "" +msgstr "En-têtes incomplets pendant la mise à niveau" msgid "Spammer detected" msgstr "Spameur détecté" @@ -591,10 +591,10 @@ msgstr "Protocole non acceptable" msgid "Conflict" -msgstr "" +msgstr "Conflit" msgid "Upgrade Header Missing" -msgstr "" +msgstr "En-tête de mise à niveau manquant" msgid "Servent Shutdown" msgstr "Arrêt du servent" @@ -745,10 +745,13 @@ #, c-format msgid "Another gtk-gnutella supervisor is running as PID %lu" msgstr "" +"Un autre superviseur gtk-gnutella est en cours de fonctionnement en tant que " +"PID %lu" #, c-format msgid "Another gtk-gnutella is running as PID %lu" msgstr "" +"Un autre gtk-gnutella est en cours de fonctionnement en tant que PID %lu" msgid "Cannot proceed without valid configuration directory" msgstr "Ne peut continuer sans un répertoire de configuration valide" @@ -939,7 +942,7 @@ msgstr "" msgid "Content Too Large" -msgstr "" +msgstr "Contenu trop grand" msgid "Unknown/Missing Protocol Tag" msgstr "Étiquette de protocole inconnu ou manquant" @@ -1064,6 +1067,10 @@ msgid "G2 hits on local partial files" msgstr "G2 correspondances sur les fichiers locaux partiels" +#, fuzzy +msgid "Hits on aliased queries" +msgstr "Résultats sur une recherche « quoi de neuf ? »" + msgid "Query hits received for OOB-proxied queries" msgstr "Résultats de recherche reçus pour les recherches via proxy OOB" @@ -1132,6 +1139,9 @@ msgid "SHA1 G2 queries" msgstr "Requêtes G2 SHA1" +msgid "Queries with aliased words" +msgstr "" + msgid "GUESS queries" msgstr "GUESS nombre de requêtes" @@ -3314,6 +3324,8 @@ "Maximum amount of leaves we can accept. To be promoted Ultra, you should " "reserve 32 bytes/sec of bandwidth per leaf." msgstr "" +"Nombre maximum de feuilles que l'on peut recevoir. Pour être élu ultrapeer, " +"vous devriez réserver 32 octets/sec de bande passante par feuille." msgid "What to do with files that will be ignored for downloading." msgstr "Que faire avec les fichiers qui seront ignorés pour le téléchargement." @@ -4948,9 +4960,16 @@ "unchanged when gtk-gnutella restarts after a crash or an explicit restart " "request." msgstr "" +"Horodatage de l'heure à laquelle la session actuelle a démarré. Cet " +"horodatage reste inchangé lorsque gtk-gnutella redémarre suite à un plantage " +"ou à une requête de redémarrage explicite." msgid "No TCP listening socket bound to allow incoming connections." -msgstr "" +msgstr "Aucun socket d'écoute TCP lié pour autoriser les connexions entrantes." + +#, fuzzy +msgid "Defines whether Gnutella queries should be traced." +msgstr "Définit quels en-têtes Gnutella doivent être tracés." msgid "disable" msgstr "désactiver" @@ -5470,12 +5489,12 @@ msgid "" "Remote nodes supporting media type filtering will apply your query " -"specifically on archive / program files such as ZIP, 7z, tar, bz2, gz, dep, " +"specifically on archive / program files such as ZIP, 7z, tar, bz2, gz, deb, " "rpm and also exe files." msgstr "" "Les noeuds distants qui supportent le filtrage par type de média ne vont " "appliquer la recherche que sur les fichiers de type archive / programme, " -"comme les fichiers ZIP, 7z, tar, bz2, gz, dep, rpm et autres exe." +"comme les fichiers ZIP, 7z, tar, bz2, gz, deb, rpm et autres exe." msgid "" "Discard search results with an alien IP address, not matching the one from " @@ -6457,7 +6476,7 @@ msgstr "Valeur manquante" msgid "Property cannot be changed" -msgstr "" +msgstr "La propriété ne peut être modifiée" #, c-format msgid "Previous value was %s" @@ -9047,7 +9066,7 @@ msgstr "Cacher _automatiquement les stats du trafic de feuille" msgid "Glossary" -msgstr "" +msgstr "Glossaire" msgid "_Search" msgstr "_Recherche" @@ -9340,6 +9359,8 @@ "<html><head><title>Glossary</title></head><body><p>The glossary document " "could not be loaded.</p></body></html>" msgstr "" +"<html><head><title>Glossaire</title></head><body><p>Le document du glossaire " +"n'a pu être chargé.</p></body></html>" #, c-format msgid "%lu file shared (%s)" @@ -9755,7 +9776,7 @@ "*** INSUFFISANCE DU TAMPON DU KERNEL -- LIMITATION DES CONNEXIONS TCP ***" msgid "*** NO LISTENING TCP SOCKET -- NO INBOUND CONNECTIONS ***" -msgstr "" +msgstr "*** AUCUN SOCKET TCP D'ÉCOUTE -- AUCUNE CONNEXION ENTRANTE ***" msgid "*** UPLOADS STALLING, BANDWIDTH SHORTAGE? ***" msgstr "*** LES ENVOIS CALENT, BANDE PASSANTE SURCHARGÉE ? ***" @@ -9812,7 +9833,7 @@ msgstr "File d'attente figée" msgid "Internal" -msgstr "" +msgstr "Interne" msgid "Select a property to see its description." msgstr "Sélectionnez une propriété pour voir sa description."
View file
gtk-gnutella-1.1.9.tar.bz2/po/gtk-gnutella.pot -> gtk-gnutella-1.1.11.tar.bz2/po/gtk-gnutella.pot
Changed
@@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: gtk-gnutella 1.1.9u\n" +"Project-Id-Version: gtk-gnutella 1.1.10\n" "Report-Msgid-Bugs-To: gtk-gnutella-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-03-06 08:49+0100\n" +"POT-Creation-Date: 2016-11-08 08:30+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -1061,6 +1061,9 @@ msgid "G2 hits on local partial files" msgstr "" +msgid "Hits on aliased queries" +msgstr "" + msgid "Query hits received for OOB-proxied queries" msgstr "" @@ -1127,6 +1130,9 @@ msgid "SHA1 G2 queries" msgstr "" +msgid "Queries with aliased words" +msgstr "" + msgid "GUESS queries" msgstr "" @@ -4250,6 +4256,9 @@ msgid "No TCP listening socket bound to allow incoming connections." msgstr "" +msgid "Defines whether Gnutella queries should be traced." +msgstr "" + msgid "disable" msgstr "" @@ -4695,7 +4704,7 @@ msgid "" "Remote nodes supporting media type filtering will apply your query " -"specifically on archive / program files such as ZIP, 7z, tar, bz2, gz, dep, " +"specifically on archive / program files such as ZIP, 7z, tar, bz2, gz, deb, " "rpm and also exe files." msgstr ""
View file
gtk-gnutella-1.1.9.tar.bz2/po/hu.po -> gtk-gnutella-1.1.11.tar.bz2/po/hu.po
Changed
@@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: gtk-gnutella\n" "Report-Msgid-Bugs-To: gtk-gnutella-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-03-06 08:49+0100\n" +"POT-Creation-Date: 2016-11-08 08:30+0100\n" "PO-Revision-Date: 2016-02-15 08:28+0000\n" "Last-Translator: Jeroen Asselman <jeroen@asselman.com>\n" "Language-Team: Hungarian (http://www.transifex.com/gtk-gnutella/gtk-gnutella/" @@ -1061,6 +1061,10 @@ msgid "G2 hits on local partial files" msgstr "" +#, fuzzy +msgid "Hits on aliased queries" +msgstr "Tömörített keresések" + msgid "Query hits received for OOB-proxied queries" msgstr "" @@ -1127,6 +1131,9 @@ msgid "SHA1 G2 queries" msgstr "" +msgid "Queries with aliased words" +msgstr "" + msgid "GUESS queries" msgstr "" @@ -4323,6 +4330,10 @@ msgid "No TCP listening socket bound to allow incoming connections." msgstr "" +#, fuzzy +msgid "Defines whether Gnutella queries should be traced." +msgstr "Fogadott keresések számának kijelzése." + msgid "disable" msgstr "" @@ -4781,7 +4792,7 @@ msgid "" "Remote nodes supporting media type filtering will apply your query " -"specifically on archive / program files such as ZIP, 7z, tar, bz2, gz, dep, " +"specifically on archive / program files such as ZIP, 7z, tar, bz2, gz, deb, " "rpm and also exe files." msgstr ""
View file
gtk-gnutella-1.1.9.tar.bz2/po/it.po -> gtk-gnutella-1.1.11.tar.bz2/po/it.po
Changed
@@ -5,13 +5,14 @@ # Translators: # Lorenzo Gaifas <lorenzo@artiemestieri.tn.it>, 2006 # Lucio Marinelli, 2015-2016 +# Lucio Marinelli, 2016 # Sebastiano Pistore <olatusrooc@virgilio.it>, 2016 msgid "" msgstr "" "Project-Id-Version: gtk-gnutella\n" "Report-Msgid-Bugs-To: gtk-gnutella-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-03-06 08:49+0100\n" -"PO-Revision-Date: 2016-02-20 17:09+0000\n" +"POT-Creation-Date: 2016-11-08 08:30+0100\n" +"PO-Revision-Date: 2016-10-01 07:48+0000\n" "Last-Translator: Lucio Marinelli\n" "Language-Team: Italian (http://www.transifex.com/gtk-gnutella/gtk-gnutella/" "language/it/)\n" @@ -28,7 +29,7 @@ msgstr "Connessione rifiutata" msgid "Use an open Gnutella or G2 servent" -msgstr "Usa un server Gnutella o G2 aperto" +msgstr "Usa un servent Gnutella o G2 aperto" #, c-format msgid "Stopped, will retry with TLS (%s)" @@ -46,10 +47,10 @@ msgstr "Riaccodato per mancanza del push-proxy" msgid "Requeued due to file removal" -msgstr "Riaccodato per file rimosso" +msgstr "Riaccodato causa rimozione file" msgid "Requeued by file info change" -msgstr "Riaccodato in seguito a cambiamento delle informazioni" +msgstr "Riaccodato causa cambiamento delle informazioni del file" msgid "Duplicate download" msgstr "Download duplicato" @@ -79,7 +80,7 @@ msgstr "Nient'altro da recuperare" msgid "Waiting for a free chunk" -msgstr "In attesa di un chunk libero" +msgstr "In attesa di un pezzo libero" msgid "No more gaps to fill" msgstr "Niente più buchi da riempire" @@ -91,7 +92,7 @@ msgstr "Carenza di buffer di rete" msgid "No download slot (start)" -msgstr "Nessuno slot di scaricamento (avvia)" +msgstr "Nessuno slot di download (avvia)" msgid "Connection failed (Out of file descriptors?)" msgstr "Connessione fallita (Mancanza dei descrittori dei file?)" @@ -100,16 +101,16 @@ msgstr "Connessione fallita" msgid "SHA1 mismatch detected" -msgstr "Rilevato errore SHA1" +msgstr "Rilevata discordanza SHA1" msgid "Waiting for server PROX publishing" msgstr "Attendo che il server pubblichi PROX" msgid "Waiting for push route" -msgstr "In attesa del routing" +msgstr "In attesa dell'instradamento push" msgid "Push route lost" -msgstr "Instradamento perso" +msgstr "Percorso push perso" msgid "Ignoring Push flag" msgstr "Ignoro flag Push" @@ -123,8 +124,8 @@ #, c-format msgid "Timeout (%u retry)" msgid_plural "Timeout (%u retries)" -msgstr0 "Timeout (%u tentativo)" -msgstr1 "Timeout (%u tentativi" +msgstr0 "Tempo scaduto (%u tentativo)" +msgstr1 "Tempo scaduto (%u tentativi)" #, c-format msgid "Connection refused (%u retry)" @@ -133,13 +134,13 @@ msgstr1 "Connessione rifiutata (%u tentativi)" msgid "Dup SHA1 during creation" -msgstr "Duplica SHA1 alla creazione" +msgstr "SHA1 duplicato durante la creazione" msgid "Max. number of downloads reached" msgstr "Raggiunto il numero massimo di download" msgid "Max. number of downloads for this host reached" -msgstr "Raggiunto il numero massimo di connessioni per questo host" +msgstr "Raggiunto il numero massimo di download per questo host" msgid "Has already enough active sources" msgstr "Già presenti abbastanza sorgenti attive" @@ -148,13 +149,13 @@ msgstr "download_start() fallito" msgid "Stopped (Index changed)" -msgstr "Fermato (indice cambiato)" +msgstr "Interrotto (indice cambiato)" msgid "Explicitly requeued" msgstr "Riaccodato esplicitamente" msgid "Failed (Header line too large)" -msgstr "Fallito (Header troppo lungo)" +msgstr "Fallito (Linea di header troppo lunga)" #, c-format msgid "Failed (%s)" @@ -178,11 +179,11 @@ msgstr "Non posso analizzare un file aperto: %s" msgid "Stopped (Output file size changed)" -msgstr "Fermato (dimensione del file di output cambiata)" +msgstr "Interrotto (dimensione del file di output cambiata)" #, c-format msgid "Can't read resume data: %s" -msgstr "Non posso leggere i dati ripresi: %s" +msgstr "Non posso recuperare i dati: %s" msgid "Short read on resume data" msgstr "Lettura breve sui dati ripresi" @@ -199,7 +200,7 @@ msgstr "Scrittura parziale sul file" msgid "Requeued after trimmed data" -msgstr "Riaccodato dopo regolazione dei dati" +msgstr "Riaccodato dopo aver accorciato i dati" msgid "Chunk done, connection closed" msgstr "Pezzo fatto, connessione chiusa" @@ -209,7 +210,7 @@ msgstr "Passo a \"%s\"" msgid "Requeued by competing download" -msgstr "Riaccodato per scaricamento concorrente" +msgstr "Riaccodato per download contemporaneo" msgid "Weird HTTP status" msgstr "Stato HTTP strano" @@ -224,7 +225,7 @@ msgstr "Nessun URN sul server (richiesto)" msgid "No URN on server, waiting for overlap" -msgstr "Nessun URN sul server, attesa di sovrascrittura" +msgstr "Nessun URN sul server, in attesa per sovrascrittura" msgid "No URN on server to validate" msgstr "Nessun URN da convalidare sul server" @@ -236,20 +237,20 @@ msgstr "Rilevata discordanza SHA-1" msgid "URN fileinfo mismatch" -msgstr "Errore nelle informazioni del file dell'URN" +msgstr "Discordanza fileinfo del URN" msgid "Discovered dup SHA1" msgstr "Riscontrata duplicazione SHA1" msgid "More data to sink than expected" -msgstr "Più dati di quanto atteso nel sink" +msgstr "Più dati di quanto atteso da mettere nel sink" msgid "Stopped data (EOF)" -msgstr "Dati terminati (EOF)" +msgstr "Dati interrotti (EOF)" #, c-format msgid "Stopped data (%s)" -msgstr "Dati terminati (%s)" +msgstr "Dati interrotti (%s)" #, c-format msgid "Failed (Read error: %s)" @@ -272,7 +273,7 @@ msgstr "Rilevato spammer" msgid "Partial file, bad HTTP keep-alive support" -msgstr "File parziale, cattivo supporto keep-alive" +msgstr "File parziale, cattivo supporto HTTP keep-alive" #, c-format msgid "Partial file, too much data to sink (%s bytes)" @@ -282,7 +283,7 @@ msgstr "File parziale, range adatto non ancora trovato" msgid "Partial file on server, waiting" -msgstr "File parziale sul server, attesa"
View file
gtk-gnutella-1.1.9.tar.bz2/po/ja.po -> gtk-gnutella-1.1.11.tar.bz2/po/ja.po
Changed
@@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: gtk-gnutella\n" "Report-Msgid-Bugs-To: gtk-gnutella-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-03-06 08:49+0100\n" +"POT-Creation-Date: 2016-11-08 08:30+0100\n" "PO-Revision-Date: 2016-02-15 08:28+0000\n" "Last-Translator: Jeroen Asselman <jeroen@asselman.com>\n" "Language-Team: Japanese (http://www.transifex.com/gtk-gnutella/gtk-gnutella/" @@ -1053,6 +1053,10 @@ msgid "G2 hits on local partial files" msgstr "" +#, fuzzy +msgid "Hits on aliased queries" +msgstr "圧縮検索クエリー" + msgid "Query hits received for OOB-proxied queries" msgstr "OOBプロキシ検索クエリーで受取った検索クエリーヒット" @@ -1119,6 +1123,9 @@ msgid "SHA1 G2 queries" msgstr "" +msgid "Queries with aliased words" +msgstr "" + msgid "GUESS queries" msgstr "" @@ -4602,6 +4609,10 @@ msgid "No TCP listening socket bound to allow incoming connections." msgstr "" +#, fuzzy +msgid "Defines whether Gnutella queries should be traced." +msgstr "受信した検索クエリーの数を表示するかどうかを選択します。" + msgid "disable" msgstr "表示しない" @@ -5079,7 +5090,7 @@ msgid "" "Remote nodes supporting media type filtering will apply your query " -"specifically on archive / program files such as ZIP, 7z, tar, bz2, gz, dep, " +"specifically on archive / program files such as ZIP, 7z, tar, bz2, gz, deb, " "rpm and also exe files." msgstr ""
View file
gtk-gnutella-1.1.9.tar.bz2/po/nb.po -> gtk-gnutella-1.1.11.tar.bz2/po/nb.po
Changed
@@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: gtk-gnutella\n" "Report-Msgid-Bugs-To: gtk-gnutella-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-03-06 08:49+0100\n" +"POT-Creation-Date: 2016-11-08 08:30+0100\n" "PO-Revision-Date: 2016-02-15 08:28+0000\n" "Last-Translator: Jeroen Asselman <jeroen@asselman.com>\n" "Language-Team: Norwegian Bokmål (http://www.transifex.com/gtk-gnutella/gtk-" @@ -1062,6 +1062,10 @@ msgid "G2 hits on local partial files" msgstr "" +#, fuzzy +msgid "Hits on aliased queries" +msgstr "Sammenpakkede spørringer" + msgid "Query hits received for OOB-proxied queries" msgstr "Spørringstreff mottatt fra OOB-mellomtjente spørringer" @@ -1128,6 +1132,9 @@ msgid "SHA1 G2 queries" msgstr "" +msgid "Queries with aliased words" +msgstr "" + msgid "GUESS queries" msgstr "" @@ -4672,6 +4679,10 @@ msgid "No TCP listening socket bound to allow incoming connections." msgstr "" +#, fuzzy +msgid "Defines whether Gnutella queries should be traced." +msgstr "Velg hvilke utvekslinger av Gnutella-hoder som skal spores." + msgid "disable" msgstr "slå av" @@ -5149,7 +5160,7 @@ msgid "" "Remote nodes supporting media type filtering will apply your query " -"specifically on archive / program files such as ZIP, 7z, tar, bz2, gz, dep, " +"specifically on archive / program files such as ZIP, 7z, tar, bz2, gz, deb, " "rpm and also exe files." msgstr ""
View file
gtk-gnutella-1.1.9.tar.bz2/po/nl.po -> gtk-gnutella-1.1.11.tar.bz2/po/nl.po
Changed
@@ -10,7 +10,7 @@ msgstr "" "Project-Id-Version: gtk-gnutella\n" "Report-Msgid-Bugs-To: gtk-gnutella-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-03-06 08:49+0100\n" +"POT-Creation-Date: 2016-11-08 08:30+0100\n" "PO-Revision-Date: 2016-02-15 08:28+0000\n" "Last-Translator: Jeroen Asselman <jeroen@asselman.com>\n" "Language-Team: Dutch (http://www.transifex.com/gtk-gnutella/gtk-gnutella/" @@ -1067,6 +1067,10 @@ msgid "G2 hits on local partial files" msgstr "G2 hits op lokale gedeeltelijke bestanden" +#, fuzzy +msgid "Hits on aliased queries" +msgstr "Hits voor \"Wat is er nieuw?\" query's" + msgid "Query hits received for OOB-proxied queries" msgstr "Query hits ontvangen voor OOB geproxiede opdrachten" @@ -1135,6 +1139,9 @@ msgid "SHA1 G2 queries" msgstr "SHA1 G2 query's" +msgid "Queries with aliased words" +msgstr "" + msgid "GUESS queries" msgstr "GUESS query's" @@ -4936,6 +4943,10 @@ msgid "No TCP listening socket bound to allow incoming connections." msgstr "" +#, fuzzy +msgid "Defines whether Gnutella queries should be traced." +msgstr "Bepaalt welke Gnutella-header uitwisselingen moeten worden getraceerd." + msgid "disable" msgstr "uitschakelen" @@ -5447,9 +5458,10 @@ "Externe nodes die media type filtering ondersteunen zullen uw query " "specifiek op hun afbeelding bestanden uitvoeren." +#, fuzzy msgid "" "Remote nodes supporting media type filtering will apply your query " -"specifically on archive / program files such as ZIP, 7z, tar, bz2, gz, dep, " +"specifically on archive / program files such as ZIP, 7z, tar, bz2, gz, deb, " "rpm and also exe files." msgstr "" "Remote nodes welke filteren op media type ondersteunen zullen je query "
View file
gtk-gnutella-1.1.9.tar.bz2/po/tr.po -> gtk-gnutella-1.1.11.tar.bz2/po/tr.po
Changed
@@ -4,15 +4,15 @@ # # Translators: # mauron, 2013 -# mauron, 2013-2015 +# mauron, 2013-2016 # Uğur Çetin <ugur.jnmbk@gmail.com>, 2006 msgid "" msgstr "" "Project-Id-Version: gtk-gnutella\n" "Report-Msgid-Bugs-To: gtk-gnutella-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-03-06 08:49+0100\n" -"PO-Revision-Date: 2016-02-15 08:28+0000\n" -"Last-Translator: Jeroen Asselman <jeroen@asselman.com>\n" +"POT-Creation-Date: 2016-11-08 08:30+0100\n" +"PO-Revision-Date: 2016-08-31 15:19+0000\n" +"Last-Translator: mauron\n" "Language-Team: Turkish (http://www.transifex.com/gtk-gnutella/gtk-gnutella/" "language/tr/)\n" "Language: tr\n" @@ -266,7 +266,7 @@ msgstr "İçerik-Kodlama (Content-Encoding) desteklenmiyor (%s)" msgid "Incomplete headers during TLS upgrade" -msgstr "" +msgstr "TLS yükseltmesi sırasında eksik başlıklar" msgid "Spammer detected" msgstr "Spamcı tespit edildi" @@ -593,10 +593,10 @@ msgstr "Kabul edilemez protokol" msgid "Conflict" -msgstr "" +msgstr "Çatışma" msgid "Upgrade Header Missing" -msgstr "" +msgstr "Yükseltme Başlığı Eksik" msgid "Servent Shutdown" msgstr "İstemci kapanıyor" @@ -745,11 +745,11 @@ #, c-format msgid "Another gtk-gnutella supervisor is running as PID %lu" -msgstr "" +msgstr "Başka bir gtk-gnutella gözetmeni PID %lu olarak çalışmaktadır" #, c-format msgid "Another gtk-gnutella is running as PID %lu" -msgstr "" +msgstr "Başka bir gtk-gnutella PID %lu olarak çalışmaktadır" msgid "Cannot proceed without valid configuration directory" msgstr "Geçerli bir yapılandırma klasörü olmadan devam edilemez" @@ -940,7 +940,7 @@ msgstr "" msgid "Content Too Large" -msgstr "" +msgstr "Fazla Geniş İçerik" msgid "Unknown/Missing Protocol Tag" msgstr "Bilinmeyen/Eksik protokol etiketi" @@ -1065,6 +1065,10 @@ msgid "G2 hits on local partial files" msgstr "Yerel kısmi dosyalara G2 isabetleri" +#, fuzzy +msgid "Hits on aliased queries" +msgstr "\"Yeni olanlar\" sorgularına isabetler" + msgid "Query hits received for OOB-proxied queries" msgstr "OOB vekilli sorgular için alınan sorgu isabetleri" @@ -1135,6 +1139,9 @@ msgid "SHA1 G2 queries" msgstr "SHA1 G2 sorguları" +msgid "Queries with aliased words" +msgstr "" + msgid "GUESS queries" msgstr "GUESS sorguları" @@ -3311,6 +3318,8 @@ "Maximum amount of leaves we can accept. To be promoted Ultra, you should " "reserve 32 bytes/sec of bandwidth per leaf." msgstr "" +"Kabul edebileceğimiz azami yaprak sayısı. Ultra durumuna terfi etmek için " +"yaprak başına 32 bayt/saniye bant genişliği ayırmanız önerilir." msgid "What to do with files that will be ignored for downloading." msgstr "İndirmeler için görmezden gelinecek dosyalar ile ne yapılacağı." @@ -4953,9 +4962,18 @@ "unchanged when gtk-gnutella restarts after a crash or an explicit restart " "request." msgstr "" +"Güncel oturumun başladığı zamanla ilişkili zaman damgası. gtk-gnutella bir " +"çökmenin ardından ya da açık bir tekrar başlatma talebinden sonra tekrar " +"başladığında bu zaman damgası değişmez." msgid "No TCP listening socket bound to allow incoming connections." msgstr "" +"İçeri gelen bağlantılara izin vermek için bağlı hiçbir TCP dinleme soketi " +"yoktur." + +#, fuzzy +msgid "Defines whether Gnutella queries should be traced." +msgstr "Hangi Gnutella başlık alışverişlerinin izleneceğini tanımlar." msgid "disable" msgstr "devre dışı" @@ -5467,7 +5485,7 @@ msgid "" "Remote nodes supporting media type filtering will apply your query " -"specifically on archive / program files such as ZIP, 7z, tar, bz2, gz, dep, " +"specifically on archive / program files such as ZIP, 7z, tar, bz2, gz, deb, " "rpm and also exe files." msgstr "" "Dosya tipi filtrelemesini destekleyen diğer düğümler sorgunuzu ZİP, 7z, tar, " @@ -6453,7 +6471,7 @@ msgstr "Değer eksik" msgid "Property cannot be changed" -msgstr "" +msgstr "Özellik değiştirilemez" #, c-format msgid "Previous value was %s" @@ -9028,7 +9046,7 @@ msgstr "Yaprak trafiği istatistiklerini _otomatik sakla" msgid "Glossary" -msgstr "" +msgstr "Sözlük" msgid "_Search" msgstr "A_ra" @@ -9315,6 +9333,8 @@ "<html><head><title>Glossary</title></head><body><p>The glossary document " "could not be loaded.</p></body></html>" msgstr "" +"<html><head><title>Sözlük</title></head><body><p>Sözlük belgesi yüklenemedi." +"</p></body></html>" #, c-format msgid "%lu file shared (%s)" @@ -9729,6 +9749,7 @@ msgid "*** NO LISTENING TCP SOCKET -- NO INBOUND CONNECTIONS ***" msgstr "" +"*** HİÇBİR TCP DİNLEME SOKETİ YOKTUR -- İÇERİ GELEN BAĞLANTI YOKTUR ***" msgid "*** UPLOADS STALLING, BANDWIDTH SHORTAGE? ***" msgstr "*** GÖNDERMELER DURAKLIYOR, BANT GENİŞLİĞİ YETERSİZ Mİ? ***" @@ -9785,7 +9806,7 @@ msgstr "Kuyruk donduruldu" msgid "Internal" -msgstr "" +msgstr "Dahili" msgid "Select a property to see its description." msgstr "Görüntülemek için bir özellik seçin."
View file
gtk-gnutella-1.1.9.tar.bz2/po/uk.po -> gtk-gnutella-1.1.11.tar.bz2/po/uk.po
Changed
@@ -10,7 +10,7 @@ msgstr "" "Project-Id-Version: gtk-gnutella\n" "Report-Msgid-Bugs-To: gtk-gnutella-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-03-06 08:49+0100\n" +"POT-Creation-Date: 2016-11-08 08:30+0100\n" "PO-Revision-Date: 2016-02-15 08:28+0000\n" "Last-Translator: Jeroen Asselman <jeroen@asselman.com>\n" "Language-Team: Ukrainian (http://www.transifex.com/gtk-gnutella/gtk-gnutella/" @@ -1073,6 +1073,9 @@ msgid "G2 hits on local partial files" msgstr "" +msgid "Hits on aliased queries" +msgstr "" + msgid "Query hits received for OOB-proxied queries" msgstr "" @@ -1139,6 +1142,9 @@ msgid "SHA1 G2 queries" msgstr "" +msgid "Queries with aliased words" +msgstr "" + msgid "GUESS queries" msgstr "" @@ -4262,6 +4268,9 @@ msgid "No TCP listening socket bound to allow incoming connections." msgstr "" +msgid "Defines whether Gnutella queries should be traced." +msgstr "" + msgid "disable" msgstr "вимкнути" @@ -4707,7 +4716,7 @@ msgid "" "Remote nodes supporting media type filtering will apply your query " -"specifically on archive / program files such as ZIP, 7z, tar, bz2, gz, dep, " +"specifically on archive / program files such as ZIP, 7z, tar, bz2, gz, deb, " "rpm and also exe files." msgstr ""
View file
gtk-gnutella-1.1.9.tar.bz2/po/zh_CN.po -> gtk-gnutella-1.1.11.tar.bz2/po/zh_CN.po
Changed
@@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: gtk-gnutella\n" "Report-Msgid-Bugs-To: gtk-gnutella-devel@lists.sf.net\n" -"POT-Creation-Date: 2016-03-06 08:49+0100\n" +"POT-Creation-Date: 2016-11-08 08:30+0100\n" "PO-Revision-Date: 2016-02-15 08:28+0000\n" "Last-Translator: Jeroen Asselman <jeroen@asselman.com>\n" "Language-Team: Chinese (China) (http://www.transifex.com/gtk-gnutella/gtk-" @@ -1055,6 +1055,10 @@ msgid "G2 hits on local partial files" msgstr "" +#, fuzzy +msgid "Hits on aliased queries" +msgstr "已生成的查询" + msgid "Query hits received for OOB-proxied queries" msgstr "" @@ -1121,6 +1125,9 @@ msgid "SHA1 G2 queries" msgstr "" +msgid "Queries with aliased words" +msgstr "" + msgid "GUESS queries" msgstr "" @@ -4280,6 +4287,9 @@ msgid "No TCP listening socket bound to allow incoming connections." msgstr "" +msgid "Defines whether Gnutella queries should be traced." +msgstr "" + msgid "disable" msgstr "禁用" @@ -4725,7 +4735,7 @@ msgid "" "Remote nodes supporting media type filtering will apply your query " -"specifically on archive / program files such as ZIP, 7z, tar, bz2, gz, dep, " +"specifically on archive / program files such as ZIP, 7z, tar, bz2, gz, deb, " "rpm and also exe files." msgstr ""
View file
gtk-gnutella-1.1.9.tar.bz2/scripts/nm-list -> gtk-gnutella-1.1.11.tar.bz2/scripts/nm-list
Changed
@@ -54,7 +54,14 @@ *) SHA1SUM=$TOP/src/bin/sha1sum ;; esac -date=`date` +if + date=`date --utc \ + --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" 2>/dev/null` +then + : ok +else + date=`date -jr ${SOURCE_DATE_EPOCH:-$(date +%s)}` +fi sha1=`$SHA1SUM $file 2>/dev/null | cut -f1 -d' '` case "$sha1" in '') echo "Failed to compute SHA1 of $file" >&2; exit 1;; @@ -66,7 +73,7 @@ fi rm -f $TMP -NM=${nm-nm} +NM=${nm:-nm} cat <<EOH NM/1.0
View file
gtk-gnutella-1.1.9.tar.bz2/src/core/Jmakefile -> gtk-gnutella-1.1.11.tar.bz2/src/core/Jmakefile
Changed
@@ -27,6 +27,7 @@ DependSubdirs() SRC = \ + alias.c \ alive.c \ ban.c \ bh_download.c \
View file
gtk-gnutella-1.1.9.tar.bz2/src/core/Makefile.SH -> gtk-gnutella-1.1.11.tar.bz2/src/core/Makefile.SH
Changed
@@ -1,5 +1,5 @@ -: Makefile.SH generated from Jmake.tmpl and Jmakefile jmake 3.5-195 -: $X-Id: Jmake.tmpl 183 2015-04-12 09:48:11Z rmanfredi $ +: Makefile.SH generated from Jmake.tmpl and Jmakefile jmake 3.5-203 +: $X-Id$ case $CONFIG in '') @@ -70,7 +70,7 @@ $spitshell >>Makefile <<'!NO!SUBS!' ######################################################################## # Jmake rules for building libraries, programs, scripts, and data files -# $X-Id: Jmake.rules 195 2015-04-27 21:30:17Z rmanfredi $ +# $X-Id$ ######################################################################## # Force 'make depend' to be performed first -- do not edit @@ -93,6 +93,7 @@ done SRC = \ + alias.c \ alive.c \ ban.c \ bh_download.c \ @@ -197,6 +198,7 @@ whitelist.c OBJ = \ + alias.o \ alive.o \ ban.o \ bh_download.o \
View file
gtk-gnutella-1.1.11.tar.bz2/src/core/alias.c
Added
@@ -0,0 +1,598 @@ +/* + * Copyright (c) 2016 Raphael Manfredi + * + *---------------------------------------------------------------------- + * This file is part of gtk-gnutella. + * + * gtk-gnutella is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * gtk-gnutella is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with gtk-gnutella; if not, write to the Free Software + * Foundation, Inc.: + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + *---------------------------------------------------------------------- + */ + +/** + * @ingroup core + * @file + * + * Managing search word aliases. + * + * An alias is defined here as a set of search words that can be used + * indistinctly without any one being the "right" one. + * + * Currently this implementation handles the way different people have + * of naming series of objects that can be broken into sets. For instance, + * the 8th entry of set #4 can be encoded as "s04e08", or "4x08", or "408", or + * even "04x08". Because it is unknown which naming convention will be used, + * we must treat all these as equivalent. + * + * So we would define { "s04e08", "4x08", "408", "04x08" } as an alias set. + * + * When a word in a shared file matches one of the atrings in an alias set, we + * must advertise all the words in the set in the QRP table, and when one + * looks for any of the strings in the set, we must report a match if there + * is a file bearing one of the other strings in the set. + * + * To optimize searching, we normalize the file names bearing one of the words + * in the alias set, we normalize the query by replacing words by their + * normalized form and we also search for that, in addition to the original + * query. + * + * @author Raphael Manfredi + * @date 2016 + */ + +#include "common.h" + +#include "alias.h" + +#include "lib/ascii.h" +#include "lib/halloc.h" +#include "lib/hset.h" +#include "lib/hstrfn.h" +#include "lib/parse.h" +#include "lib/strvec.h" +#include "lib/walloc.h" + +#include "lib/override.h" /* Must be the last header included */ + +enum alias_params_magic { ALIAS_PARAMS_MAGIC = 0x42822a17 }; + +/** + * Set generating parameters. + * + * This is a generic data structure whose size and interpretation will vary + * depending on the actual alias set. + * + * However, the head of the data structure will always be matching the following + * fields. + */ +struct alias_params { + enum alias_params_magic magic; /* Magic number */ + uint len; /* Total length of the structure */ + char params1; /* Start of parameters */ +}; + +static inline void +alias_params_check(const struct alias_params * const ap) +{ + g_assert(ap != NULL); + g_assert(ALIAS_PARAMS_MAGIC == ap->magic); +} + +/** + * An alias generator function. + * + * Given the set generation parameters, this routine fills a pre-allocated array + * with all the words in the set. The array is NULL-terminated for convenience + * (allowing it to be treated as any other "string vector") and must therefore + * be correctly sized to hold that extra value by the caller. + * + * The interpretation of the "param" argument is left to the generation routine. + * It will typically be a pointer to a structure providing the actual set + * generation instructions. + * + * The first item in the vector can be considered as the normalized form + * of the set. + * + * @param ap the alias set generation parameters + * @param vec pre-allocated string vector, with cnt entries + * @param cnt size of the string vector + */ +typedef void (*alias_wordgen_t)(const alias_params_t *ap, + char **vec, size_t cnt); + +/** + * Allocates the normalized form of the set with defined generation parameters. + * + * @param ap the alias set generation parameters + */ +typedef char *(*alias_normalized_t)(const alias_params_t *ap); + +/** + * A routine checking whether a word is part of a set. + * + * This is typically a pattern-matching routine that will return TRUE if + * the given word is part of a set. + * + * @param word the word to attempt to match + * @param params where address of allocated generation parameters is stored + */ +typedef bool (*alias_match_t)(const char *word, alias_params_t **params); + +enum alias_set_magic { ALIAS_SET_MAGIC = 0x6c8cf00f }; + +/** + * A description of a known set. + */ +struct alias_set { + enum alias_set_magic magic; + const char *name; /**< set name, for debugging */ + size_t count; /**< the set count */ + alias_wordgen_t wordgen; /**< routine generating the set of words */ + alias_match_t match; /**< routine to check whether word matches */ + alias_normalized_t normal; /**< routine to generate normalized string */ + size_t params_size; /**< size of parameter structure */ +}; + +static inline void +alias_set_check(const struct alias_set * const as) +{ + g_assert(as != NULL); + g_assert(ALIAS_SET_MAGIC == as->magic); +} + +/* === The "series" alias set === */ + +/** + * Generation parameters for the "series" aliases. + */ +struct alias_params_series { + /* Mandatory generic fields */ + enum alias_params_magic magic; /* Magic number */ + uint len; /* Total length of the structure */ + /* Set-specific fields */ + uint season; /* Season number */ + uint episode; /* Episode number */ +}; + +/** + * Allocates the normalized string for the "series" set. + * + * @param ap the alias set generation parameters + */ +static char * +alias_series_normalized(const alias_params_t *ap) +{ + struct alias_params_series *p = (struct alias_params_series *) ap; + + g_assert(ap->len == sizeof(struct alias_params_series)); + + return h_strdup_printf("s%02ue%02u", p->season, p->episode); +} + +/** + * Generator for the "series" set. + * + * The first entry in the vector is the normalized form of the set. + * + * @param ap the alias set generation parameters + * @param vec pre-allocated string vector, with cnt entries + * @param cnt size of the string vector + */ +static void +alias_series_gen(const alias_params_t *ap, char **vec, size_t cnt) +{ + struct alias_params_series *p = (struct alias_params_series *) ap; + size_t n = 0; + + g_assert(ap->len == sizeof(struct alias_params_series));
View file
gtk-gnutella-1.1.11.tar.bz2/src/core/alias.h
Added
@@ -0,0 +1,52 @@ +/* + * Copyright (c) 2016 Raphael Manfredi + * + *---------------------------------------------------------------------- + * This file is part of gtk-gnutella. + * + * gtk-gnutella is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * gtk-gnutella is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with gtk-gnutella; if not, write to the Free Software + * Foundation, Inc.: + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + *---------------------------------------------------------------------- + */ + +/** + * @ingroup core + * @file + * + * Managing search word aliases. + * + * @author Raphael Manfredi + * @date 2016 + */ + +#ifndef _core_alias_h_ +#define _core_alias_h_ + +struct alias_set; +typedef struct alias_set alias_set_t; + +struct alias_params; +typedef struct alias_params alias_params_t; + +/* + * Public interface. + */ + +char *alias_normalize(const char *str, const char *delim); +char **alias_expand(const char *str, const char *delim); + +#endif /* _core_alias_h_ */ + +/* vi: set ts=4 sw=4 cindent: */
View file
gtk-gnutella-1.1.9.tar.bz2/src/core/bh_upload.c -> gtk-gnutella-1.1.11.tar.bz2/src/core/bh_upload.c
Changed
@@ -56,6 +56,7 @@ #include "lib/gnet_host.h" #include "lib/halloc.h" #include "lib/header.h" +#include "lib/hstrfn.h" #include "lib/product.h" #include "lib/pslist.h" #include "lib/stringify.h"
View file
gtk-gnutella-1.1.9.tar.bz2/src/core/bsched.c -> gtk-gnutella-1.1.11.tar.bz2/src/core/bsched.c
Changed
@@ -44,6 +44,7 @@ #include "lib/compat_sendfile.h" #include "lib/entropy.h" #include "lib/halloc.h" +#include "lib/hstrfn.h" #include "lib/inputevt.h" #include "lib/parse.h" #include "lib/plist.h"
View file
gtk-gnutella-1.1.9.tar.bz2/src/core/ctl.c -> gtk-gnutella-1.1.11.tar.bz2/src/core/ctl.c
Changed
@@ -39,6 +39,7 @@ #include "lib/ascii.h" #include "lib/halloc.h" +#include "lib/hstrfn.h" #include "lib/htable.h" #include "lib/iso3166.h" #include "lib/misc.h"
View file
gtk-gnutella-1.1.9.tar.bz2/src/core/dmesh.c -> gtk-gnutella-1.1.11.tar.bz2/src/core/dmesh.c
Changed
@@ -69,6 +69,7 @@ #include "lib/hashlist.h" #include "lib/header.h" #include "lib/hikset.h" +#include "lib/hstrfn.h" #include "lib/htable.h" #include "lib/parse.h" #include "lib/pslist.h"
View file
gtk-gnutella-1.1.9.tar.bz2/src/core/downloads.c -> gtk-gnutella-1.1.11.tar.bz2/src/core/downloads.c
Changed
@@ -106,6 +106,7 @@ #include "lib/hashing.h" #include "lib/hashlist.h" #include "lib/hikset.h" +#include "lib/hstrfn.h" #include "lib/htable.h" #include "lib/http_range.h" #include "lib/idtable.h" @@ -8185,16 +8186,6 @@ download_remove_file(d, FALSE); } -void -download_request_abort(struct download *d) -{ - download_check(d); - g_return_if_fail(d->file_info); - file_info_check(d->file_info); - - download_abort(d); -} - static void download_resume(struct download *d) {
View file
gtk-gnutella-1.1.9.tar.bz2/src/core/fileinfo.c -> gtk-gnutella-1.1.11.tar.bz2/src/core/fileinfo.c
Changed
@@ -7893,6 +7893,41 @@ } /** + * hikset_foreach() iterator. + * + * Insert file info in list if it can be freed. + */ +static void +fi_test_completed(void *data, void *udata) +{ + fileinfo_t *fi = data; + pslist_t **list = udata; + + file_info_check(fi); + + if (FILE_INFO_FINISHED(fi) && !(FI_F_SEEDING & fi->flags)) + *list = pslist_prepend(*list, fi); +} + +/** + * Clear completed entries that are not beeing seeded. + */ +void +file_info_clear_completed(void) +{ + pslist_t *to_remove = NULL, *sl; + + hikset_foreach(fi_by_guid, fi_test_completed, &to_remove); + + PSLIST_FOREACH(to_remove, sl) { + fileinfo_t *fi = sl->data; + file_info_purge(fi); + } + + pslist_free(to_remove); +} + +/** * Initialize fileinfo handling. */ void G_COLD
View file
gtk-gnutella-1.1.9.tar.bz2/src/core/g2/gwc.c -> gtk-gnutella-1.1.11.tar.bz2/src/core/g2/gwc.c
Changed
@@ -52,6 +52,7 @@ #include "lib/halloc.h" #include "lib/header.h" /* For header_dump() */ #include "lib/hset.h" +#include "lib/hstrfn.h" #include "lib/log.h" /* For log_printable() */ #include "lib/misc.h" #include "lib/random.h"
View file
gtk-gnutella-1.1.9.tar.bz2/src/core/g2/node.c -> gtk-gnutella-1.1.11.tar.bz2/src/core/g2/node.c
Changed
@@ -67,6 +67,7 @@ #include "lib/ascii.h" #include "lib/halloc.h" #include "lib/host_addr.h" +#include "lib/hstrfn.h" #include "lib/misc.h" /* For dump_hex() */ #include "lib/pmsg.h" #include "lib/str.h" @@ -876,6 +877,7 @@ */ ZERO(&sri); + sri.magic = SEARCH_REQUEST_INFO_MAGIC; /* * Handle the children of /Q2.
View file
gtk-gnutella-1.1.9.tar.bz2/src/core/ghc.c -> gtk-gnutella-1.1.11.tar.bz2/src/core/ghc.c
Changed
@@ -43,6 +43,7 @@ #include "lib/atoms.h" #include "lib/getline.h" #include "lib/halloc.h" +#include "lib/hstrfn.h" #include "lib/list.h" #include "lib/random.h" #include "lib/str.h"
View file
gtk-gnutella-1.1.9.tar.bz2/src/core/hcache.c -> gtk-gnutella-1.1.11.tar.bz2/src/core/hcache.c
Changed
@@ -806,6 +806,41 @@ return FALSE; } + /* + * Prevent nodes to which we had a recent TCP connection failure from + * being added to the cache. + * --RAM, 2016-08-29 + */ + + switch (type) { + case HCACHE_GUESS: + case HCACHE_GUESS_INTRO: + case HCACHE_GUESS6: + case HCACHE_GUESS6_INTRO: + /* UDP node address may not be TCP-connectible */ + break; + case HCACHE_TIMEOUT: + case HCACHE_BUSY: + case HCACHE_UNSTABLE: + case HCACHE_ALIEN: + case HCACHE_NONE: + /* We don't care whether host is TCP-connectible! */ + break; + case HCACHE_FRESH_ANY: + case HCACHE_VALID_ANY: + case HCACHE_FRESH_ULTRA: + case HCACHE_VALID_ULTRA: + case HCACHE_FRESH_ULTRA6: + case HCACHE_VALID_ULTRA6: + case HCACHE_FRESH_G2HUB: + case HCACHE_VALID_G2HUB: + if (node_had_recent_connect_failure(addr, port)) + return FALSE; + break; + case HCACHE_MAX: + g_assert_not_reached(); + } + switch (type) { case HCACHE_FRESH_ANY: case HCACHE_FRESH_ULTRA: @@ -1018,6 +1053,9 @@ /** * Add host to the proper cache. + * + * @return TRUE when IP/port passed sanity checks, regardless of whether it + * was added to the cache. */ bool hcache_add(hcache_type_t type,
View file
gtk-gnutella-1.1.9.tar.bz2/src/core/http.c -> gtk-gnutella-1.1.11.tar.bz2/src/core/http.c
Changed
@@ -56,6 +56,7 @@ #include "lib/gnet_host.h" #include "lib/halloc.h" #include "lib/header.h" +#include "lib/hstrfn.h" #include "lib/http_range.h" /* For http_range_test() */ #include "lib/log.h" /* For log_printable() */ #include "lib/mempcpy.h"
View file
gtk-gnutella-1.1.9.tar.bz2/src/core/matching.c -> gtk-gnutella-1.1.11.tar.bz2/src/core/matching.c
Changed
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2001-2003, Raphael Manfredi + * Copyright (c) 2001-2003, 2016 Raphael Manfredi * * Search bins are Copyright (c) 2001-2003, Kenn Brooks Hamm & Raphael Manfredi * @@ -26,9 +26,12 @@ #include "common.h" #include "matching.h" + +#include "alias.h" +#include "gnet_stats.h" #include "qrp.h" /* For qhvec_add() */ -#include "share.h" #include "search.h" /* For lazy_safe_search() */ +#include "share.h" #include "lib/ascii.h" #include "lib/atomic.h" @@ -48,12 +51,15 @@ #define WOVEC_DFLT 10 /**< Default size of word-vectors */ +typedef uint64 st_mask_t; + /* * Masks for mask_hash(). */ -#define MASK_LETTER(x) (1 << (x)) /**< bits 0 to 25 */ -#define MASK_DIGIT 0x80000000 +#define MASK_LETTER(x) (((st_mask_t) 1) << (x)) /**< bits 0 to 25 */ +#define MASK_DIGIT(x) (((st_mask_t) 1) << ((x)+26)) /**< bits 26 to 35 */ +#define MASK_OTHER (((st_mask_t) 1) << 36) /**< bit 36 */ /* * Search table searching routines. @@ -85,24 +91,29 @@ struct st_entry { const char *string; /* atom */ shared_file_t *sf; - uint32 mask; + st_mask_t mask; }; struct st_bin { - int nslots, nvals; + uint nslots, nvals; struct st_entry **vals; }; -enum search_table_magic { SEARCH_TABLE_MAGIC = 0x0cf66242 }; - -struct search_table { - enum search_table_magic magic; - int nentries, nchars, nbins; +struct st_set { + uint nentries, nchars, nbins; struct st_bin **bins; struct st_bin all_entries; uchar index_mapMAX_INT_VAL(uchar); uchar fold_mapMAX_INT_VAL(uchar); +}; + +enum search_table_magic { SEARCH_TABLE_MAGIC = 0x0cf66242 }; + +struct search_table { + enum search_table_magic magic; int refcnt; + struct st_set plain; /* Plain table, original names */ + struct st_set alias; /* Normalized names */ }; static inline void @@ -128,7 +139,7 @@ static void bin_initialize(struct st_bin *bin, int size) { - int i; + uint i; bin->nvals = 0; bin->nslots = size; @@ -183,8 +194,6 @@ static void bin_compact(struct st_bin *bin) { - g_assert(bin->vals != NULL); /* Or it would not have been allocated */ - HREALLOC_ARRAY(bin->vals, bin->nvals); bin->nslots = bin->nvals; } @@ -192,7 +201,7 @@ static uchar mapMAX_INT_VAL(uchar); static void -setup_map(void) +st_setup_map(void) { static bool done; uint i; @@ -223,106 +232,137 @@ } /** - * Initialize permanent data in search table. + * Initialize permanent entries in a table set. */ static void -st_initialize(search_table_t *table) +st_set_initialize(struct st_set *set) { - uchar cur_char = '\0'; uint i; + uchar cur_char = '\0'; - search_table_check(table); - - table->refcnt = 1; - table->nentries = table->nchars = 0; - setup_map(); + set->nentries = set->nchars = 0; /* * The indexing map is used to avoid having 256*256 bins. */ - for (i = 0; i < N_ITEMS(table->index_map); i++) { + for (i = 0; i < N_ITEMS(set->index_map); i++) { uchar map_char = mapi; - if (table->fold_mapmap_char) { - table->index_mapi = table->fold_mapmap_char; + if (set->fold_mapmap_char) { + set->index_mapi = set->fold_mapmap_char; } else { - table->fold_mapmap_char = cur_char; - table->index_mapi = cur_char; + set->fold_mapmap_char = cur_char; + set->index_mapi = cur_char; cur_char++; } } - table->nchars = cur_char; - table->nbins = table->nchars * table->nchars; - table->bins = NULL; - table->all_entries.vals = 0; + set->nchars = cur_char; + set->nbins = set->nchars * set->nchars; + set->bins = NULL; + set->all_entries.vals = 0; if (GNET_PROPERTY(matching_debug)) { static bool done; if (!done) { done = TRUE; - g_debug("MATCH search tables will use %d bins max " - "(%d indexing chars)", table->nbins, table->nchars); + g_debug("MATCH search sets will use %d bins max " + "(%d indexing chars)", set->nbins, set->nchars); } } } /** - * Recreate variable parts of the search table. + * Initialize permanent data in search table. */ static void -st_recreate(search_table_t *table) +st_initialize(search_table_t *table) { - int i; - search_table_check(table); - g_assert(NULL == table->bins); - - HALLOC_ARRAY(table->bins, table->nbins); - for (i = 0; i < table->nbins; i++) - table->binsi = NULL; - bin_initialize(&table->all_entries, ST_MIN_BIN_SIZE); + table->refcnt = 1; + st_setup_map(); + st_set_initialize(&table->plain); + st_set_initialize(&table->alias); } /** - * Destroy a search table, if its reference count dropped to 0. - * - * @return TRUE if table was destroyed, FALSE if some reference still remains. + * Recreate variable parts of the searching sets. */ -static bool -st_destroy(search_table_t *table)
View file
gtk-gnutella-1.1.9.tar.bz2/src/core/matching.h -> gtk-gnutella-1.1.11.tar.bz2/src/core/matching.h
Changed
@@ -71,28 +71,38 @@ search_table_t *st_create(void); void st_free(search_table_t **); -bool st_insert_item(search_table_t *, const char *key, - const struct shared_file *sf); void st_compact(search_table_t *); -int st_count(const search_table_t *st); search_table_t *st_refcnt_inc(search_table_t *st); +enum match_set { + ST_SET_PLAIN, /**< Plain names, as they are listed */ + ST_SET_ALIAS, /**< Aliased names, normalized form */ +}; + +int st_count(const search_table_t *st, enum match_set which); +bool st_insert_item(search_table_t *, enum match_set which, const char *key, + const struct shared_file *sf); + /** * Callback for st_search(). * * @param ctx the search context (opaque for st_search) * @param data the matched data (shared file, opaque for st_search) + * @param limits whether to apply limits (media type, size restrictions, ...) * * @return TRUE if the match must be accounted as a valid result. */ -typedef bool (*st_search_callback)(void *ctx, const void *data); +typedef bool (*st_search_callback)(void *ctx, const void *data, bool limits); + +struct search_request_info; int st_search( search_table_t *table, const char *search, + const struct search_request_info *sri, st_search_callback callback, void *ctx, - int max_res, + uint max_res, struct query_hashvec *qhv); void st_fill_qhv(const char *search_term, struct query_hashvec *qhv);
View file
gtk-gnutella-1.1.9.tar.bz2/src/core/move.c -> gtk-gnutella-1.1.11.tar.bz2/src/core/move.c
Changed
@@ -199,7 +199,7 @@ { (void) unused_h; - teq_safe_rpc(THREAD_MAIN, move_notify, bool_to_pointer(on)); + teq_safe_rpc(THREAD_MAIN_ID, move_notify, bool_to_pointer(on)); teq_post(move_thread_id, move_notification_change, bool_to_pointer(on)); } @@ -241,7 +241,7 @@ bg_task_signal(h, BG_SIG_TERM, move_d_sighandler); md->d = we->d; - teq_safe_rpc(THREAD_MAIN, move_starting, md); + teq_safe_rpc(THREAD_MAIN_ID, move_starting, md); md->rd = file_object_open(download_pathname(d), O_RDONLY); if (NULL == md->rd) { @@ -412,7 +412,7 @@ * updates on the core structures when the move is completed. */ - teq_safe_rpc(THREAD_MAIN, move_done, md); + teq_safe_rpc(THREAD_MAIN_ID, move_done, md); HFREE_NULL(md->target); } @@ -549,12 +549,12 @@ */ if G_UNLIKELY(md->copied == md->size) { - teq_safe_rpc(THREAD_MAIN, move_progress, md); + teq_safe_rpc(THREAD_MAIN_ID, move_progress, md); return BGR_DONE; } if (delta_time(tm_time(), md->last_notify) >= 1) { - teq_safe_rpc(THREAD_MAIN, move_progress, md); + teq_safe_rpc(THREAD_MAIN_ID, move_progress, md); md->last_notify = tm_time(); }
View file
gtk-gnutella-1.1.9.tar.bz2/src/core/nodes.c -> gtk-gnutella-1.1.11.tar.bz2/src/core/nodes.c
Changed
@@ -112,12 +112,14 @@ #include "lib/file.h" #include "lib/getdate.h" #include "lib/getline.h" +#include "lib/gnet_host.h" #include "lib/halloc.h" #include "lib/hash.h" #include "lib/hashlist.h" #include "lib/header.h" #include "lib/hikset.h" #include "lib/hset.h" +#include "lib/hstrfn.h" #include "lib/htable.h" #include "lib/iovec.h" #include "lib/listener.h" @@ -195,6 +197,8 @@ #define TCP_CRAWLER_FREQ 300 /**< once every 5 minutes */ #define UDP_CRAWLER_FREQ 120 /**< once every 2 minutes */ +#define NODE_CONN_FAILED_FREQ 900 /**< once every 15 minutes */ + #define NODE_FW_CHECK 1200 /**< 20 minutes */ #define NODE_IPP_NEIGHBOURS 8U /**< # of neighbouring UPs to select */ @@ -262,6 +266,8 @@ static aging_table_t *tcp_crawls; static aging_table_t *udp_crawls; +static aging_table_t *node_connect_failures; + typedef struct node_bad_client { const char *vendor; int errors; @@ -892,6 +898,33 @@ } /** + * Register failure to connect to given IP:port. + */ +static void +node_record_connect_failure(const host_addr_t addr, uint16 port) +{ + gnet_host_t host; + + gnet_host_set(&host, addr, port); + aging_insert(node_connect_failures, + atom_host_get(&host), int_to_pointer(1)); +} + +/** + * Check whether IP:port is that of a host to which we had troubles to + * connect to recently. + */ +bool +node_had_recent_connect_failure(const host_addr_t addr, uint16 port) +{ + gnet_host_t host; + + gnet_host_set(&host, addr, port); + + return NULL != aging_lookup(node_connect_failures, &host); +} + +/** * Low frequency node timer. */ void @@ -1405,6 +1438,7 @@ (time_delta_t) GNET_PROPERTY(node_connecting_timeout) ) { node_send_udp_ping(n); + node_record_connect_failure(n->addr, n->port); node_remove(n, _("Timeout")); hcache_add(HCACHE_TIMEOUT, n->addr, 0, "timeout"); continue; @@ -1731,6 +1765,17 @@ host_addr_hash_func, host_addr_eq_func, wfree_host_addr); /* + * Records nodes to which an outgoing connection failed. + * + * This helps preventing us re-trying a connection to that node too + * soon and will also avoid having its IP:port collected from pongs. + * --RAM, 2016-08-29 + */ + + node_connect_failures = aging_make(NODE_CONN_FAILED_FREQ, + gnet_host_hash, gnet_host_equal, gnet_host_free_atom2); + + /* * Known patterns for vendor messages and features. * * The leading space in each pattern is not a mistake: the string which @@ -4242,8 +4287,8 @@ GNET_PROPERTY(node_g2_count) != 0 && !(n->attrs & NODE_A_CAN_INFLATE) ) { - node_send_error(n, 403, - "Compressed connection preferred"); + if (handshaking) + node_send_error(n, 403, "Compressed connection preferred"); node_remove(n, _("Connection not compressed")); return FALSE; } @@ -4301,8 +4346,8 @@ GNET_PROPERTY(node_leaf_count) - compressed_leaf_cnt && !(n->attrs & NODE_A_CAN_INFLATE) ) { - node_send_error(n, 403, - "Compressed connection preferred"); + if (handshaking) + node_send_error(n, 403, "Compressed connection preferred"); node_remove(n, _("Connection not compressed")); return FALSE; } @@ -4357,8 +4402,8 @@ (compressed_node_cnt - compressed_leaf_cnt) && !(n->attrs & NODE_A_CAN_INFLATE) ) { - node_send_error(n, 403, - "Compressed connection preferred"); + if (handshaking) + node_send_error(n, 403, "Compressed connection preferred"); node_remove(n, _("Connection not compressed")); return FALSE; } @@ -4750,15 +4795,6 @@ } /* - * Make sure we do not exceed our maximum amout of connections. - * In particular, if the remote node did not obey our leaf guidance - * and we still have enough ultra nodes, BYE them. - */ - - if (!node_can_accept_connection(n, FALSE)) - return FALSE; - - /* * Since this is the third and final acknowledgement, the remote node * is ready to send Gnutella or G2 data (and so are we, now that we got * the final ack). Mark the connection as fully established, which means @@ -5107,6 +5143,15 @@ } /* + * Make sure we do not exceed our maximum amout of connections. + * In particular, if the remote node did not obey our leaf guidance + * and we still have enough ultra nodes, BYE them. + */ + + if (!node_can_accept_connection(n, FALSE)) + return; + + /* * Initiate QRP sending if we're a leaf node or if we're an ultra node * and the remote note is an UP supporting last-hop QRP. * @@ -8640,6 +8685,8 @@ if (errno == EMFILE || errno == ENFILE) n->flags |= NODE_F_VALID; + else + node_record_connect_failure(addr, port); } } @@ -8722,7 +8769,11 @@ if ( !(SOCK_F_FORCE & flags) && - (hostiles_is_bad(addr) || hcache_node_is_bad(addr)) + ( + hostiles_is_bad(addr) || + hcache_node_is_bad(addr) || + node_had_recent_connect_failure(addr, port) + ) ) return; @@ -8740,7 +8791,11 @@ if ( !(SOCK_F_FORCE & flags) && - (hostiles_is_bad(addr) || hcache_node_is_bad(addr)) + ( + hostiles_is_bad(addr) || + hcache_node_is_bad(addr) || + node_had_recent_connect_failure(addr, port) + ) ) return; @@ -11673,6 +11728,7 @@ aging_destroy(&tcp_crawls); aging_destroy(&udp_crawls); + aging_destroy(&node_connect_failures); pproxy_set_free_null(&proxies); rxbuf_close();
View file
gtk-gnutella-1.1.9.tar.bz2/src/core/nodes.h -> gtk-gnutella-1.1.11.tar.bz2/src/core/nodes.h
Changed
@@ -747,6 +747,7 @@ bool node_address_known(const gnutella_node_t *n); bool node_addr_port_equal(const gnutella_node_t *n, const host_addr_t addr, uint16 port); +bool node_had_recent_connect_failure(const host_addr_t addr, uint16 port); const struct nid *node_id_get_self(void); bool node_id_self(const struct nid *node_id);
View file
gtk-gnutella-1.1.9.tar.bz2/src/core/parq.c -> gtk-gnutella-1.1.11.tar.bz2/src/core/parq.c
Changed
@@ -71,6 +71,7 @@ #include "lib/hashlist.h" #include "lib/hevset.h" #include "lib/hikset.h" +#include "lib/hstrfn.h" #include "lib/htable.h" #include "lib/parse.h" #include "lib/plist.h"
View file
gtk-gnutella-1.1.9.tar.bz2/src/core/pproxy.c -> gtk-gnutella-1.1.11.tar.bz2/src/core/pproxy.c
Changed
@@ -72,6 +72,7 @@ #include "lib/hashlist.h" #include "lib/header.h" #include "lib/host_addr.h" +#include "lib/hstrfn.h" #include "lib/log.h" #include "lib/parse.h" #include "lib/pslist.h"
View file
gtk-gnutella-1.1.9.tar.bz2/src/core/qrp.c -> gtk-gnutella-1.1.11.tar.bz2/src/core/qrp.c
Changed
@@ -47,6 +47,8 @@ #include <zlib.h> #include "qrp.h" + +#include "alias.h" #include "gmsg.h" #include "gnet_stats.h" #include "nodes.h" /* For NODE_IS_WRITABLE() */ @@ -64,6 +66,7 @@ #include "lib/halloc.h" #include "lib/hashing.h" #include "lib/hset.h" +#include "lib/hstrfn.h" #include "lib/htable.h" #include "lib/mutex.h" #include "lib/pow2.h" @@ -1666,21 +1669,19 @@ word_vec_t *wovec; uint wocnt; uint i; + char **aliases, **a; g_assert(sf != NULL); g_assert(words != NULL); - /* - * Copy filename to buffer, since we're going to map it inplace. - */ - g_assert(utf8_is_valid_data(shared_file_name_nfc(sf), shared_file_name_nfc_len(sf))); g_assert(utf8_is_valid_data(shared_file_name_canonic(sf), shared_file_name_canonic_len(sf))); if (qrp_debugging(1)) { - g_debug("QRP adding file \"%s\"", shared_file_name_canonic(sf)); + g_debug("QRP adding file \"%s\"%s", shared_file_name_canonic(sf), + shared_file_needs_aliasing(sf) ? "" : " (with aliases)"); } /* @@ -1699,10 +1700,8 @@ for (i = 0; i < wocnt; i++) { const char *word = woveci.word; - size_t word_len; g_assert(word0 != '\0'); - word_len = strlen(word); /* * Record word if we haven't seen it yet. @@ -1711,11 +1710,10 @@ if (htable_contains(words, word)) { continue; } else { - void *p; + size_t word_len = strlen(word); size_t n = 1 + word_len; - p = wcopy(word, n); - htable_insert(words, p, size_to_pointer(n)); + htable_insert(words, wcopy(word, n), size_to_pointer(n)); } if (qrp_debugging(8)) { @@ -1725,6 +1723,37 @@ } word_vec_free(wovec, wocnt); + + /* + * Handle aliases if needed. + */ + + if (!shared_file_needs_aliasing(sf)) + return; /* Done, no aliases */ + + aliases = alias_expand(shared_file_name_canonic(sf), " "); + + g_assert(NULL != aliases); /* Normalized form is different */ + + for (a = aliases; *a != NULL; a++) { + const char *word = *a; + + if (htable_contains(words, word)) { + continue; + } else { + size_t word_len = strlen(word); + size_t n = 1 + word_len; + + htable_insert(words, wcopy(word, n), size_to_pointer(n)); + } + + if (qrp_debugging(8)) { + g_debug("new QRP word \"%s\" alias from %s", + word, shared_file_name_nfc(sf)); + } + } + + h_strfreev(aliases); } /*
View file
gtk-gnutella-1.1.9.tar.bz2/src/core/search.c -> gtk-gnutella-1.1.11.tar.bz2/src/core/search.c
Changed
@@ -100,6 +100,7 @@ #include "lib/hashing.h" #include "lib/hashlist.h" #include "lib/hset.h" +#include "lib/hstrfn.h" #include "lib/htable.h" #include "lib/idtable.h" #include "lib/iso3166.h" @@ -7603,68 +7604,88 @@ } /** - * Invoked for each new match we get. + * Apply search limits. * - * @return TRUE if the match is kept. + * @param sf the already matched file or matching candidate + * @param sri the search request meta information + * + * @return TRUE if the match is to be kept / attempted. */ -static bool -got_match(void *context, const void *data) +bool +search_apply_limits(const shared_file_t *sf, const search_request_info_t *sri) { - struct query_context *qctx = context; - const shared_file_t *sf = data; - const search_request_info_t *sri = qctx->sri; - shared_file_check(sf); + search_request_info_check(sri); /* - * Don't insert duplicates (possible when matching both by SHA1 and name). + * If there is a media type filtering, ignore files not matching + * their request. */ - if (!shared_file_already_found(qctx, sf)) { - /* - * If there is a media type filtering, ignore files not matching - * their request. - */ - - if ( - 0 != sri->media_types && - !shared_file_has_media_type(sf, sri->media_types) + if ( + 0 != sri->media_types && + !shared_file_has_media_type(sf, sri->media_types) + ) { + if (GNET_PROPERTY(query_debug) > 1 || + GNET_PROPERTY(matching_debug) > 1 ) { + g_debug("MATCH ignoring %s \"%s\", not of type %s", + shared_file_is_partial(sf) ? "partial" : "shared", + shared_file_name_canonic(sf), + search_media_mask_to_string(sri->media_types)); + } + + return FALSE; + } + + /* + * If there is a size limit, apply it. + */ + + if (sri->size_restrictions) { + filesize_t size = shared_file_size(sf); + + if (size < sri->minsize || size > sri->maxsize) { if (GNET_PROPERTY(query_debug) > 1 || GNET_PROPERTY(matching_debug) > 1 ) { - g_debug("MATCH ignoring matched %s \"%s\", not of type %s", + g_debug("MATCH ignoring %s \"%s\": size=%s " + "not within boundaries %s, %s", shared_file_is_partial(sf) ? "partial" : "shared", shared_file_name_canonic(sf), - search_media_mask_to_string(sri->media_types)); + filesize_to_string(size), + filesize_to_string2(sri->minsize), + filesize_to_string3(sri->maxsize)); } return FALSE; } + } - /* - * If there is a size limit, apply it. - */ + return TRUE; +} + +/** + * Invoked for each new match we get. + * + * @return TRUE if the match is kept. + */ +static bool +got_match(void *context, const void *data, bool limits) +{ + struct query_context *qctx = context; + const shared_file_t *sf = data; + const search_request_info_t *sri = qctx->sri; - if (sri->size_restrictions) { - filesize_t size = shared_file_size(sf); + shared_file_check(sf); - if (size < sri->minsize || size > sri->maxsize) { - if (GNET_PROPERTY(query_debug) > 1 || - GNET_PROPERTY(matching_debug) > 1 - ) { - g_debug("MATCH ignoring matched %s \"%s\": size=%s " - "not within boundaries %s, %s", - shared_file_is_partial(sf) ? "partial" : "shared", - shared_file_name_canonic(sf), - filesize_to_string(size), - filesize_to_string2(sri->minsize), - filesize_to_string3(sri->maxsize)); - } + /* + * Don't insert duplicates (possible when matching both by SHA1 and name). + */ - return FALSE; - } - } + if (!shared_file_already_found(qctx, sf)) { + if (limits && !search_apply_limits(sf, sri)) + return FALSE; shared_file_mark_found(qctx, sf); qctx->files = pslist_prepend(qctx->files, shared_file_ref(sf)); @@ -7852,6 +7873,43 @@ } /** + * Convert search request info into a string describing the positionned flags. + * + * @return pointer to static string. + */ +static const char * +search_request_info_as_bits(const struct search_request_info *sri) +{ + static char buf17; + + search_request_info_check(sri); + + buf0 = (sri->flags & QUERY_F_MARK) ? 'M' : '-', + buf1 = (sri->flags & QUERY_F_FIREWALLED) ? 'F' : '-', + buf2 = (sri->flags & QUERY_F_XML) ? 'X' : '-', + buf3 = (sri->flags & QUERY_F_LEAF_GUIDED) ? 'G' : '-', + buf4 = (sri->flags & QUERY_F_GGEP_H) ? 'H' : '-', + buf5 = (sri->flags & QUERY_F_OOB_REPLY) ? 'O' : '-', + buf5 = sri->secure_oob ? '3' : buf5; + buf6 = (sri->flags & QUERY_F_FW_TO_FW) ? 'f' : '-', + buf7 = (sri->flags & QUERY_F_SR_UDP) ? 'R' : '-', + + buf8 = '/'; + + buf9 = sri->g2_query ? '2' : '-'; + buf10 = sri->g2_wants_url ? 'U' : '-'; + buf11 = sri->g2_wants_dn ? 'D' : '-'; + buf12 = sri->g2_wants_alt ? 'A' : '-'; + buf13 = sri->size_restrictions ? 'S' : '-'; + buf14 = sri->extended_query ? 'x' : '-'; + buf15 = sri->partials ? 'p' : '-'; + + buf16 = '\0'; + + return buf; +} + +/** * Remove the OOB delivery flag by patching the query message inplace. */ void @@ -7930,6 +7988,8 @@ search_request_info_t *sri; WALLOC0(sri); + sri->magic = SEARCH_REQUEST_INFO_MAGIC; + return sri; } @@ -7942,7 +8002,9 @@ search_request_info_t *sri = *sri_ptr; if (sri != NULL) { + search_request_info_check(sri); atom_str_free_null(&sri->extended_query); + sri->magic = 0; WFREE(sri); *sri_ptr = NULL; }
View file
gtk-gnutella-1.1.9.tar.bz2/src/core/search.h -> gtk-gnutella-1.1.11.tar.bz2/src/core/search.h
Changed
@@ -102,10 +102,13 @@ #include "extensions.h" /* For MAX_EXTVEC */ +enum search_request_info_magic { SEARCH_REQUEST_INFO_MAGIC = 0x030c7005 }; + /** * Gathered query information. */ struct search_request_info { + enum search_request_info_magic magic; struct { struct sha1 sha1; bool matched; @@ -134,6 +137,14 @@ unsigned g2_wants_dn:1; /**< Do they want DN in hits? */ unsigned g2_wants_alt:1; /**< Do they want ALT in hits? */ }; + +static inline void +search_request_info_check(const struct search_request_info * const sri) +{ + g_assert(sri != NULL); + g_assert(SEARCH_REQUEST_INFO_MAGIC == sri->magic); +} + #endif /* SEARCH_SOURCES */ /* @@ -175,6 +186,9 @@ search_request_info_t *sri, bool isdup); void search_request(struct gnutella_node *n, const search_request_info_t *sri, struct query_hashvec *qhv); +bool search_apply_limits(const struct shared_file *sf, + const search_request_info_t *sri); + size_t compact_query(char *search); void search_compact(struct gnutella_node *n); void query_strip_oob_flag(struct gnutella_node *n, char *data);
View file
gtk-gnutella-1.1.9.tar.bz2/src/core/settings.c -> gtk-gnutella-1.1.11.tar.bz2/src/core/settings.c
Changed
@@ -93,6 +93,7 @@ #include "lib/getphysmemsize.h" #include "lib/glib-missing.h" #include "lib/halloc.h" +#include "lib/hstrfn.h" #include "lib/http_range.h" #include "lib/log.h" #include "lib/omalloc.h" @@ -842,7 +843,7 @@ * to the change of the "randomness" property. */ - teq_safe_post(THREAD_MAIN, settings_gen_randomness, NULL); + teq_safe_post(THREAD_MAIN_ID, settings_gen_randomness, NULL); } /** @@ -1338,6 +1339,16 @@ } /** + * Clean-up locks. + */ +static void +settings_remove_locks(void) +{ + filelock_free_null(&pidfile_lock); + filelock_free_null(&save_file_path_lock); +} + +/** * Called at exit time to flush the property files. */ void G_COLD @@ -1359,6 +1370,8 @@ settings_callbacks_shutdown(); prop_save_to_file(properties, config_dir, config_file); + + settings_remove_locks(); } /** @@ -1376,9 +1389,6 @@ void settings_close(void) { - filelock_free_null(&pidfile_lock); - filelock_free_null(&save_file_path_lock); - gnet_prop_shutdown(); HFREE_NULL(config_dir);
View file
gtk-gnutella-1.1.9.tar.bz2/src/core/share.c -> gtk-gnutella-1.1.11.tar.bz2/src/core/share.c
Changed
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2001-2005, 2013 Raphael Manfredi + * Copyright (c) 2001-2005, 2013, 2016 Raphael Manfredi * Copyright (c) 2000 Daniel Walker (dwalker@cats.ucsc.edu) * *---------------------------------------------------------------------- @@ -38,6 +38,7 @@ #include "share.h" +#include "alias.h" #include "downloads.h" #include "extensions.h" #include "fileinfo.h" @@ -127,11 +128,13 @@ const char *file_path; /**< The full path of the file (atom!) */ const char *name_nfc; /**< UTF-8 NFC version of filename (atom!) */ - const char *name_canonic; /**< UTF-8 canonized ver. of filename (atom)! */ + const char *name_canonic; /**< UTF-8 canonized ver. of filename (atom!) */ + const char *name_normal; /**< UTF-8 normalized aliases (atom!) */ const char *relative_path; /**< UTF-8 NFC string (atom) */ size_t name_nfc_len; /**< strlen(name_nfc) */ size_t name_canonic_len; /**< strlen(name_canonic) */ + size_t name_normal_len; /**< strlen(name_normal) */ time_t mtime; /**< Last modif. time, for SHA1 computation */ time_t ctime; /**< File creation time */ @@ -140,7 +143,8 @@ uint32 file_index; /**< the files index within our local DB */ uint32 sort_index; /**< the index for sorted listings */ - enum mime_type mime_type; /* MIME type of the file */ + enum mime_type mime_type; /**< MIME type of the file */ + uint media_type; /**< Media type mask for queries */ int refcnt; /**< Reference count */ uint32 flags; /**< See below for definition */ @@ -360,6 +364,7 @@ { MIME_TYPE_APPLICATION_TROFF_ME, D }, { MIME_TYPE_APPLICATION_TROFF_MS, D }, { MIME_TYPE_APPLICATION_ZIP, U }, + { MIME_TYPE_AUDIO_APE, A }, { MIME_TYPE_AUDIO_BASIC, A }, { MIME_TYPE_AUDIO_FLAC, A }, { MIME_TYPE_AUDIO_MATROSKA, A }, @@ -554,6 +559,7 @@ atom_str_free_null(&sf->file_path); atom_str_free_null(&sf->name_nfc); atom_str_free_null(&sf->name_canonic); + atom_str_free_null(&sf->name_normal); sf->magic = 0; WFREE(sf); @@ -627,6 +633,43 @@ sf->name_nfc_len = strlen(sf->name_nfc); sf->name_canonic_len = strlen(sf->name_canonic); + /* + * Check for aliases. + * + * If there are aliases, the sf->name_normal will be the normalized + * form, where the first word of each alias set will be rewritten as + * the normal representation of the alias set. + * + * If there are no strings to alias, the value will be NULL. + * + * When name was laready normalized, the sf->name_normal will be pointing + * to the same atomic representation as sf->name_canonic. + */ + + { + char *normalized = alias_normalize(sf->name_canonic, " "); + + if (NULL == normalized) { + sf->name_normal = NULL; + sf->name_normal_len = 0; + } else { + sf->name_normal = atom_str_get(normalized); + sf->name_normal_len = strlen(sf->name_normal); + + if (GNET_PROPERTY(share_debug) > 5) { + if (0 == strcmp(sf->name_normal, sf->name_canonic)) { + g_debug("SHARE \"%s\" already normalized", + sf->name_canonic); + } else { + g_debug("SHARE \"%s\" normalized as \"%s\"", + sf->name_canonic, sf->name_normal); + } + } + } + + HFREE_NULL(normalized); + } + shared_file_name_check(sf); if (0 == sf->name_nfc_len || 0 == sf->name_canonic_len) { @@ -694,6 +737,7 @@ * Apply query string to the library. * * @param query the query string to apply + * @param sri meta-information about the query, for matching limits * @param callback routine to call on each hit * @param user_data opaque context passed to callback * @param max_res maximum number of results @@ -702,6 +746,7 @@ */ void shared_files_match(const char *query, + const search_request_info_t *sri, st_search_callback callback, void *user_data, int max_res, uint32 flags, query_hashvec_t *qhv) { @@ -725,7 +770,7 @@ * First search from the library. */ - n = st_search(gt, query, callback, user_data, max_res, qhv); + n = st_search(gt, query, sri, callback, user_data, max_res, qhv); gnet_stats_count_general(g2_query ? GNR_LOCAL_G2_HITS : GNR_LOCAL_HITS, n); @@ -741,7 +786,7 @@ */ if (partials && remain > 0 && share_can_answer_partials()) { - n = st_search(pt, query, callback, user_data, remain, NULL); + n = st_search(pt, query, sri, callback, user_data, remain, NULL); gnet_stats_count_general( g2_query ? GNR_LOCAL_G2_PARTIAL_HITS : GNR_LOCAL_PARTIAL_HITS, n); } @@ -1236,6 +1281,16 @@ } /** + * @return media type mask (for queries) associated with a given mime type. + */ +static unsigned +shared_file_media_type(enum mime_type mime) +{ + return + pointer_to_uint(htable_lookup(share_media_types, int_to_pointer(mime))); +} + +/** * @param relative_path The relative path of the file or NULL. * @param pathname The absolute pathname of the file. * @param sb A "stat buffer" that was initialized with stat(). @@ -1298,6 +1353,7 @@ } sf->mime_type = mime_type_from_filename(sf->name_nfc); + sf->media_type = shared_file_media_type(sf->mime_type); if (!sha1_is_cached(sf)) { int ret; @@ -1868,7 +1924,7 @@ * the library thread, which explicitly invokes the scheduler. */ - if (THREAD_MAIN == share_thread_id) { + if (THREAD_MAIN_ID == share_thread_id) { struct share_thread_vars *v = &share_thread_vars; /* @@ -1951,7 +2007,7 @@ * --RAM, 2013-10-29 */ - teq_safe_rpc(THREAD_MAIN, recursive_rescan_starting, NULL); + teq_safe_rpc(THREAD_MAIN_ID, recursive_rescan_starting, NULL); bg_task_ticks_used(bt, 0); return BGR_NEXT; @@ -2049,7 +2105,11 @@ g_assert(!shared_file_is_partial(sf)); g_assert(1 == sf->refcnt); ctx->bytes_scanned += sf->file_size; - st_insert_item(ctx->search_tb, sf->name_canonic, sf); + + st_insert_item(ctx->search_tb, ST_SET_PLAIN, sf->name_canonic, sf); + if (sf->name_normal != NULL) + st_insert_item(ctx->search_tb, ST_SET_ALIAS, sf->name_normal, sf); + ctx->shared = pslist_prepend_const(ctx->shared, sf); upload_stats_enforce_local_filename(sf); } @@ -2092,7 +2152,7 @@ shared_file_check(sf); g_assert(!(SHARE_F_INDEXED & sf->flags)); g_assert(UNSIGNED(i) < ctx->files_scanned); - g_assert(2 == sf->refcnt); /* Added to search table */ + g_assert(sf->refcnt >= 2 && sf->refcnt <= 3); /* In search table sets */ ctx->filesi++ = sf; } @@ -2195,7 +2255,7 @@
View file
gtk-gnutella-1.1.9.tar.bz2/src/core/share.h -> gtk-gnutella-1.1.11.tar.bz2/src/core/share.h
Changed
@@ -135,9 +135,12 @@ const struct tth *shared_file_tth(const shared_file_t *sf) G_PURE; const char *shared_file_name_nfc(const shared_file_t *sf) G_PURE; const char *shared_file_name_canonic(const shared_file_t *sf) G_PURE; +const char *shared_file_name_normalized(const shared_file_t *sf) G_PURE; +bool shared_file_needs_aliasing(const shared_file_t *sf) G_PURE; const char *shared_file_relative_path(const shared_file_t *sf) G_PURE; size_t shared_file_name_nfc_len(const shared_file_t *sf) G_PURE; size_t shared_file_name_canonic_len(const shared_file_t *sf) G_PURE; +size_t shared_file_name_normalized_len(const shared_file_t *sf) G_PURE; uint32 shared_file_flags(const shared_file_t *sf) G_PURE; fileinfo_t *shared_file_fileinfo(const shared_file_t *sf) G_PURE; const char *shared_file_mime_type(const shared_file_t *sf) G_PURE; @@ -154,7 +157,10 @@ void share_remove_partial(const shared_file_t *sf); void share_update_matching_information(void); +struct search_request_info; + void shared_files_match(const char *query, + const struct search_request_info *sri, st_search_callback callback, void *user_data, int max_res, uint32 partials, struct query_hashvec *qhv);
View file
gtk-gnutella-1.1.9.tar.bz2/src/core/sockets.c -> gtk-gnutella-1.1.11.tar.bz2/src/core/sockets.c
Changed
@@ -375,7 +375,6 @@ static pslist_t *sl_incoming = NULL; /**< To spot inactive sockets */ static void guess_local_addr(const struct gnutella_socket *s); -static void socket_destroy(struct gnutella_socket *s, const char *reason); static void socket_connected(void *data, int source, inputevt_cond_t cond); static void socket_wio_link(struct gnutella_socket *s); @@ -1482,7 +1481,7 @@ * If there is an attached resource, call the resource's termination routine * with the supplied reason. */ -static void +void socket_destroy(struct gnutella_socket *s, const char *reason) { socket_check(s);
View file
gtk-gnutella-1.1.9.tar.bz2/src/core/sockets.h -> gtk-gnutella-1.1.11.tar.bz2/src/core/sockets.h
Changed
@@ -270,6 +270,7 @@ enum socket_type, struct socket_ops *ops, void *owner); void socket_detach_ops(gnutella_socket_t *s); void socket_change_owner(gnutella_socket_t *s, void *owner); +void socket_destroy(struct gnutella_socket *s, const char *reason); void socket_evt_set(struct gnutella_socket *s, inputevt_cond_t cond, inputevt_handler_t handler, void *data);
View file
gtk-gnutella-1.1.9.tar.bz2/src/core/spam.c -> gtk-gnutella-1.1.11.tar.bz2/src/core/spam.c
Changed
@@ -48,7 +48,7 @@ #include "lib/file.h" #include "lib/getdate.h" #include "lib/halloc.h" -#include "lib/halloc.h" +#include "lib/hstrfn.h" #include "lib/parse.h" #include "lib/path.h" #include "lib/pslist.h"
View file
gtk-gnutella-1.1.9.tar.bz2/src/core/thex_download.c -> gtk-gnutella-1.1.11.tar.bz2/src/core/thex_download.c
Changed
@@ -55,6 +55,7 @@ #include "lib/atoms.h" #include "lib/endian.h" #include "lib/halloc.h" +#include "lib/hstrfn.h" #include "lib/parse.h" #include "lib/pmsg.h" #include "lib/pslist.h"
View file
gtk-gnutella-1.1.9.tar.bz2/src/core/tls_common.c -> gtk-gnutella-1.1.11.tar.bz2/src/core/tls_common.c
Changed
@@ -77,6 +77,7 @@ #include "lib/glog.h" #include "lib/halloc.h" #include "lib/header.h" +#include "lib/hstrfn.h" #include "lib/htable.h" #include "lib/iovec.h" #include "lib/misc.h" /* For strchomp() */ @@ -232,7 +233,7 @@ /** * Log message. */ -static void +static void G_PRINTF(2, 0) tls_logfmt(GLogLevelFlags level, const char *fmt, ...) { va_list args; @@ -245,7 +246,7 @@ /** * Log TLS certificate. */ -static void +static void G_PRINTF(1, 0) tls_cert_log(const char *fmt, gnutls_x509_crt_t cert, gnutls_certificate_print_formats_t format) { @@ -316,6 +317,7 @@ return d; } +#if HAS_TLS(2, 12) /** * Generate an X.509 self-signed certificate in PEM format. * @@ -470,6 +472,7 @@ str_destroy_null(&cn); #undef TRY } +#endif /* TLS >= 2.12 */ static inline gnutls_session_t tls_socket_get_session(struct gnutella_socket *s) @@ -1101,8 +1104,10 @@ if (!file_exists(key_file)) tls_generate_private_key(key_file); +#if HAS_TLS(2, 12) if (!file_exists(cert_file) && file_exists(key_file)) tls_generate_self_signed_cert(cert_file, key_file); +#endif if (file_exists(key_file) && file_exists(cert_file)) { e = gnutls_certificate_set_x509_key_file(cert_cred,
View file
gtk-gnutella-1.1.9.tar.bz2/src/core/token.c -> gtk-gnutella-1.1.11.tar.bz2/src/core/token.c
Changed
@@ -43,6 +43,7 @@ #include "lib/crc.h" #include "lib/glib-missing.h" #include "lib/halloc.h" +#include "lib/hstrfn.h" #include "lib/misc.h" #include "lib/random.h" #include "lib/sha1.h" @@ -658,6 +659,68 @@ "86e1 e20b 5edd 3261 10d1 7912 6686 ba90", }; +static const char *keys_101_10 = { + "f784 cfc0 85e7 fbf7 b711 d98b 3053 ca33", + "5947 aef7 7ffd 795a a756 1af9 8d95 0126", + "2c0d c50a 27be 2181 364e b0dd b50c f904", + "8235 815e 6e1f 0cb4 b129 b69f a1bb 1673", + "d257 ea61 3a80 3f33 a780 db47 6c41 d3fd", + "0958 98cb 5ac3 56c9 2af5 d35f 5c96 0fad", + "274a 4e0f eb0b 3b69 2f9e 90ab 630f 4285", + "1ae9 8e14 e441 7bde c067 d851 97b1 3a0c", + "d138 0cb6 8d15 8f73 0985 ff8d d936 9c10", + "306e 0e53 82c0 7d79 de56 db70 0427 6282", + "0b7b 01ac ece5 42ff 9a93 064b a732 8262", + "f966 bf9e e10a 2cba 41b2 41db de0b d3ff", + "9b72 d9c3 3c6c 22c1 43b8 dbaa 3c1f a8a4", + "34ee 4015 3cf2 166b 45cb 66ac 2e9b c160", + "ca5b 0a4e e427 465d 52f2 da38 fbd2 fef5", + "a546 a304 1582 1220 8a84 4a2b c909 846d", + "81a7 cbe3 97d6 2197 a8a8 fad7 4029 c93b", + "d102 304c df28 7698 5279 b553 02b3 b776", + "1a62 a026 71ba b615 3105 2244 51f5 22b9", + "cf94 3aba 9d4f 5565 4364 b68a 5248 4012", + "7bab 13f4 6da9 0be8 86da cee8 be2e 71ba", + "1178 214a e278 2f9f e8a7 5fe5 89e8 b298", + "64f2 d43e e6d9 7eb3 27db 3221 04eb 38eb", + "942f 77ba 12e0 f78a e535 ada4 51b3 d053", + "c78c 142e d623 8bcd 7b23 8b25 1981 faa1", + "9513 c2d8 df36 2cad e0e1 2699 6a2f 9b52", + "8db4 ad3c 0109 3bb0 3c38 4c0b b04b 0e87", + "4c5d ecb4 56ce f1e0 1c01 2e3c a5d8 a5e7", +}; + +static const char *keys_101_11 = { + "e801 7c71 ad33 d9ae 9ace 8b08 bd47 3938", + "7cba 53dc 50bb 05a6 ef64 debb d345 b7d0", + "f806 6df3 23db e809 317a 4f2c c526 64c5", + "f981 18cf b42f e681 7f4e 7d4c 82df 78f9", + "5e71 0d77 1021 dfe1 1dcc 8bfc 6f18 d698", + "0f4c af05 ef52 eafb 6511 b662 e830 7c46", + "0cb3 d221 2a5f 93fe 8e53 b547 949d 0a54", + "7745 5be9 c91b c09f 9a9d bf8d f15c 46ea", + "323e 8bf3 289f be0b 53e3 3e20 a7f7 3f75", + "5fa1 5cc4 4ab9 36c0 49c7 e4ec 9d1e 7f58", + "c45f 6d3c b11d 9a39 86bb 2bc2 8564 b4c1", + "263e 7c32 f25a 9332 c922 0834 30e0 782a", + "e8ae 3576 9dfd 61b3 e76e 4d97 4713 6d55", + "1dff c81e 91b6 b0e2 4e03 fe8d ecf0 9fb7", + "19f2 c53b 6a4c 0732 9036 50c5 dce0 1259", + "d4d5 a903 629c 67c9 6355 5cbf 6acf bef8", + "fd2d d13d e6ad ff5f b655 03c9 d1a4 4ea2", + "ff45 83c2 d761 4157 e1ff 5170 dbcd 1123", + "ebea 5c43 66f6 9cca b4d0 59a2 dd73 5cd7", + "c8d2 0d57 3600 7530 a582 a860 db84 b856", + "fee2 6a4d 557f b49c 965a 5dd6 06ac 6507", + "b7ed 119a c033 4fdb 85bc b24a 41bd 681d", + "977b a331 72fa 9974 4c7c 366a 8724 6fa7", + "ed54 44b3 d4f6 5052 1ca0 bf5a 11a9 f3ae", + "4d23 3426 5be8 3120 9c22 a315 ec77 1cb8", + "30cf 1e01 b306 f88c 3955 e47f 991c c239", + "bbb5 d254 e397 4372 d182 1bf3 1f1e 9b83", + "d85c 414f 6920 ee83 982d 14a0 4417 c5fb", +}; + #define KEYS(x) keys_ ## x, N_ITEMS(keys_ ## x) /** @@ -688,6 +751,8 @@ { { 1, 1, 7, '\0', 0, 0, 1449961200 }, KEYS(101_7) }, /* 2015-12-13 */ { { 1, 1, 8, '\0', 0, 0, 1450393200 }, KEYS(101_8) }, /* 2015-12-18 */ { { 1, 1, 9, '\0', 0, 0, 1457218800 }, KEYS(101_9) }, /* 2016-03-06 */ + { { 1, 1, 10, '\0', 0, 0, 1472680800 }, KEYS(101_10) }, /* 2016-09-01 */ + { { 1, 1, 11, '\0', 0, 0, 1478818800 }, KEYS(101_11) }, /* 2016-11-11 */ }; #undef KEYS
View file
gtk-gnutella-1.1.9.tar.bz2/src/core/tth_cache.c -> gtk-gnutella-1.1.11.tar.bz2/src/core/tth_cache.c
Changed
@@ -61,6 +61,7 @@ #include "lib/ftw.h" #include "lib/halloc.h" #include "lib/hset.h" +#include "lib/hstrfn.h" #include "lib/path.h" #include "lib/pslist.h" #include "lib/spinlock.h"
View file
gtk-gnutella-1.1.9.tar.bz2/src/core/uhc.c -> gtk-gnutella-1.1.11.tar.bz2/src/core/uhc.c
Changed
@@ -51,10 +51,11 @@ #include "lib/halloc.h" #include "lib/hashing.h" #include "lib/hashlist.h" +#include "lib/hstrfn.h" #include "lib/mempcpy.h" #include "lib/parse.h" -#include "lib/str.h" #include "lib/shuffle.h" +#include "lib/str.h" #include "lib/stringify.h" #include "lib/walloc.h"
View file
gtk-gnutella-1.1.9.tar.bz2/src/core/uploads.c -> gtk-gnutella-1.1.11.tar.bz2/src/core/uploads.c
Changed
@@ -94,6 +94,7 @@ #include "lib/halloc.h" #include "lib/hashing.h" #include "lib/header.h" +#include "lib/hstrfn.h" #include "lib/htable.h" #include "lib/http_range.h" #include "lib/idtable.h" @@ -5383,6 +5384,16 @@ upload_handle_connection_header(u, header); /* + * Spot requests from G2 servents. + * + * The X-Features may not be present in every follow-up request, but + * that is OK since we merge the flag in and therefore it will be sticky. + */ + + if (header_get_feature("g2", header, NULL, NULL)) + u->flags |= UPLOAD_F_G2; + + /* * Check vendor-specific banning. */ @@ -6186,6 +6197,7 @@ info->upload_handle = u->upload_handle; info->push = u->push; info->encrypted = u->socket && socket_uses_tls(u->socket); + info->g2 = booleanize(u->flags & UPLOAD_F_G2); info->tls_upgraded = u->tls_upgraded; info->partial = u->file_info != NULL; info->gnet_addr = u->gnet_addr;
View file
gtk-gnutella-1.1.9.tar.bz2/src/core/uploads.h -> gtk-gnutella-1.1.11.tar.bz2/src/core/uploads.h
Changed
@@ -163,6 +163,7 @@ */ enum { + UPLOAD_F_G2 = 1 << 6, /**< Initiated from G2 servent */ UPLOAD_F_NORMAL_LIMIT = 1 << 5, /**< Normal limits */ UPLOAD_F_STEALTH_LIMIT = 1 << 4, /**< Stealth limits */ UPLOAD_F_LIMITED = 1 << 3, /**< Subject to limitation */
View file
gtk-gnutella-1.1.9.tar.bz2/src/core/verify.c -> gtk-gnutella-1.1.11.tar.bz2/src/core/verify.c
Changed
@@ -248,7 +248,7 @@ verify_check(ctx); ctx->status = VERIFY_START; - return pointer_to_bool(teq_safe_rpc(THREAD_MAIN, verify_cb, ctx)); + return pointer_to_bool(teq_safe_rpc(THREAD_MAIN_ID, verify_cb, ctx)); } /** @@ -261,7 +261,7 @@ verify_check(ctx); ctx->status = VERIFY_PROGRESS; - return pointer_to_bool(teq_safe_rpc(THREAD_MAIN, verify_cb, ctx)); + return pointer_to_bool(teq_safe_rpc(THREAD_MAIN_ID, verify_cb, ctx)); } static void @@ -270,7 +270,7 @@ verify_check(ctx); ctx->status = VERIFY_ERROR; - (void) teq_safe_rpc(THREAD_MAIN, verify_cb, ctx); + (void) teq_safe_rpc(THREAD_MAIN_ID, verify_cb, ctx); ctx->status = VERIFY_INVALID; } @@ -280,7 +280,7 @@ verify_check(ctx); ctx->status = VERIFY_SHUTDOWN; - (void) teq_safe_rpc(THREAD_MAIN, verify_cb, ctx); + (void) teq_safe_rpc(THREAD_MAIN_ID, verify_cb, ctx); ctx->status = VERIFY_INVALID; } @@ -290,7 +290,7 @@ verify_check(ctx); ctx->status = VERIFY_DONE; - (void) teq_safe_rpc(THREAD_MAIN, verify_cb, ctx); + (void) teq_safe_rpc(THREAD_MAIN_ID, verify_cb, ctx); ctx->status = VERIFY_INVALID; } @@ -914,7 +914,7 @@ * since we will avoid all these TEQ RPCs between the two threads. */ - teq_post(THREAD_MAIN, verify_queue_flush, ctx); + teq_post(THREAD_MAIN_ID, verify_queue_flush, ctx); } /**
View file
gtk-gnutella-1.1.9.tar.bz2/src/core/whitelist.c -> gtk-gnutella-1.1.11.tar.bz2/src/core/whitelist.c
Changed
@@ -51,6 +51,7 @@ #include "lib/cq.h" #include "lib/file.h" #include "lib/halloc.h" +#include "lib/hstrfn.h" #include "lib/parse.h" #include "lib/path.h" #include "lib/pslist.h"
View file
gtk-gnutella-1.1.9.tar.bz2/src/dht/keys.c -> gtk-gnutella-1.1.11.tar.bz2/src/dht/keys.c
Changed
@@ -422,7 +422,9 @@ keys_reclaim(struct keyinfo *ki, bool can_remove) { g_assert(ki); - g_assert(0 == ki->values); + g_assert_log(0 == ki->values || can_remove, + "%s(): ki->values=%u, can_remove=%s", + G_STRFUNC, ki->values, can_remove ? "y" : "n"); if (GNET_PROPERTY(dht_storage_debug) > 2) g_debug("DHT STORE key %s reclaimed", kuid_to_hex_string(ki->kuid));
View file
gtk-gnutella-1.1.9.tar.bz2/src/dht/routing.c -> gtk-gnutella-1.1.11.tar.bz2/src/dht/routing.c
Changed
@@ -4260,7 +4260,7 @@ uint64 estimate; bool alive = TRUE; - if (!dht_enabled()) + if (!dht_enabled() || NULL == our_kuid) return; WALLOC_ARRAY(kvec, K_LOCAL_ESTIMATE);
View file
gtk-gnutella-1.1.9.tar.bz2/src/gcc.h -> gtk-gnutella-1.1.11.tar.bz2/src/gcc.h
Changed
@@ -310,7 +310,7 @@ * warning purposedly for some section of the file and then later restore * the original warnings. */ -#if HAS_GCC(3, 0) +#if HAS_GCC(4, 8) #define G_IGNORE_PUSH(x) \ G_PRAGMA(GCC diagnostic push) \ G_PRAGMA(GCC diagnostic ignored #x)
View file
gtk-gnutella-1.1.9.tar.bz2/src/gtk-gnutella.h -> gtk-gnutella-1.1.11.tar.bz2/src/gtk-gnutella.h
Changed
@@ -40,10 +40,10 @@ #define GTA_PRODUCT_NAME "gtk-gnutella" /**< Normally "gtk-gnutella" */ #define GTA_VERSION 1 /**< major version */ #define GTA_SUBVERSION 1 /**< minor version */ -#define GTA_PATCHLEVEL 9 /**< patch level or teeny version */ +#define GTA_PATCHLEVEL 11 /**< patch level or teeny version */ #define GTA_REVISION "stable" /**< unstable, beta, stable */ #define GTA_REVCHAR "" /**< (u)nstable, (b)eta, "" -> stable */ -#define GTA_RELEASE "2016-03-06" /**< ISO 8601 format YYYY-MM-DD */ +#define GTA_RELEASE "2016-11-11" /**< ISO 8601 format YYYY-MM-DD */ #define GTA_WEBSITE "http://gtk-gnutella.sourceforge.net/" #define GTA_VENDOR_CODE "GTKG" #define GTA_PRODUCT_NICK "gtkg"
View file
gtk-gnutella-1.1.9.tar.bz2/src/gtk-gnutella.man -> gtk-gnutella-1.1.11.tar.bz2/src/gtk-gnutella.man
Changed
@@ -8,7 +8,7 @@ .\" or simply: .\" nroff -man gtk\-gnutella.man | less -s .\" -.TH GTK\\-GNUTELLA 1 "March 2016" Version "1.1.9" +.TH GTK\\-GNUTELLA 1 "September 2016" Version "1.1.10" .SH NAME gtk\-gnutella \- A Gnutella client for Gtk+ .SH SYNOPSIS @@ -33,6 +33,12 @@ All the options can be abbreviated as long as the supplied name is not ambiguous. .TP +.B "\-\-cleanup" +For developers mostly: this requests a final memory cleanup sequence at +exit time in an attempt to be able to spot memory leaks by looking at all +the remaining allocated blocks, letting the developpers figuring out, perhaps, +why they were not cleaned-up properly. +.TP .B "\-\-compile-info" Tell .I gtk\-gnutella
View file
gtk-gnutella-1.1.9.tar.bz2/src/if/bridge/ui2c.c -> gtk-gnutella-1.1.11.tar.bz2/src/if/bridge/ui2c.c
Changed
@@ -100,6 +100,12 @@ return file_info_status_to_string(status); } +void +guc_file_info_clear_completed(void) +{ + file_info_clear_completed(); +} + int guc_download_get_http_req_percent(const struct download *d) { @@ -145,12 +151,6 @@ } void -guc_download_abort(struct download *d) -{ - download_request_abort(d); -} - -void guc_download_resume(struct download *d) { download_request_resume(d);
View file
gtk-gnutella-1.1.9.tar.bz2/src/if/bridge/ui2c.h -> gtk-gnutella-1.1.11.tar.bz2/src/if/bridge/ui2c.h
Changed
@@ -98,6 +98,7 @@ char *guc_file_info_build_magnet(gnet_fi_t); char *guc_file_info_get_file_url(gnet_fi_t); const char *guc_file_info_status_to_string(const gnet_fi_status_t *); +void guc_file_info_clear_completed(void); int guc_download_get_http_req_percent(const struct download *); void guc_download_fallback_to_push(struct download *, bool on_timeout, bool user_request); @@ -107,7 +108,6 @@ void guc_download_requeue(struct download *); void guc_download_start(struct download *); void guc_download_pause(struct download *); -void guc_download_abort(struct download *); void guc_download_resume(struct download *); void guc_download_freeze_queue(void); void guc_download_thaw_queue(void); @@ -118,8 +118,8 @@ const char *guc_download_get_hostname(const struct download *); const char *guc_download_get_country(const struct download *); const char *guc_download_get_vendor(const struct download *); -gdouble guc_download_source_progress(const struct download *); -gdouble guc_download_total_progress(const struct download *); +double guc_download_source_progress(const struct download *); +double guc_download_total_progress(const struct download *); bool guc_download_something_to_clear(void); void guc_download_index_changed(const host_addr_t addr, uint16 port, const struct guid *guid, filesize_t from, filesize_t to);
View file
gtk-gnutella-1.1.9.tar.bz2/src/if/core/downloads.h -> gtk-gnutella-1.1.11.tar.bz2/src/if/core/downloads.h
Changed
@@ -524,7 +524,6 @@ void download_request_start(struct download *); void download_request_pause(struct download *); bool download_request_remove(struct download *); -void download_request_abort(struct download *); void download_request_resume(struct download *); void download_freeze_queue(void);
View file
gtk-gnutella-1.1.9.tar.bz2/src/if/core/fileinfo.h -> gtk-gnutella-1.1.11.tar.bz2/src/if/core/fileinfo.h
Changed
@@ -305,6 +305,7 @@ const char *file_info_status_to_string(const gnet_fi_status_t *status); void fi_increase_uploaded(fileinfo_t *fi, size_t amount); +void file_info_clear_completed(void); #endif /* CORE_SOURCES */ #endif /* _if_core_fileinfo_h_ */
View file
gtk-gnutella-1.1.9.tar.bz2/src/if/core/uploads.h -> gtk-gnutella-1.1.11.tar.bz2/src/if/core/uploads.h
Changed
@@ -86,6 +86,7 @@ bool partial; /**< Whether it's a partial file */ bool encrypted; /**< Whether the connection is (TLS) encrypted */ bool tls_upgraded; /**< Whether a TLS upgrade was requested */ + bool g2; /**< Whether requested from a G2 host */ uint16 gnet_port; /**< Advertised Gnutella listening port */ uint16 country; /**< Contry of origin */
View file
gtk-gnutella-1.1.9.tar.bz2/src/if/gen/gnr_stats.c -> gtk-gnutella-1.1.11.tar.bz2/src/if/gen/gnr_stats.c
Changed
@@ -1,5 +1,5 @@ /* - * Generated on Wed Jun 17 13:02:21 2015 by enum-msg.pl -- DO NOT EDIT + * Generated on Sun Nov 6 23:31:52 2016 by enum-msg.pl -- DO NOT EDIT * * Command: ../../../scripts/enum-msg.pl stats.lst */ @@ -36,6 +36,7 @@ "local_g2_searches", "local_g2_hits", "local_g2_partial_hits", + "local_aliased_hits", "oob_proxied_query_hits", "oob_queries", "oob_queries_stripped", @@ -58,6 +59,7 @@ "query_whats_new", "query_g2_utf8", "query_g2_sha1", + "query_aliased_words", "query_guess", "query_guess_02", "guess_link_cache", @@ -330,7 +332,7 @@ const char * gnet_stats_general_to_string(gnr_stats_t x) { - if G_UNLIKELY(UNSIGNED(x) >= N_ITEMS(stats_symbols)) { + if G_UNLIKELY(UNSIGNED(x) >= G_N_ELEMENTS(stats_symbols)) { str_t *s = str_private(G_STRFUNC, 80); str_printf(s, "Invalid gnr_stats_t code: %d", (int) x); return str_2c(s); @@ -364,6 +366,7 @@ N_("G2 searches to local DB"), N_("G2 hits on local DB"), N_("G2 hits on local partial files"), + N_("Hits on aliased queries"), N_("Query hits received for OOB-proxied queries"), N_("Queries requesting OOB hit delivery"), N_("Stripped OOB flag on queries"), @@ -386,6 +389,7 @@ N_("\"What's New?\" queries"), N_("UTF8 G2 queries"), N_("SHA1 G2 queries"), + N_("Queries with aliased words"), N_("GUESS queries"), N_("GUESS queries (0.2)"), N_("GUESS link cache size"), @@ -658,7 +662,7 @@ const char * gnet_stats_general_description(gnr_stats_t x) { - if G_UNLIKELY(UNSIGNED(x) >= N_ITEMS(stats_text)) { + if G_UNLIKELY(UNSIGNED(x) >= G_N_ELEMENTS(stats_text)) { str_t *s = str_private(G_STRFUNC, 80); str_printf(s, "Invalid gnr_stats_t code: %d", (int) x); return str_2c(s);
View file
gtk-gnutella-1.1.9.tar.bz2/src/if/gen/gnr_stats.h -> gtk-gnutella-1.1.11.tar.bz2/src/if/gen/gnr_stats.h
Changed
@@ -1,5 +1,5 @@ /* - * Generated on Wed Jun 17 13:02:21 2015 by enum-msg.pl -- DO NOT EDIT + * Generated on Sun Nov 6 23:31:52 2016 by enum-msg.pl -- DO NOT EDIT * * Command: ../../../scripts/enum-msg.pl stats.lst */ @@ -8,7 +8,7 @@ #define _if_gen_gnr_stats_h_ /* - * Enum count: 307 + * Enum count: 309 */ typedef enum { GNR_ROUTING_ERRORS = 0, @@ -32,6 +32,7 @@ GNR_LOCAL_G2_SEARCHES, GNR_LOCAL_G2_HITS, GNR_LOCAL_G2_PARTIAL_HITS, + GNR_LOCAL_ALIASED_HITS, GNR_OOB_PROXIED_QUERY_HITS, GNR_OOB_QUERIES, GNR_OOB_QUERIES_STRIPPED, @@ -54,6 +55,7 @@ GNR_QUERY_WHATS_NEW, GNR_QUERY_G2_UTF8, GNR_QUERY_G2_SHA1, + GNR_QUERY_ALIASED_WORDS, GNR_QUERY_GUESS, GNR_QUERY_GUESS_02, GNR_GUESS_LINK_CACHE,
View file
gtk-gnutella-1.1.9.tar.bz2/src/if/gen/stats.lst -> gtk-gnutella-1.1.11.tar.bz2/src/if/gen/stats.lst
Changed
@@ -38,6 +38,7 @@ LOCAL_G2_SEARCHES "G2 searches to local DB" LOCAL_G2_HITS "G2 hits on local DB" LOCAL_G2_PARTIAL_HITS "G2 hits on local partial files" +LOCAL_ALIASED_HITS "Hits on aliased queries" OOB_PROXIED_QUERY_HITS "Query hits received for OOB-proxied queries" OOB_QUERIES "Queries requesting OOB hit delivery" OOB_QUERIES_STRIPPED "Stripped OOB flag on queries" @@ -62,6 +63,7 @@ QUERY_WHATS_NEW "\"What's New?\" queries" QUERY_G2_UTF8 "UTF8 G2 queries" QUERY_G2_SHA1 "SHA1 G2 queries" +QUERY_ALIASED_WORDS "Queries with aliased words" QUERY_GUESS "GUESS queries" QUERY_GUESS_02 "GUESS queries (0.2)" GUESS_LINK_CACHE "GUESS link cache size"
View file
gtk-gnutella-1.1.9.tar.bz2/src/if/gnet_property.c -> gtk-gnutella-1.1.11.tar.bz2/src/if/gnet_property.c
Changed
@@ -357,8 +357,8 @@ static const guint32 gnet_property_variable_min_dup_msg_default = 5; guint32 gnet_property_variable_min_dup_ratio = 150; static const guint32 gnet_property_variable_min_dup_ratio_default = 150; -char *gnet_property_variable_scan_extensions = "aac;avi;bin;bz2;7z;cue;dmg;deb;divx;flac;flc;fli;gif;gz;ifo;iso;it;jpeg;jpg;m4a;mjpg;mka;mkv;mod;mov;mp1;mp2;mp3;mp4;mpa;mpeg;mpega;mpg;mpv;nes;oga;ogg;ogm;ogv;opus;qt;pdf;png;ps;ram;rar;rm;rom;rpm;s3m;shn;sid;smc;smd;spx;srt;stm;tar;tbz2;tgz;bittorrent;torrent;txt;vob;voc;vqf;wav;webm;xm;xvid;zip;zoo"; -static const char *gnet_property_variable_scan_extensions_default = "aac;avi;bin;bz2;7z;cue;dmg;deb;divx;flac;flc;fli;gif;gz;ifo;iso;it;jpeg;jpg;m4a;mjpg;mka;mkv;mod;mov;mp1;mp2;mp3;mp4;mpa;mpeg;mpega;mpg;mpv;nes;oga;ogg;ogm;ogv;opus;qt;pdf;png;ps;ram;rar;rm;rom;rpm;s3m;shn;sid;smc;smd;spx;srt;stm;tar;tbz2;tgz;bittorrent;torrent;txt;vob;voc;vqf;wav;webm;xm;xvid;zip;zoo"; +char *gnet_property_variable_scan_extensions = "aac;ape;avi;bin;bz2;7z;cue;dmg;deb;divx;flac;flc;fli;gif;gz;ifo;iso;it;jpeg;jpg;m4a;mjpg;mka;mkv;mod;mov;mp1;mp2;mp3;mp4;mpa;mpeg;mpega;mpg;mpv;nes;oga;ogg;ogm;ogv;opus;qt;pdf;png;ps;ram;rar;rm;rom;rpm;s3m;shn;sid;smc;smd;spx;srt;stm;tar;tbz2;tgz;bittorrent;torrent;txt;vob;voc;vqf;wav;webm;xm;xvid;zip;zoo"; +static const char *gnet_property_variable_scan_extensions_default = "aac;ape;avi;bin;bz2;7z;cue;dmg;deb;divx;flac;flc;fli;gif;gz;ifo;iso;it;jpeg;jpg;m4a;mjpg;mka;mkv;mod;mov;mp1;mp2;mp3;mp4;mpa;mpeg;mpega;mpg;mpv;nes;oga;ogg;ogm;ogv;opus;qt;pdf;png;ps;ram;rar;rm;rom;rpm;s3m;shn;sid;smc;smd;spx;srt;stm;tar;tbz2;tgz;bittorrent;torrent;txt;vob;voc;vqf;wav;webm;xm;xvid;zip;zoo"; gboolean gnet_property_variable_scan_ignore_symlink_dirs = FALSE; static const gboolean gnet_property_variable_scan_ignore_symlink_dirs_default = FALSE; gboolean gnet_property_variable_scan_ignore_symlink_regfiles = FALSE; @@ -1122,6 +1122,8 @@ static const time_t gnet_property_variable_session_start_stamp_default = 0; gboolean gnet_property_variable_tcp_no_listening = FALSE; static const gboolean gnet_property_variable_tcp_no_listening_default = FALSE; +gboolean gnet_property_variable_query_trace = FALSE; +static const gboolean gnet_property_variable_query_trace_default = FALSE; static prop_set_t *gnet_property; @@ -11292,6 +11294,25 @@ gnet_property->props482.data.boolean.def = (void *) &gnet_property_variable_tcp_no_listening_default; gnet_property->props482.data.boolean.value = (void *) &gnet_property_variable_tcp_no_listening; + + /* + * PROP_QUERY_TRACE: + * + * General data: + */ + gnet_property->props483.name = "query_trace"; + gnet_property->props483.desc = _("Defines whether Gnutella queries should be traced."); + gnet_property->props483.ev_changed = event_new("query_trace_changed"); + gnet_property->props483.save = TRUE; + gnet_property->props483.internal = FALSE; + gnet_property->props483.vector_size = 1; + mutex_init(&gnet_property->props483.lock); + + /* Type specific data: */ + gnet_property->props483.type = PROP_TYPE_BOOLEAN; + gnet_property->props483.data.boolean.def = (void *) &gnet_property_variable_query_trace_default; + gnet_property->props483.data.boolean.value = (void *) &gnet_property_variable_query_trace; + gnet_property->by_name = htable_create(HASH_KEY_STRING, 0); for (n = 0; n < GNET_PROPERTY_NUM; n ++) { htable_insert(gnet_property->by_name,
View file
gtk-gnutella-1.1.9.tar.bz2/src/if/gnet_property.h -> gtk-gnutella-1.1.11.tar.bz2/src/if/gnet_property.h
Changed
@@ -519,6 +519,7 @@ PROP_LOG_SENDING_G2, PROP_SESSION_START_STAMP, PROP_TCP_NO_LISTENING, + PROP_QUERY_TRACE, GNET_PROPERTY_END } gnet_property_t;
View file
gtk-gnutella-1.1.9.tar.bz2/src/if/gnet_property_priv.h -> gtk-gnutella-1.1.11.tar.bz2/src/if/gnet_property_priv.h
Changed
@@ -533,6 +533,7 @@ extern const gboolean gnet_property_variable_log_sending_g2; extern const time_t gnet_property_variable_session_start_stamp; extern const gboolean gnet_property_variable_tcp_no_listening; +extern const gboolean gnet_property_variable_query_trace; prop_set_t *gnet_prop_init(void);
View file
gtk-gnutella-1.1.9.tar.bz2/src/if/gnet_props.ag -> gtk-gnutella-1.1.11.tar.bz2/src/if/gnet_props.ag
Changed
@@ -1705,7 +1705,7 @@ type = string; data = { default = - "aac;avi;" + "aac;ape;avi;" "bin;bz2;7z;" "cue;dmg;" "deb;divx;" @@ -5660,6 +5660,15 @@ type = boolean; data = { default = FALSE; + }; +}; + +prop = { + name = "query_trace"; + desc = "Defines whether Gnutella queries should be traced."; + type = boolean; + data = { + default = FALSE; }; };
View file
gtk-gnutella-1.1.9.tar.bz2/src/if/gui_property.c -> gtk-gnutella-1.1.11.tar.bz2/src/if/gui_property.c
Changed
@@ -357,6 +357,14 @@ static const gboolean gui_property_variable_search_display_guess_stats_default = TRUE; gboolean gui_property_variable_guess_stats_show_total = TRUE; static const gboolean gui_property_variable_guess_stats_show_total_default = TRUE; +guint32 gui_property_variable_fileinfo_notebook_tab = 0; +static const guint32 gui_property_variable_fileinfo_notebook_tab_default = 0; +guint32 gui_property_variable_main_notebook_tab = 0; +static const guint32 gui_property_variable_main_notebook_tab_default = 0; +guint32 gui_property_variable_gnet_stats_notebook_tab = 0; +static const guint32 gui_property_variable_gnet_stats_notebook_tab_default = 0; +guint32 gui_property_variable_downloads_info_notebook_tab = 0; +static const guint32 gui_property_variable_downloads_info_notebook_tab_default = 0; static prop_set_t *gui_property; @@ -2713,7 +2721,7 @@ * General data: */ gui_property->props116.name = "search_media_type_archive"; - gui_property->props116.desc = _("Remote nodes supporting media type filtering will apply your query specifically on archive / program files such as ZIP, 7z, tar, bz2, gz, dep, rpm and also exe files."); + gui_property->props116.desc = _("Remote nodes supporting media type filtering will apply your query specifically on archive / program files such as ZIP, 7z, tar, bz2, gz, deb, rpm and also exe files."); gui_property->props116.ev_changed = event_new("search_media_type_archive_changed"); gui_property->props116.save = TRUE; gui_property->props116.internal = FALSE; @@ -2820,6 +2828,94 @@ gui_property->props121.data.boolean.def = (void *) &gui_property_variable_guess_stats_show_total_default; gui_property->props121.data.boolean.value = (void *) &gui_property_variable_guess_stats_show_total; + + /* + * PROP_FILEINFO_NOTEBOOK_TAB: + * + * General data: + */ + gui_property->props122.name = "fileinfo_notebook_tab"; + gui_property->props122.desc = _("Notebook tab number for the fileinfo listing"); + gui_property->props122.ev_changed = event_new("fileinfo_notebook_tab_changed"); + gui_property->props122.save = TRUE; + gui_property->props122.internal = FALSE; + gui_property->props122.vector_size = 1; + mutex_init(&gui_property->props122.lock); + + /* Type specific data: */ + gui_property->props122.type = PROP_TYPE_GUINT32; + gui_property->props122.data.guint32.def = (void *) &gui_property_variable_fileinfo_notebook_tab_default; + gui_property->props122.data.guint32.value = (void *) &gui_property_variable_fileinfo_notebook_tab; + gui_property->props122.data.guint32.choices = NULL; + gui_property->props122.data.guint32.max = 0xFFFFFFFF; + gui_property->props122.data.guint32.min = 0x00000000; + + + /* + * PROP_MAIN_NOTEBOOK_TAB: + * + * General data: + */ + gui_property->props123.name = "main_notebook_tab"; + gui_property->props123.desc = _("Notebook tab number for the main page"); + gui_property->props123.ev_changed = event_new("main_notebook_tab_changed"); + gui_property->props123.save = TRUE; + gui_property->props123.internal = FALSE; + gui_property->props123.vector_size = 1; + mutex_init(&gui_property->props123.lock); + + /* Type specific data: */ + gui_property->props123.type = PROP_TYPE_GUINT32; + gui_property->props123.data.guint32.def = (void *) &gui_property_variable_main_notebook_tab_default; + gui_property->props123.data.guint32.value = (void *) &gui_property_variable_main_notebook_tab; + gui_property->props123.data.guint32.choices = NULL; + gui_property->props123.data.guint32.max = 0xFFFFFFFF; + gui_property->props123.data.guint32.min = 0x00000000; + + + /* + * PROP_GNET_STATS_NOTEBOOK_TAB: + * + * General data: + */ + gui_property->props124.name = "gnet_stats_notebook_tab"; + gui_property->props124.desc = _("Notebook tab number for the Gnet stats page"); + gui_property->props124.ev_changed = event_new("gnet_stats_notebook_tab_changed"); + gui_property->props124.save = TRUE; + gui_property->props124.internal = FALSE; + gui_property->props124.vector_size = 1; + mutex_init(&gui_property->props124.lock); + + /* Type specific data: */ + gui_property->props124.type = PROP_TYPE_GUINT32; + gui_property->props124.data.guint32.def = (void *) &gui_property_variable_gnet_stats_notebook_tab_default; + gui_property->props124.data.guint32.value = (void *) &gui_property_variable_gnet_stats_notebook_tab; + gui_property->props124.data.guint32.choices = NULL; + gui_property->props124.data.guint32.max = 0xFFFFFFFF; + gui_property->props124.data.guint32.min = 0x00000000; + + + /* + * PROP_DOWNLOADS_INFO_NOTEBOOK_TAB: + * + * General data: + */ + gui_property->props125.name = "downloads_info_notebook_tab"; + gui_property->props125.desc = _("Notebook tab number for download info / tools"); + gui_property->props125.ev_changed = event_new("downloads_info_notebook_tab_changed"); + gui_property->props125.save = TRUE; + gui_property->props125.internal = FALSE; + gui_property->props125.vector_size = 1; + mutex_init(&gui_property->props125.lock); + + /* Type specific data: */ + gui_property->props125.type = PROP_TYPE_GUINT32; + gui_property->props125.data.guint32.def = (void *) &gui_property_variable_downloads_info_notebook_tab_default; + gui_property->props125.data.guint32.value = (void *) &gui_property_variable_downloads_info_notebook_tab; + gui_property->props125.data.guint32.choices = NULL; + gui_property->props125.data.guint32.max = 0xFFFFFFFF; + gui_property->props125.data.guint32.min = 0x00000000; + gui_property->by_name = htable_create(HASH_KEY_STRING, 0); for (n = 0; n < GUI_PROPERTY_NUM; n ++) { htable_insert(gui_property->by_name,
View file
gtk-gnutella-1.1.9.tar.bz2/src/if/gui_property.h -> gtk-gnutella-1.1.11.tar.bz2/src/if/gui_property.h
Changed
@@ -158,6 +158,10 @@ PROP_SEARCH_DISCARD_BANNED_GUID, PROP_SEARCH_DISPLAY_GUESS_STATS, PROP_GUESS_STATS_SHOW_TOTAL, + PROP_FILEINFO_NOTEBOOK_TAB, + PROP_MAIN_NOTEBOOK_TAB, + PROP_GNET_STATS_NOTEBOOK_TAB, + PROP_DOWNLOADS_INFO_NOTEBOOK_TAB, GUI_PROPERTY_END } gui_property_t;
View file
gtk-gnutella-1.1.9.tar.bz2/src/if/gui_property_priv.h -> gtk-gnutella-1.1.11.tar.bz2/src/if/gui_property_priv.h
Changed
@@ -168,6 +168,10 @@ extern const gboolean gui_property_variable_search_discard_banned_guid; extern const gboolean gui_property_variable_search_display_guess_stats; extern const gboolean gui_property_variable_guess_stats_show_total; +extern const guint32 gui_property_variable_fileinfo_notebook_tab; +extern const guint32 gui_property_variable_main_notebook_tab; +extern const guint32 gui_property_variable_gnet_stats_notebook_tab; +extern const guint32 gui_property_variable_downloads_info_notebook_tab; prop_set_t *gui_prop_init(void);
View file
gtk-gnutella-1.1.9.tar.bz2/src/if/gui_props.ag -> gtk-gnutella-1.1.11.tar.bz2/src/if/gui_props.ag
Changed
@@ -1346,7 +1346,7 @@ name = "search_media_type_archive"; desc = "Remote nodes supporting media type filtering will apply your " "query specifically on archive / program files such as " - "ZIP, 7z, tar, bz2, gz, dep, rpm and also exe files."; + "ZIP, 7z, tar, bz2, gz, deb, rpm and also exe files."; type = boolean; data = { default = FALSE; @@ -1402,6 +1402,42 @@ }; }; +prop = { + name = "fileinfo_notebook_tab"; + desc = "Notebook tab number for the fileinfo listing"; + type = guint32; + data = { + default = 0; + }; +}; + +prop = { + name = "main_notebook_tab"; + desc = "Notebook tab number for the main page"; + type = guint32; + data = { + default = 0; + }; +}; + +prop = { + name = "gnet_stats_notebook_tab"; + desc = "Notebook tab number for the Gnet stats page"; + type = guint32; + data = { + default = 0; + }; +}; + +prop = { + name = "downloads_info_notebook_tab"; + desc = "Notebook tab number for download info / tools"; + type = guint32; + data = { + default = 0; + }; +}; + #endif /* !USE_TOPLESS */ /* vi: set ts=4: */
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/Jmakefile -> gtk-gnutella-1.1.11.tar.bz2/src/lib/Jmakefile
Changed
@@ -69,6 +69,7 @@ ascii.c \ atio.c \ atoms.c \ + balloc.c \ barrier.c \ base16.c \ base32.c \ @@ -151,6 +152,7 @@ hikset.c \ host_addr.c \ hset.c \ + hstrfn.c \ htable.c \ html.c \ http_range.c \
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/Makefile.SH -> gtk-gnutella-1.1.11.tar.bz2/src/lib/Makefile.SH
Changed
@@ -1,5 +1,5 @@ -: Makefile.SH generated from Jmake.tmpl and Jmakefile jmake 3.5-200 -: $X-Id: Jmake.tmpl 183 2015-04-12 09:48:11Z rmanfredi $ +: Makefile.SH generated from Jmake.tmpl and Jmakefile jmake 3.5-203 +: $X-Id$ case $CONFIG in '') @@ -75,7 +75,7 @@ $spitshell >>Makefile <<'!NO!SUBS!' ######################################################################## # Jmake rules for building libraries, programs, scripts, and data files -# $X-Id: Jmake.rules 195 2015-04-27 21:30:17Z rmanfredi $ +# $X-Id$ ######################################################################## # Force 'make depend' to be performed first -- do not edit @@ -138,6 +138,7 @@ ascii.c \ atio.c \ atoms.c \ + balloc.c \ barrier.c \ base16.c \ base32.c \ @@ -220,6 +221,7 @@ hikset.c \ host_addr.c \ hset.c \ + hstrfn.c \ htable.c \ html.c \ http_range.c \ @@ -337,6 +339,7 @@ ascii.o \ atio.o \ atoms.o \ + balloc.o \ barrier.o \ base16.o \ base32.o \ @@ -419,6 +422,7 @@ hikset.o \ host_addr.o \ hset.o \ + hstrfn.o \ htable.o \ html.o \ http_range.o \
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/atomic.h -> gtk-gnutella-1.1.11.tar.bz2/src/lib/atomic.h
Changed
@@ -132,10 +132,14 @@ #define ATOMIC_INC(p) __sync_fetch_and_add(p, 1) #define ATOMIC_DEC(p) __sync_fetch_and_sub(p, 1) #define ATOMIC_GET(p) (atomic_mb(), *(p)) -#define ATOMIC_SET(p,v) (*(p) = (v), atomic_mb()) #define ATOMIC_ADD(p,v) __sync_fetch_and_add(p, v) #define ATOMIC_SUB(p,v) __sync_fetch_and_sub(p, v) +#define ATOMIC_SET(p,v) G_STMT_START { \ + *(p) = (v); \ + atomic_mb(); \ +} G_STMT_END; + #else /* !HAS_SYNC_ATOMIC */ #define atomic_mb() (void) 0 @@ -268,7 +272,7 @@ * counter. */ -#define AU64(x) uint x ## _lo; uint x ## _hi +#define AU64(x) uint x ## _lo, x ## _hi #define AU64_INC(x) G_STMT_START { \ if G_UNLIKELY(-1U == atomic_uint_inc(x ## _lo)) \ @@ -280,6 +284,13 @@ atomic_uint_dec(x ## _hi); \ } G_STMT_END +#define AU64_ZERO(x) G_STMT_START { \ + *x ## _hi = 0; \ + *x ## _lo = 0; \ + *x ## _hi = 0; \ + atomic_mb(); \ +} G_STMT_END + /** * Assemble 64-bit value from the high and low 32-bit parts of the counter. * @@ -380,6 +391,11 @@ #define AU64_SUB(x,v) ATOMIC_SUB(x ## _64, v) #define AU64_VALUE(x) (atomic_mb(), *(x ## _64)) +#define AU64_ZERO(x) G_STMT_START { \ + *x ## _64 = 0; \ + atomic_mb(); \ +} G_STMT_END; + #else #error "unexpected value for LONGSIZE" #endif
View file
gtk-gnutella-1.1.11.tar.bz2/src/lib/balloc.c
Added
@@ -0,0 +1,236 @@ +/* + * Copyright (c) 2016 Raphael Manfredi + * + *---------------------------------------------------------------------- + * This file is part of gtk-gnutella. + * + * gtk-gnutella is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * gtk-gnutella is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with gtk-gnutella; if not, write to the Free Software + * Foundation, Inc.: + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + *---------------------------------------------------------------------- + */ + +/** + * @ingroup lib + * @file + * + * Buffer-based allocator. + * + * This is a thread-safe buffer-based allocator that will allocate blocks + * of equal size from a fixed pre-allocated buffer that cannot be extended. + * The maximum size of items that can be allocated is 2^32 bytes. + * + * We use a zone allocator alogorithm to allocate the fix sized blocks within + * the arena at our disposal. + * + * It is meant to be used in low-level routines where one cannot assume that + * we have any properly initialized general-purpose allocator available, and + * yet there is a need to dynamically allocate and free memory. + * + * It uses its own low-level locks to be completely independent and minimize + * the memory footprint of the allocator descriptor. + * + * @author Raphael Manfredi + * @date 2016 + */ + +#include "common.h" + +#include "balloc.h" + +#include "atomic.h" + +#include "override.h" /* Must be the last header included */ + +#define BALLOC_ALIGNBYTES MEM_ALIGNBYTES +#define BALLOC_MASK (BALLOC_ALIGNBYTES - 1) + +#define balloc_round(x) (((ulong) (x) + BALLOC_MASK) & ~BALLOC_MASK) + +enum balloc_magic { BALLOC_MAGIC = 0x4b6a2215 }; + +/** + * The buffer-based allocator descriptor. + * + * This structure lies at the beginning of the buffer we're allocating from + * and is therefore stolen from the available memory. It is therefore kept + * to a minimum size. + */ +typedef struct balloc { + enum balloc_magic magic; /**< Magic number */ + atomic_lock_t lock; /**< Concurrency lock */ + void *avail; /**< Next available block, NULL if full */ +} balloc_t; + +static inline void +balloc_check(const balloc_t * const b) +{ + g_assert(b != NULL); + g_assert(BALLOC_MAGIC == b->magic); +} + +/** + * Cram a new zone in chunk. + * + * @param b the buffer allocator descriptor + * @param size the size of each block we allocate + * @param buflen the total size of the buffer + */ +static void +balloc_cram(balloc_t *b, size_t size, size_t buflen) +{ + void *start = ulong_to_pointer(balloc_round(ptr_add_offset(b, sizeof *b))); + void *end = ptr_add_offset(b, buflen); + void *next = NULL; + + balloc_check(b); + g_assert_log((ulong) end == balloc_round(end), + "%s(): buffer length %zu is not properly aligned or base %p is weird", + G_STRFUNC, buflen, b); + + /* + * We can't assume we have enough room between "start" and "end" to + * cram an even amount blocks of "size" bytes each. Hence we start from + * the end of the zone and stop as soon as the beginning of the block + * would lie before "start". + */ + + for (;;) { + void *block = ptr_add_offset(end, -size); + + if G_UNLIKELY(ptr_cmp(block, start) < 0) + break; + + *(void **) block = next; /* Free block points to next free one */ + next = end = block; + } + + b->avail = next; /* First free block in zone */ +} + +/** + * Initialize buffer to be suitable for allocating blocks of "size" bytes. + * + * @param size size of blocks to allocate + * @param base buffer base + * @param length buffer length + */ +void +balloc_init(uint32 size, void *base, size_t length) +{ + balloc_t *b = base; + + ZERO(b); + b->magic = BALLOC_MAGIC; + + balloc_cram(b, balloc_round(size), length); + + if (NULL == b->avail) { + s_error("%s(): buffer %p of %zu bytes too small for %u-byte blocks", + G_STRFUNC, base, length, size); + } +} + +/** + * Lock buffer allocator descriptor. + */ +static void +balloc_lock(balloc_t *b) +{ + balloc_check(b); + + while (!atomic_acquire(&b->lock)) + /* empty */; +} + +/** + * Unlock buffer allocator descriptor. + */ +static void +balloc_unlock(balloc_t *b) +{ + balloc_check(b); + g_assert(0 != b->lock); /* Must be locked already */ + + atomic_release(&b->lock); +} + +/** + * Check whether buffer appears to be initialized for allocations. + */ +bool +balloc_is_initialized(const void *base) +{ + const balloc_t *b = base; + + g_assert(base != NULL); + + return BALLOC_MAGIC == b->magic; +} + +/** + * Allocate a new block from an initialized buffer. + * + * @param base buffer base + * + * @return newly allocated block address. + */ +void * +balloc_alloc(void *base) +{ + balloc_t *b = base; + void *blk; + + balloc_check(b); + + balloc_lock(b); + + /* Allocated block is the head of free list */
View file
gtk-gnutella-1.1.11.tar.bz2/src/lib/balloc.h
Added
@@ -0,0 +1,49 @@ +/* + * Copyright (c) 2016 Raphael Manfredi + * + *---------------------------------------------------------------------- + * This file is part of gtk-gnutella. + * + * gtk-gnutella is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * gtk-gnutella is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with gtk-gnutella; if not, write to the Free Software + * Foundation, Inc.: + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + *---------------------------------------------------------------------- + */ + +/** + * @ingroup lib + * @file + * + * Buffer-based allocator. + * + * @author Raphael Manfredi + * @date 2016 + */ + +#ifndef _balloc_h_ +#define _balloc_h_ + +/* + * Public interface. + */ + +void balloc_init(uint32 size, void *base, size_t length); +bool balloc_is_initialized(const void *base); + +void *balloc_alloc(void *base) G_MALLOC; +void balloc_free(void *base, void *p); + +#endif /* _balloc_h_ */ + +/* vi: set ts=4 sw=4 cindent: */
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/compat_setjmp.c -> gtk-gnutella-1.1.11.tar.bz2/src/lib/compat_setjmp.c
Changed
@@ -62,11 +62,13 @@ * The jmp_buf type here is not the system one but the one we redefine. */ void -setjmp_prep(jmp_buf env) +setjmp_prep(jmp_buf env, const char *file, uint line) { env->stid = thread_small_id(); env->sig_level = signal_thread_handler_level(env->stid); env->magic = SETJMP_MAGIC; + env->file = file; + env->line = line; } /** @@ -76,11 +78,13 @@ * The sigjmp_buf type here is not the system one but the one we redefine. */ void -sigsetjmp_prep(sigjmp_buf env, int savesigs) +sigsetjmp_prep(sigjmp_buf env, int savesigs, const char *file, uint line) { env->stid = thread_small_id(); env->sig_level = signal_thread_handler_level(env->stid); env->magic = SIGSETJMP_MAGIC; + env->file = file; + env->line = line; #ifndef HAS_SIGSETJMP env->mask_saved = booleanize(savesigs); @@ -108,14 +112,21 @@ { uint stid = thread_small_id(); - g_assert(env->magic != SETJMP_USED_MAGIC); - g_assert(SETJMP_MAGIC == env->magic); + g_assert_log(env->magic != SETJMP_USED_MAGIC, + "context was taken at %s:%u", env->file, env->line); + + if G_UNLIKELY(SIGSETJMP_MAGIC == env->magic) { + g_error("%s(): using longjmp() after sigsetjmp() from %s:%u", + G_STRFUNC, env->file, env->line); + } + + g_assert_log(SETJMP_MAGIC == env->magic, "magic=0x%x", env->magic); g_assert(val != 0); g_assert_log(env->stid == stid, - "%s(): env->stid=%u {%s}, stid=%u {%s}", + "%s(): env->stid=%u {%s}, stid=%u {%s}, context taken at %s:%u", G_STRFUNC, env->stid, thread_safe_id_name(env->stid), - stid, thread_safe_id_name(stid)); + stid, thread_safe_id_name(stid), env->file, env->line); signal_thread_handler_level_set(stid, env->sig_level); env->magic = SETJMP_USED_MAGIC; @@ -133,14 +144,21 @@ { uint stid = thread_small_id(); - g_assert(env->magic != SETJMP_USED_MAGIC); - g_assert(SIGSETJMP_MAGIC == env->magic); + g_assert_log(env->magic != SETJMP_USED_MAGIC, + "context was taken at %s:%u", env->file, env->line); + + if G_UNLIKELY(SETJMP_MAGIC == env->magic) { + g_error("%s(): using siglongjmp() after setjmp() from %s:%u", + G_STRFUNC, env->file, env->line); + } + + g_assert_log(SIGSETJMP_MAGIC == env->magic, "magic=0x%x", env->magic); g_assert(val != 0); g_assert_log(env->stid == stid, - "%s(): env->stid=%u {%s}, stid=%u {%s}", + "%s(): env->stid=%u {%s}, stid=%u {%s}, context taken at %s:%u", G_STRFUNC, env->stid, thread_safe_id_name(env->stid), - stid, thread_safe_id_name(stid)); + stid, thread_safe_id_name(stid), env->file, env->line); #ifndef HAS_SIGSETJMP if (env->mask_saved)
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/compat_setjmp.h -> gtk-gnutella-1.1.11.tar.bz2/src/lib/compat_setjmp.h
Changed
@@ -86,12 +86,14 @@ #undef siglongjmp #undef Siglongjmp -#define Setjmp(e) (setjmp_prep(e), setjmp((e)->buf)) +#define Setjmp(e) (setjmp_prep((e), _WHERE_, __LINE__), setjmp((e)->buf)) #ifdef HAS_SIGSETJMP -#define Sigsetjmp(e,s) (sigsetjmp_prep((e), (s)), sigsetjmp((e)->buf, (s))) +#define Sigsetjmp(e,s) \ + (sigsetjmp_prep((e), (s), _WHERE_, __LINE__), sigsetjmp((e)->buf, (s))) #else -#define Sigsetjmp(e,s) (sigsetjmp_prep((e), (s)), setjmp((e)->buf)) +#define Sigsetjmp(e,s) \ + (sigsetjmp_prep((e), (s), _WHERE_, __LINE__), setjmp((e)->buf)) #endif #define longjmp(e,v) compat_longjmp((e), (v)) @@ -122,6 +124,8 @@ sig_atomic_t sig_level; /**< Internal signal handler level */ enum setjmp_magic magic; /**< Magic number */ uint stid; /**< Thread which saved the context */ + uint line; /**< Line number where state was taken */ + const char *file; /**< File name where state was taken */ } jmp_buf1; typedef struct compat_sigjmpbuf { @@ -133,14 +137,16 @@ bool mask_saved; /**< Did we save the signal mask? */ sigset_t mask; /**< Signal mask saved */ #endif /* !HAS_SIGSETJMP */ + uint line; /**< Line number where state was taken */ + const char *file; /**< File name where state was taken */ } sigjmp_buf1; /* * Public interface. */ -void setjmp_prep(jmp_buf env); -void sigsetjmp_prep(sigjmp_buf env, int savesigs); +void setjmp_prep(jmp_buf env, const char *file, uint line); +void sigsetjmp_prep(sigjmp_buf env, int savesigs, const char *file, uint line); void compat_longjmp(jmp_buf env, int val) G_NORETURN; void compat_siglongjmp(sigjmp_buf env, int val) G_NORETURN;
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/crash.c -> gtk-gnutella-1.1.11.tar.bz2/src/lib/crash.c
Changed
@@ -93,6 +93,7 @@ #include "halloc.h" #include "hashing.h" #include "hashtable.h" +#include "hstrfn.h" #include "iovec.h" #include "log.h" #include "mempcpy.h" @@ -2462,11 +2463,12 @@ * Entering crash mode, for a given level. * * @param level the crash level, to determine what we need to disable + * @param external TRUE if coming from an external entry point * * @return FALSE if we had already entered crash_mode(), TRUE the first time. */ static bool G_COLD -crash_mode(enum crash_level level) +crash_mode(enum crash_level level, bool external) { static int done; static int haltedTHREAD_MAX; @@ -2484,8 +2486,9 @@ */ if (0 == depth) { - s_rawdebug("%s(): initial call, level=%s from %s", - G_STRFUNC, crash_level_to_string(level), thread_safe_name()); + s_rawdebug("%s(): initial %s call, level=%s from %s", + G_STRFUNC, external ? "external" : "internal", + crash_level_to_string(level), thread_safe_name()); crash_thread_id = thread_safe_small_id(); atomic_mb(); @@ -2511,13 +2514,15 @@ } } - s_rawwarn("%s(): concurrent call, level=%s from %s", - G_STRFUNC, crash_level_to_string(level), thread_safe_name()); + s_rawwarn("%s(): concurrent %s call, level=%s from %s", + G_STRFUNC, external ? "external" : "internal", + crash_level_to_string(level), thread_safe_name()); thread_halt(); /* No coming back */ } else if (level > crash_current_level) { - s_rawdebug("%s(): subsequent call, level=%s", - G_STRFUNC, crash_level_to_string(level)); + s_rawdebug("%s(): subsequent %s call, level=%s", + G_STRFUNC, external ? "external" : "internal", + crash_level_to_string(level)); } spinlock_hidden(&crash_mode_slk); @@ -2534,11 +2539,15 @@ * condition, force a recursive level. */ - if (level != CRASH_LVL_BASIC && old_level > CRASH_LVL_OOM) + if (external && level != CRASH_LVL_BASIC && old_level > CRASH_LVL_OOM) new_level = CRASH_LVL_RECURSIVE; crash_current_level = new_level; + s_rawdebug("%s(): depth=%d, external=%s, level=%s, old=%s, new=%s", + G_STRFUNC, depth, external ? "y" : "n", crash_level_to_string(level), + crash_level_to_string(old_level), crash_level_to_string(new_level)); + spinunlock_hidden(&crash_mode_slk); if (old_level == new_level) @@ -2546,6 +2555,9 @@ switch (new_level) { case CRASH_LVL_RECURSIVE: + s_rawdebug("%s(): old level was %s, moving to recursive", + G_STRFUNC, crash_level_to_string(old_level)); + /* * Since we are recursing into the crash handler, do not take risks * and make sure memory allocators are not adding an additional @@ -2569,7 +2581,6 @@ signal_crashing(); log_crash_mode(); - thread_lock_disable(FALSE); /* FALL THROUGH */ @@ -2615,7 +2626,7 @@ * emergency situation. */ - thread_crash_mode(); + thread_crash_mode(new_level > CRASH_LVL_FAILURE); goto done; case CRASH_LVL_NONE: @@ -2634,7 +2645,8 @@ crash_oom_condition(); /* - * Specifically for deadlock conditions, disable all locks. + * Specifically for deadlock conditions, disable all locks, if not + * already done above by the thread_crash_mode() call. */ if (CRASH_LVL_DEADLOCKED == level) @@ -3253,15 +3265,15 @@ */ if (v.recursive) - crash_mode(CRASH_LVL_RECURSIVE); + crash_mode(CRASH_LVL_RECURSIVE, FALSE); else if (signal_in_exception()) - crash_mode(CRASH_LVL_EXCEPTION); + crash_mode(CRASH_LVL_EXCEPTION, FALSE); else if (SIGABRT == signo && crash_last_assertion_failure != NULL) - crash_mode(CRASH_LVL_FAILURE); + crash_mode(CRASH_LVL_FAILURE, FALSE); else if (signal_in_handler()) - crash_mode(CRASH_LVL_EXCEPTION); + crash_mode(CRASH_LVL_EXCEPTION, FALSE); else - crash_mode(CRASH_LVL_BASIC); + crash_mode(CRASH_LVL_BASIC, FALSE); if (v.recursive) { if (!vars->recursive) { @@ -3352,8 +3364,8 @@ s_miniwarn("%s(): trying to divert into main thread", caller); - crash_thread_id = THREAD_MAIN; /* Assume success */ - errno = thread_divert(THREAD_MAIN, cb, arg, NULL); + crash_thread_id = THREAD_MAIN_ID; /* Assume success */ + errno = thread_divert(THREAD_MAIN_ID, cb, arg, NULL); crash_thread_id = crashing; /* Still in crashing thread */ g_assert(errno != 0); /* If we return, there was a problem */ @@ -4044,7 +4056,7 @@ void G_COLD crash_reexec(void) { - crash_mode(CRASH_LVL_RECURSIVE); /* Prevent any memory allocation */ + crash_mode(CRASH_LVL_RECURSIVE, TRUE); /* Prevent any memory allocation */ crash_try_reexec(); _exit(EXIT_FAILURE); @@ -4276,7 +4288,7 @@ else exit(EXIT_FAILURE); - crash_mode(CRASH_LVL_OOM); + crash_mode(CRASH_LVL_OOM, TRUE); crash_auto_restart(); crash_abort(); } @@ -4445,7 +4457,7 @@ { if (!thread_is_main()) { void *res; /* Supplied result, to make this an RPC to main */ - if (0 == thread_divert(THREAD_MAIN, cb, arg, &res)) + if (0 == thread_divert(THREAD_MAIN_ID, cb, arg, &res)) return; /* FALL THROUGH */ } @@ -4503,7 +4515,7 @@ * Avoid endless recursions, record the deadlock the first time only. */ - if (crash_mode(CRASH_LVL_DEADLOCKED)) { + if (crash_mode(CRASH_LVL_DEADLOCKED, TRUE)) { if (vars != NULL) { uint8 t = TRUE; crash_set_var(deadlocked, t); @@ -4527,7 +4539,7 @@ * Avoid endless recursions, record the failure the first time only. */ - if (crash_mode(CRASH_LVL_FAILURE)) { + if (crash_mode(CRASH_LVL_FAILURE, TRUE)) { if (vars != NULL) crash_set_var(failure, a); } @@ -4541,7 +4553,24 @@ const char * G_COLD crash_assert_logv(const char * const fmt, va_list ap) { - crash_mode(CRASH_LVL_FAILURE); + /* + * Normally, crash_assert_logv() must be called after having called + * crash_assert_failure(), which means we have already called crash_mode(). + * + * We must not call it again or it would be seen as a recursive failure. + * + * However, to prevent mistakes, we check that vars->failure is indeed + * not NULL (a signal that crash_assert_failure() was called) and we + * record the failure with a warning if it appears we are not in the + * expected calling pattern.
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/dbstore.c -> gtk-gnutella-1.1.11.tar.bz2/src/lib/dbstore.c
Changed
@@ -46,6 +46,7 @@ #include "dbmw.h" #include "file.h" #include "halloc.h" +#include "hstrfn.h" #include "log.h" #include "path.h" #include "stringify.h"
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/dbus_util.c -> gtk-gnutella-1.1.11.tar.bz2/src/lib/dbus_util.c
Changed
@@ -41,6 +41,7 @@ #include "dbus_util.h" #include "halloc.h" /* For h_strdup() */ +#include "hstrfn.h" /* For h_strdup() */ #include "log.h" #include "misc.h" /* For str_chomp() */
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/entropy.c -> gtk-gnutella-1.1.11.tar.bz2/src/lib/entropy.c
Changed
@@ -1718,7 +1718,7 @@ tm_precise_time(&now); return integer_hash_fast(now.tv_nsec) + - integer_hash_fast(now.tv_sec) + entropy_nonce(); + integer_hash_fast(now.tv_sec + entropy_nonce()); } /**
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/eval.c -> gtk-gnutella-1.1.11.tar.bz2/src/lib/eval.c
Changed
@@ -37,12 +37,14 @@ #endif #include "eval.h" + #include "ascii.h" #include "constants.h" #include "debug.h" #include "gethomedir.h" #include "glib-missing.h" #include "halloc.h" +#include "hstrfn.h" #include "path.h" #include "unsigned.h"
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/file.c -> gtk-gnutella-1.1.11.tar.bz2/src/lib/file.c
Changed
@@ -39,6 +39,7 @@ #include "fd.h" #include "file.h" #include "halloc.h" +#include "hstrfn.h" #include "log.h" /* For s_carp() */ #include "misc.h" /* For is_strsuffix() */ #include "path.h"
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/filelock-test.c -> gtk-gnutella-1.1.11.tar.bz2/src/lib/filelock-test.c
Changed
@@ -43,6 +43,7 @@ #include "filelock.h" #include "halloc.h" #include "hset.h" +#include "hstrfn.h" #include "htable.h" #include "launch.h" #include "log.h"
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/filename.c -> gtk-gnutella-1.1.11.tar.bz2/src/lib/filename.c
Changed
@@ -37,10 +37,12 @@ #include "common.h" #include "filename.h" + #include "ascii.h" #include "concat.h" #include "glib-missing.h" /* For g_strlcat() with glib 1.x */ #include "halloc.h" +#include "hstrfn.h" #include "path.h" #include "random.h" #include "str.h"
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/ftw-test.c -> gtk-gnutella-1.1.11.tar.bz2/src/lib/ftw-test.c
Changed
@@ -36,6 +36,7 @@ #include "ftw.h" #include "halloc.h" #include "hset.h" +#include "hstrfn.h" #include "misc.h" #include "progname.h" #include "stacktrace.h"
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/glog.h -> gtk-gnutella-1.1.11.tar.bz2/src/lib/glog.h
Changed
@@ -213,7 +213,7 @@ void gl_log_set_handler(gl_log_handler_t handler, void *data); void gl_logv(const char *domain, GLogLevelFlags flags, - const char *format, va_list args); + const char *format, va_list args) G_PRINTF(3, 0); void gl_log(const char *domain, GLogLevelFlags flags, const char *format, ...) G_PRINTF(3, 4); void gl_error(const char *domain, const char *format, ...)
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/halloc.c -> gtk-gnutella-1.1.11.tar.bz2/src/lib/halloc.c
Changed
@@ -45,13 +45,10 @@ #include "halloc.h" #include "atomic.h" -#include "concat.h" #include "dump_options.h" #include "glib-missing.h" #include "hashtable.h" #include "malloc.h" -#include "mempcpy.h" -#include "misc.h" #include "once.h" #include "pagetable.h" #include "spinlock.h" @@ -60,8 +57,8 @@ #include "unsigned.h" #include "vmm.h" #include "walloc.h" -#include "zalloc.h" /* For zalloc_shift_pointer() */ #include "xmalloc.h" /* In case halloc() is disabled at runtime */ +#include "zalloc.h" /* For zalloc_shift_pointer() */ #include "override.h" /* Must be the last header included */ @@ -803,389 +800,6 @@ return hstats.blocks; } -#ifndef TRACK_MALLOC -/** - * A clone of strdup() using halloc(). - * The resulting string must be freed via hfree(). - * - * @param str the string to duplicate (can be NULL) - * - * @return a pointer to the new string. - */ -char * -h_strdup(const char *str) -{ - return str ? hcopy(str, 1 + strlen(str)) : NULL; -} - -/** - * A clone of strndup() using halloc(). - * The resulting string must be freed via hfree(). - * - * @param str the string to duplicate a part of (can be NULL) - * @param n the maximum number of characters to copy from string - * - * @return a pointer to the new string. - */ -char * -h_strndup(const char *str, size_t n) -{ - g_assert(size_is_non_negative(n)); - - if (str != NULL) { - size_t len = clamp_strlen(str, n); - char *result = halloc(len + 1); - char *p; - - /* Not hcopy() because we shouldn't even read the nth byte of src. */ - p = mempcpy(result, str, len); - *p = '\0'; - - return result; - } else { - return NULL; - } -} - -/** - * Like h_strjoinv() but the length of the separator is given, meaning it can - * contain embedded NUL characters and does not require to be NUL-terminated. - * - * @param separator string to insert between each strings - * @param seplen amount of bytes in the separator string - * @param str_array a NULL-terminated array of strings to join - * - * @return a newly allocated string joining all the strings from the array, - * with the separator between them. - */ -char * -h_strnjoinv(const char *separator, size_t seplen, char * const *str_array) -{ - const char *sep = separator; - char *result; - - g_assert(str_array != NULL); - g_assert(separator != NULL || 0 == seplen); - - if (str_array0 != NULL) { - size_t i, len, pos; - - len = size_saturate_add(1, strlen(str_array0)); - for (i = 1; str_arrayi != NULL; i++) { - len = size_saturate_add(len, seplen); - len = size_saturate_add(len, strlen(str_arrayi)); - } - - g_assert(len < SIZE_MAX); - - result = halloc(len); - pos = strcpy_len(result, str_array0); - - /* We can freely add to pos, we know it cannot saturate now */ - - for (i = 1; str_arrayi != NULL; i++) { - memcpy(&resultpos, sep, seplen); - pos += seplen; - pos += strcpy_len(&resultpos, str_arrayi); - } - - g_assert(pos + 1 == len); - } else { - result = h_strdup(""); - } - - return result; -} - -/** - * A clone of g_strjoinv() which uses halloc(). - * The resulting string must be freed via hfree(). - * - * Joins a number of strings together to form one long string, with the - * optional separator inserted between each of them. - * - * If separator is NULL, strings in the array are simply concatenated together. - * - * @param separator string to insert between each strings, or NULL - * @param str_array a NULL-terminated array of strings to join - * - * @return a newly allocated string joining all the strings from the array, - * with the separator between them. - */ -char * -h_strjoinv(const char *separator, char * const *str_array) -{ - if G_UNLIKELY(NULL == separator) - return h_strnjoinv(NULL, 0, str_array); - - return h_strnjoinv(separator, strlen(separator), str_array); -} - -/** - * A clone of g_strfreev(). - * - * Frees (via hfree()) a NULL-terminated array of strings, and the array itself. - * If called on a NULL value, does nothing. - */ -void -h_strfreev(char **str_array) -{ - if (str_array != NULL) { - size_t i; - - for (i = 0; str_arrayi != NULL; i++) { - hfree(str_arrayi); - } - - hfree(str_array); - } -} - -/** - * The vectorized version of h_strconcat(). - */ -char * -h_strconcat_v(const char *first, va_list ap) -{ - va_list ap2; - size_t len, ret; - char *dst; - - VA_COPY(ap2, ap); - len = concat_strings_v(NULL, 0, first, ap2); - va_end(ap2); - - len = size_saturate_add(len, 1); - dst = halloc(len); - ret = concat_strings_v(dst, len, first, ap); - - g_assert(ret == len - 1); /* Do not count the trailing NUL */ - - return dst; -} - -/** - * A clone of g_strconcat() using halloc(). - * The resulting string must be freed via hfree(). - * - * Concatenates all of the given strings into one long string. - * - * @attention - * The argument list must end with (void *) 0. - */ -char * -h_strconcat(const char *first, ...)
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/halloc.h -> gtk-gnutella-1.1.11.tar.bz2/src/lib/halloc.h
Changed
@@ -71,18 +71,6 @@ memcpy(cp, p, size); return cp; } - -char *h_strdup(const char *str) G_MALLOC; -char *h_strndup(const char *str, size_t n) G_MALLOC; -char *h_strjoinv(const char *separator, char * const *str_ary); -char *h_strnjoinv(const char *separator, size_t seplen, char * const *str_ary); -void h_strfreev(char **str_array); -char *h_strconcat(const char *str1, ...) G_MALLOC G_NULL_TERMINATED; -char *h_strconcat_v(const char *first, va_list ap) G_MALLOC; -char *h_strdup_printf(const char *format, ...) G_PRINTF(1, 2); -char *h_strdup_vprintf(const char *format, va_list ap) G_PRINTF(1, 0); -char *h_strdup_len_vprintf(const char *format, va_list ap, size_t *len) - G_PRINTF(1, 0); #endif /* !TRACK_MALLOC */ void halloc_init(bool replace_malloc); @@ -96,8 +84,6 @@ size_t halloc_bytes_allocated(void); size_t halloc_chunks_allocated(void); -void *h_private(const void *key, void *p); - struct logagent; struct sha1;
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/header.c -> gtk-gnutella-1.1.11.tar.bz2/src/lib/header.c
Changed
@@ -40,6 +40,7 @@ #include "buf.h" #include "getline.h" /* For MAX_LINE_SIZE */ #include "halloc.h" +#include "hstrfn.h" #include "htable.h" #include "log.h" /* For log_file_printable() */ #include "misc.h"
View file
gtk-gnutella-1.1.11.tar.bz2/src/lib/hstrfn.c
Added
@@ -0,0 +1,580 @@ +/* + * Copyright (c) 2016 Raphael Manfredi + * + *---------------------------------------------------------------------- + * This file is part of gtk-gnutella. + * + * gtk-gnutella is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * gtk-gnutella is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with gtk-gnutella; if not, write to the Free Software + * Foundation, Inc.: + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + *---------------------------------------------------------------------- + */ + +/** + * @ingroup lib + * @file + * + * String functions where memory is dynamically allocated via halloc(). + * + * @author Raphael Manfredi + * @date 2016 + */ + +#include "common.h" + +#include "hstrfn.h" + +#include "concat.h" +#include "halloc.h" +#include "mempcpy.h" +#include "misc.h" +#include "pslist.h" +#include "strvec.h" +#include "thread.h" +#include "unsigned.h" +#include "walloc.h" + +#include "override.h" /* Must be the last header included */ + +#ifndef TRACK_MALLOC +/** + * A clone of strdup() using halloc(). + * The resulting string must be freed via hfree(). + * + * @param str the string to duplicate (can be NULL) + * + * @return a pointer to the new string. + */ +char * +h_strdup(const char *str) +{ + return str ? hcopy(str, 1 + strlen(str)) : NULL; +} + +/** + * A clone of strndup() using halloc(). + * The resulting string must be freed via hfree(). + * + * @param str the string to duplicate a part of (can be NULL) + * @param n the maximum number of characters to copy from string + * + * @return a pointer to the new string. + */ +char * +h_strndup(const char *str, size_t n) +{ + g_assert(size_is_non_negative(n)); + + if (str != NULL) { + size_t len = clamp_strlen(str, n); + char *result = halloc(len + 1); + char *p; + + /* Not hcopy() because we shouldn't even read the nth byte of src. */ + p = mempcpy(result, str, len); + *p = '\0'; + + return result; + } else { + return NULL; + } +} + +/** + * Like h_strjoinv() but the length of the separator is given, meaning it can + * contain embedded NUL characters and does not require to be NUL-terminated. + * + * @param separator string to insert between each strings + * @param seplen amount of bytes in the separator string + * @param str_array a NULL-terminated array of strings to join + * + * @return a newly allocated string joining all the strings from the array, + * with the separator between them. + */ +char * +h_strnjoinv(const char *separator, size_t seplen, char * const *str_array) +{ + const char *sep = separator; + char *result; + + g_assert(str_array != NULL); + g_assert(separator != NULL || 0 == seplen); + + if (str_array0 != NULL) { + size_t i, len, pos; + + len = size_saturate_add(1, strlen(str_array0)); + for (i = 1; str_arrayi != NULL; i++) { + len = size_saturate_add(len, seplen); + len = size_saturate_add(len, strlen(str_arrayi)); + } + + g_assert(len < SIZE_MAX); + + result = halloc(len); + pos = strcpy_len(result, str_array0); + + /* We can freely add to pos, we know it cannot saturate now */ + + for (i = 1; str_arrayi != NULL; i++) { + memcpy(&resultpos, sep, seplen); + pos += seplen; + pos += strcpy_len(&resultpos, str_arrayi); + } + + g_assert(pos + 1 == len); + } else { + result = h_strdup(""); + } + + return result; +} + +/** + * A clone of g_strjoinv() which uses halloc(). + * The resulting string must be freed via hfree(). + * + * Joins a number of strings together to form one long string, with the + * optional separator inserted between each of them. + * + * If separator is NULL, strings in the array are simply concatenated together. + * + * @param separator string to insert between each strings, or NULL + * @param str_array a NULL-terminated array of strings to join + * + * @return a newly allocated string joining all the strings from the array, + * with the separator between them. + */ +char * +h_strjoinv(const char *separator, char * const *str_array) +{ + if G_UNLIKELY(NULL == separator) + return h_strnjoinv(NULL, 0, str_array); + + return h_strnjoinv(separator, strlen(separator), str_array); +} + +/** + * Reverse list of strings into a newly allocated string vector. + * The list is freed in the process. + * + * @param strlist a list of strings, in reverse order + * @param n amount of items in list + * + * @return an allocated string vector, freeed via h_strfreev(). + */ +static char ** +hstrfn_pslist_to_vec(pslist_t *strlist, size_t n) +{ + char **vec; + pslist_t *sl; + + HALLOC_ARRAY(vec, n + 1); + + vecn-- = NULL; + PSLIST_FOREACH(strlist, sl) { + vecn-- = sl->data; + } + + pslist_free(strlist); + + return vec; +} + +/* + * A clone of g_strsplit() which uses halloc(). + * The resulting vector must be freed with h_strfreev(). + * + * Splits a string into a maximum of "max_tokens" pieces, using the given
View file
gtk-gnutella-1.1.11.tar.bz2/src/lib/hstrfn.h
Added
@@ -0,0 +1,66 @@ +/* + * Copyright (c) 2016 Raphael Manfredi + * + *---------------------------------------------------------------------- + * This file is part of gtk-gnutella. + * + * gtk-gnutella is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * gtk-gnutella is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with gtk-gnutella; if not, write to the Free Software + * Foundation, Inc.: + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + *---------------------------------------------------------------------- + */ + +/** + * @ingroup lib + * @file + * + * String functions where memory is dynamically allocated via halloc(). + * + * @author Raphael Manfredi + * @date 2015 + */ + +#ifndef _hstrfn_h_ +#define _hstrfn_h_ + +/* + * Public interface. + */ + +void *h_private(const void *key, void *p); + +/* + * Under TRACK_MALLOC control, these routines are remapped to malloc()/free(). + */ + +#ifndef TRACK_MALLOC +char *h_strdup(const char *str) G_MALLOC; +char *h_strndup(const char *str, size_t n) G_MALLOC; +char *h_strjoinv(const char *separator, char * const *str_ary); +char *h_strnjoinv(const char *separator, size_t seplen, char * const *str_ary); +void h_strfreev(char **str_array); +char *h_strconcat(const char *str1, ...) G_MALLOC G_NULL_TERMINATED; +char *h_strconcat_v(const char *first, va_list ap) G_MALLOC; +char *h_strdup_printf(const char *format, ...) G_PRINTF(1, 2); +char *h_strdup_vprintf(const char *format, va_list ap) G_PRINTF(1, 0); +char *h_strdup_len_vprintf(const char *format, va_list ap, size_t *len) + G_PRINTF(1, 0); +#endif /* !TRACK_MALLOC */ + +char **h_strsplit(const char *str, const char *delim, size_t max_tokens); +char **h_strsplit_set(const char *str, const char *delim, size_t max_tokens); + +#endif /* _hstrfn_h_ */ + +/* vi: set ts=4: */
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/launch-test.c -> gtk-gnutella-1.1.11.tar.bz2/src/lib/launch-test.c
Changed
@@ -42,6 +42,7 @@ #include "glib-missing.h" #include "halloc.h" #include "hset.h" +#include "hstrfn.h" #include "htable.h" #include "launch.h" #include "log.h"
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/magnet.c -> gtk-gnutella-1.1.11.tar.bz2/src/lib/magnet.c
Changed
@@ -42,6 +42,7 @@ #include "concat.h" #include "gnet_host.h" #include "halloc.h" +#include "hstrfn.h" #include "once.h" #include "parse.h" #include "sequence.h"
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/mime_type.c -> gtk-gnutella-1.1.11.tar.bz2/src/lib/mime_type.c
Changed
@@ -50,6 +50,7 @@ { "aac", MIME_TYPE_AUDIO_MP4 }, { "ace", MIME_TYPE_APPLICATION_ACE }, { "ai", MIME_TYPE_APPLICATION_POSTSCRIPT }, + { "ape", MIME_TYPE_AUDIO_APE }, { "apk", MIME_TYPE_APPLICATION_ANDROID_PACKAGE }, { "asc", MIME_TYPE_TEXT_PLAIN }, { "asf", MIME_TYPE_VIDEO_MS_ASF },
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/mime_type.h -> gtk-gnutella-1.1.11.tar.bz2/src/lib/mime_type.h
Changed
@@ -35,8 +35,8 @@ #include "common.h" -#ifndef _lib_mime_h_ -#define _lib_mime_h_ +#ifndef _lib_mime_type_h_ +#define _lib_mime_type_h_ /** * Known MIME content types @@ -55,7 +55,7 @@ enum mime_type mime_type_from_extension(const char *); const char *mime_type_to_string(enum mime_type) G_PURE; -#endif /* _lib_mime_h_ */ +#endif /* _lib_mime_type_h_ */ /* vi: set ts=4 sw=4 cindent: */
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/mime_types.h -> gtk-gnutella-1.1.11.tar.bz2/src/lib/mime_types.h
Changed
@@ -56,6 +56,7 @@ MIME_TYPE(APPLICATION_TROFF_MS, "application/x-troff-ms") MIME_TYPE(APPLICATION_ZIP, "application/zip") MIME_TYPE(APPLICATION_ZOO, "application/x-zoo") +MIME_TYPE(AUDIO_APE, "audio/x-ape") MIME_TYPE(AUDIO_BASIC, "audio/basic") MIME_TYPE(AUDIO_FLAC, "audio/flac") MIME_TYPE(AUDIO_MATROSKA, "audio/x-matroska")
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/mingw32.c -> gtk-gnutella-1.1.11.tar.bz2/src/lib/mingw32.c
Changed
@@ -82,6 +82,7 @@ #include "hashing.h" /* For string_mix_hash() */ #include "hashtable.h" #include "hset.h" +#include "hstrfn.h" #include "iovec.h" #include "log.h" #include "mem.h"
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/misc.c -> gtk-gnutella-1.1.11.tar.bz2/src/lib/misc.c
Changed
@@ -48,6 +48,7 @@ #include "endian.h" #include "entropy.h" #include "halloc.h" +#include "hstrfn.h" #include "htable.h" #include "html_entities.h" #include "log.h" /* For log_file_printable() */
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/once.c -> gtk-gnutella-1.1.11.tar.bz2/src/lib/once.c
Changed
@@ -36,10 +36,13 @@ #include "once.h" #include "atomic.h" +#include "balloc.h" #include "compat_usleep.h" #include "cond.h" #include "hashtable.h" #include "mutex.h" +#include "pcell.h" +#include "pslist.h" #include "thread.h" #include "override.h" /* Must be the last header included */ @@ -47,6 +50,7 @@ #define ONCE_DELAY 200 /* Wait 200 us before looping again */ #define ONCE_TIMEOUT 10000000 /* 10 seconds, in us */ #define ONCE_LOOP_MAX (ONCE_TIMEOUT / ONCE_DELAY) +#define ONCE_MAX_DEPTH 32 /* Arbitrary safety limit */ /** * Arena to be used for the hash table keeping track of the pending @@ -56,6 +60,28 @@ static char once_buffer1024; /** + * Arena used to allocate list cells, forming the list of "once" calls that + * are pending. + */ +static char once_cells1024; + +/** + * Array used to track function names that are being initialized "once", for + * each thread. + * + * Because of the recursion in the "once" initialization sequence, we may + * not be able to get a viable stacktrace from s_minierror(). This is the + * reason why we perform this bookkeeping of which routine is being processed, + * through the per-thread lists in once_stacks. + * + * And because we may not have initialized the walloc() layer fully at this + * point, we use a dedicated allocator from a statically allocated buffer + * (that is "once_cells") to manage the calling list, as specified by the + * "once_cell_allocator" structure, defined later below. + */ +static pslist_t *once_stacksTHREAD_MAX; + +/** * Hash table tracking the pending initializations. * * Keys are the init routine to be run, the value is the ID of the thread. @@ -69,22 +95,162 @@ static mutex_t once_flag_mtx = MUTEX_INIT; /** + * Allocate a list cell. + */ +static void * +once_cell_alloc(void) +{ + return balloc_alloc(once_cells); +} + +/** + * Free a list cell. + */ +static void +once_cell_free(void *cell) +{ + balloc_free(once_cells, cell); +} + +/** + * Specialized allocators for our list cells. + */ +static pcell_alloc_t once_cell_allocator = { + once_cell_alloc, /* pcell_alloc */ + once_cell_free, /* pcell_free */ +}; + +/** + * Initialize the "once" layer. + */ +static void +once_init(void) +{ + once_running = hash_table_new_fixed(once_buffer, sizeof once_buffer); + balloc_init(sizeof(pslist_t), once_cells, sizeof once_cells); +} + +static void +once_routine_log(void *data, void *udata) +{ + const char *name = data; + + (void) udata; + + s_minidbg("%s()", name); +} + +/** + * Trace all the initialization in progress for the given thread. + * + * @param id thread ID + */ +static void +once_backtrace(int id) +{ + s_minidbg("initializations currently in progress:"); + pslist_foreach(once_stacksid, once_routine_log, NULL); +} + +/** + * Log fatal error when initialization calls run too deep. + * + * @param caller calling routine name + * @param id thread ID + * @param routine routine function pointer being initialized once + * @param name stringified routine name + */ +static void G_NORETURN +once_too_deep(const char *caller, int id, once_fn_t routine, const char *name) +{ + s_minilog(G_LOG_LEVEL_WARNING | G_LOG_FLAG_FATAL, + "%s(): deep nesting detected processing routine %s(), aka. %s() in %s", + caller, stacktrace_function_name(routine), name, + thread_safe_id_name(id)); + + once_backtrace(id); + + s_minierror("%s(): arbitrary nesting depth (%d) reached", + caller, ONCE_MAX_DEPTH); +} + +/** + * Log fatal error when recursive initialization is detected. + * + * @param caller calling routine name + * @param id thread ID + * @param routine routine function pointer being initialized once + * @param name stringified routine name + */ +static void G_NORETURN +once_recursive(const char *caller, int id, once_fn_t routine, const char *name) +{ + s_minilog(G_LOG_LEVEL_WARNING | G_LOG_FLAG_FATAL, + "%s(): recursive attempt to initialize routine %s(), aka. %s() in %s", + caller, stacktrace_function_name(routine), name, + thread_safe_id_name(id)); + + once_backtrace(id); + + s_minierror("%s(): recursive initialization request", caller); +} + +/** + * Log fatal error when unable to insert routine in hash table. + * + * @param caller calling routine name + * @param id thread ID + * @param routine routine function pointer being initialized once + * @param name stringified routine name + */ +static void G_NORETURN +once_no_insert(const char *caller, int id, once_fn_t routine, const char *name) +{ + void *val; + bool present; + + s_minilog(G_LOG_LEVEL_WARNING | G_LOG_FLAG_FATAL, + "%s(): unable to register routine %s(), aka. %s() in %s", + caller, stacktrace_function_name(routine), name, + thread_safe_id_name(id)); + + present = hash_table_lookup_extended(once_running, routine, NULL, &val); + + if (present) { + s_minidbg("%s(): routine %s() was registered by %s", + caller, stacktrace_function_name(routine), + thread_safe_id_name(pointer_to_int(val))); + } else { + s_minidbg("%s(): routine %s() is no longer registered by any thread", + caller, stacktrace_function_name(routine)); + } + + once_backtrace(id); + + s_minierror("%s(): cannot register initialization", caller); +} + +/** * Execute supplied routine once, as tracked by the supplied flag. * * @param flag control flag, initially set to FALSE * @param routine the routine to run if it has not been done already + * @param name the stringified routine name, for debugging * @param recursive if TRUE, return FALSE when recursive attempt is detected * * @return TRUE if initialization routine has been run upon return. */
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/once.h -> gtk-gnutella-1.1.11.tar.bz2/src/lib/once.h
Changed
@@ -48,26 +48,36 @@ */ typedef void (*once_fn_t)(void); +/** + * Private interface. + */ + +void once_flag_run_trace(once_flag_t *, once_fn_t, const char *); +bool once_flag_run_safe_trace(once_flag_t *, once_fn_t, const char *); + +void once_flag_runwait_trace(once_flag_t *, once_fn_t, const char *); +bool once_flag_runwait_safe_trace(once_flag_t *, once_fn_t, const char *); + /* * Public interface. */ -void once_flag_run(once_flag_t *flag, once_fn_t routine); -bool once_flag_run_safe(once_flag_t *flag, once_fn_t routine); +#define once_flag_run(f,r) once_flag_run_trace((f),(r),# r) +#define once_flag_run_safe(f,r) once_flag_run_safe_trace((f),(r),# r) -void once_flag_runwait(once_flag_t *flag, once_fn_t routine); -bool once_flag_runwait_safe(once_flag_t *flag, once_fn_t routine); +#define once_flag_runwait(f,r) once_flag_runwait_trace((f),(r),# r) +#define once_flag_runwait_safe(f,r) once_flag_runwait_safe_trace((f),(r),# r) #define ONCE_DONE(f) (ONCE_F_DONE == (f)) -#define ONCE_FLAG_RUN(f, r) G_STMT_START { \ - if G_UNLIKELY(!ONCE_DONE((f))) \ - once_flag_run(&(f), (r)); \ +#define ONCE_FLAG_RUN(f, r) G_STMT_START { \ + if G_UNLIKELY(!ONCE_DONE((f))) \ + once_flag_run_trace(&(f),(r),# r); \ } G_STMT_END #define ONCE_FLAG_RUNWAIT(f, r) G_STMT_START { \ if G_UNLIKELY(!ONCE_DONE((f))) \ - once_flag_runwait(&(f), (r)); \ + once_flag_runwait_trace(&(f),(r),#r); \ } G_STMT_END #endif /* _once_h_ */
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/ostream.c -> gtk-gnutella-1.1.11.tar.bz2/src/lib/ostream.c
Changed
@@ -42,6 +42,7 @@ #include "ostream.h" #include "fd.h" #include "halloc.h" +#include "hstrfn.h" #include "pmsg.h" #include "slist.h" #include "str.h"
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/path.c -> gtk-gnutella-1.1.11.tar.bz2/src/lib/path.c
Changed
@@ -39,6 +39,7 @@ #include "ascii.h" #include "concat.h" #include "halloc.h" +#include "hstrfn.h" #include "log.h" /* For s_error() */ #include "misc.h" #include "omalloc.h"
View file
gtk-gnutella-1.1.11.tar.bz2/src/lib/pcell.h
Added
@@ -0,0 +1,54 @@ +/* + * Copyright (c) 2016 Raphael Manfredi + * + *---------------------------------------------------------------------- + * This file is part of gtk-gnutella. + * + * gtk-gnutella is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * gtk-gnutella is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with gtk-gnutella; if not, write to the Free Software + * Foundation, Inc.: + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + *---------------------------------------------------------------------- + */ + +/** + * @ingroup lib + * @file + * + * List cell allocator interface for plist and pslist. + * + * @author Raphael Manfredi + * @date 2016 + */ + +#ifndef _pcell_h_ +#define _pcell_h_ + +/** + * The optional cell allocator contains generic function pointers to allocate + * or free a cell for a list. + * + * There is no size information: the routines to call must be specific for + * each list. + * + * A pointer to that structure must be passed to *_ext() routines so that + * the proper cell allocators / de-allocators be used, consistently. + */ +typedef struct pcell_allocator { + void *(*pcell_alloc)(void); /**< Return new zeroed cell for the list */ + void (*pcell_free)(void *); /**< Dispose of cell */ +} pcell_alloc_t; + +#endif /* _pcell_h_ */ + +/* vi: set ts=4 sw=4 cindent: */
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/plist.c -> gtk-gnutella-1.1.11.tar.bz2/src/lib/plist.c
Changed
@@ -33,7 +33,18 @@ * * An empty list is represented by a NULL pointer. * - * List cells are allocated through walloc(). + * List cells are allocated through walloc() by default, but all the *_ext() + * routines take an extra pointer to a pcell_alloc_t structure that can provide + * specific cell allocation/deallocation routines. + * + * The whole API is not available for externally allocated cells, and the + * caller is responsible for consistently supplying the same cell allocator! + * Only the most common insertion / removal routines have an *_ext() version + * for now (2016-08-28). + + * However, routines that do not need to allocate / deallocate cells do not + * have an *_ext() version. For instance, plist_shuffle() or plist_reverse() + * can be freely used even if the cells are not allocated using the defaults. * * The API of plain lists mirrors that of glib's lists to make a smooth * transition possible and maintain some consistency in the code. That @@ -49,6 +60,7 @@ #include "elist.h" #include "log.h" +#include "pcell.h" #include "pslist.h" #include "random.h" #include "walloc.h" @@ -70,6 +82,32 @@ * Copyright (c) 2013 Raphael Manfredi */ +/* + * Default cell allocators. + */ + +static void * +plist_cell_alloc(void) +{ + plist_t *pl; + + WALLOC0(pl); + return pl; +} + +static void +plist_cell_free(void *cell) +{ + plist_t *l = cell; + + WFREE(l); +} + +static pcell_alloc_t plist_default_alloc = { + plist_cell_alloc, /* pcell_alloc */ + plist_cell_free, /* pcell_free */ +}; + /** * Allocate a list cell for storing one element. * @@ -78,10 +116,7 @@ plist_t * plist_alloc(void) { - plist_t *pl; - - WALLOC0(pl); - return pl; + return plist_cell_alloc(); } /** @@ -244,11 +279,10 @@ * @return the new head of the list. */ plist_t * -plist_append(plist_t *pl, void *data) +plist_append_ext(plist_t *pl, void *data, const pcell_alloc_t *ca) { - plist_t *nl; + plist_t *nl = ca->pcell_alloc(); - WALLOC(nl); nl->next = NULL; nl->data = data; @@ -264,6 +298,23 @@ } /** + * Append new item at the end of the list. + * + * @attention + * This is inefficient and requires a full traversal of the list. + * + * @param pl the head of the list + * @param data the data item to append + * + * @return the new head of the list. + */ +plist_t * +plist_append(plist_t *pl, void *data) +{ + return plist_append_ext(pl, data, &plist_default_alloc); +} + +/** * Prepend new item at the head of the list. * * @param pl the head of the list @@ -272,11 +323,10 @@ * @return the new head of the list. */ plist_t * -plist_prepend(plist_t *pl, void *data) +plist_prepend_ext(plist_t *pl, void *data, const pcell_alloc_t *ca) { - plist_t *nl; + plist_t *nl = ca->pcell_alloc(); - WALLOC(nl); nl->next = pl; nl->data = data; @@ -302,6 +352,20 @@ } /** + * Prepend new item at the head of the list. + * + * @param pl the head of the list + * @param data the data item to prepend + * + * @return the new head of the list. + */ +plist_t * +plist_prepend(plist_t *pl, void *data) +{ + return plist_prepend_ext(pl, data, &plist_default_alloc); +} + +/** * Insert a new cell with data before specified cell (which must belong * to the list, or be NULL to indicate that data should be inserted at the * end of the list). @@ -441,18 +505,19 @@ * * @param pl the head of the list * @param data the data item we wish to remove + * @param ca cell allocator * * @return the new head of the list. */ plist_t * -plist_remove(plist_t *pl, const void *data) +plist_remove_ext(plist_t *pl, const void *data, const pcell_alloc_t *ca) { plist_t *l; for (l = pl; l != NULL; l = l->next) { if G_UNLIKELY(l->data == data) { pl = plist_remove_link_internal(pl, l); - WFREE(l); + ca->pcell_free(l); break; } } @@ -461,15 +526,30 @@ } /** + * Remove the first cell we find that contains the specified data, if any. + * + * @param pl the head of the list + * @param data the data item we wish to remove + * + * @return the new head of the list. + */ +plist_t * +plist_remove(plist_t *pl, const void *data) +{ + return plist_remove_ext(pl, data, &plist_default_alloc); +} + +/** * Remove all the cells that contain the specified data, if any. * * @param pl the head of the list * @param data the data item we wish to remove + * @param ca cell allocator * * @return the new head of the list. */ plist_t * -plist_remove_all(plist_t *pl, const void *data) +plist_remove_all_ext(plist_t *pl, const void *data, const pcell_alloc_t *ca) { plist_t *l, *next;
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/plist.h -> gtk-gnutella-1.1.11.tar.bz2/src/lib/plist.h
Changed
@@ -134,6 +134,22 @@ plist_t *plist_random(const plist_t *pl); void *plist_shift(plist_t **pl) NON_NULL_PARAM((1)); +struct pcell_allocator; + +plist_t *plist_append_ext(plist_t *pl, + void *data, const struct pcell_allocator *ca); +plist_t *plist_prepend_ext(plist_t *pl, + void *data, const struct pcell_allocator *ca); +plist_t *plist_remove_ext(plist_t *pl, + const void *data, const struct pcell_allocator *ca); +plist_t *plist_remove_all_ext(plist_t *pl, + const void *data, const struct pcell_allocator *ca); +plist_t *plist_delete_link_ext(plist_t *pl, + plist_t *cell, const struct pcell_allocator *ca); +plist_t *plist_foreach_remove_ext(plist_t *pl, + data_rm_fn_t cbr, void *data, const struct pcell_allocator *ca); +void *plist_shift_ext(plist_t **pl_ptr, const struct pcell_allocator *ca); + static inline plist_t * WARN_UNUSED_RESULT plist_prepend_const(plist_t *pl, const void *data) {
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/prop.c -> gtk-gnutella-1.1.11.tar.bz2/src/lib/prop.c
Changed
@@ -32,6 +32,7 @@ #include "file.h" #include "getdate.h" #include "halloc.h" +#include "hstrfn.h" #include "misc.h" #include "mutex.h" #include "parse.h"
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/pslist.c -> gtk-gnutella-1.1.11.tar.bz2/src/lib/pslist.c
Changed
@@ -33,7 +33,19 @@ * * An empty list is represented by a NULL pointer. * - * List cells are allocated through walloc(). + * List cells are allocated through walloc() by default, but all the *_ext() + * routines take an extra pointer to a pcell_alloc_t structure that can provide + * specific cell allocation/deallocation routines. + * + * The whole API is not available for externally allocated cells, and the + * caller is responsible for consistently supplying the same cell allocator! + * Only the most common insertion / removal routines have an *_ext() version + * for now (2016-08-28). + + * However, routines that do not need to allocate / deallocate cells do not + * have an *_ext() version. For instance, pslist_shuffle() or pslist_reverse() + * can be freely used even if the cells are not allocated using the defaults. + * * * The API of plain lists mirrors that of glib's lists to make a smooth * transition possible and maintain some consistency in the code. That @@ -49,6 +61,7 @@ #include "eslist.h" #include "log.h" +#include "pcell.h" #include "random.h" #include "walloc.h" @@ -66,9 +79,35 @@ * * Additional routines and initial adaptation are: * - * Copyright (c) 2013 Raphael Manfredi + * Copyright (c) 2013, 2016 Raphael Manfredi */ +/* + * Default cell allocators. + */ + +static void * +pslist_cell_alloc(void) +{ + pslist_t *pl; + + WALLOC0(pl); + return pl; +} + +static void +pslist_cell_free(void *cell) +{ + pslist_t *l = cell; + + WFREE(l); +} + +static pcell_alloc_t pslist_default_alloc = { + pslist_cell_alloc, /* pcell_alloc */ + pslist_cell_free, /* pcell_free */ +}; + /** * Allocate a list cell for storing one element. * @@ -77,10 +116,7 @@ pslist_t * pslist_alloc(void) { - pslist_t *pl; - - WALLOC0(pl); - return pl; + return pslist_cell_alloc(); } /** @@ -215,15 +251,15 @@ * * @param pl the head of the list * @param data the data item to append + * @param ca cell allocator * * @return the new head of the list. */ pslist_t * -pslist_append(pslist_t *pl, void *data) +pslist_append_ext(pslist_t *pl, void *data, const pcell_alloc_t *ca) { - pslist_t *nl; + pslist_t *nl = ca->pcell_alloc(); - WALLOC(nl); nl->next = NULL; nl->data = data; @@ -237,19 +273,36 @@ } /** + * Append new item at the end of the list. + * + * @attention + * This is inefficient and requires a full traversal of the list. + * + * @param pl the head of the list + * @param data the data item to append + * + * @return the new head of the list. + */ +pslist_t * +pslist_append(pslist_t *pl, void *data) +{ + return pslist_append_ext(pl, data, &pslist_default_alloc); +} + +/** * Prepend new item at the head of the list. * * @param pl the head of the list * @param data the data item to prepend + * @param ca cell allocator * * @return the new head of the list. */ pslist_t * -pslist_prepend(pslist_t *pl, void *data) +pslist_prepend_ext(pslist_t *pl, void *data, const pcell_alloc_t *ca) { - pslist_t *nl; + pslist_t *nl = ca->pcell_alloc(); - WALLOC(nl); nl->next = pl; nl->data = data; @@ -257,6 +310,20 @@ } /** + * Prepend new item at the head of the list. + * + * @param pl the head of the list + * @param data the data item to prepend + * + * @return the new head of the list. + */ +pslist_t * +pslist_prepend(pslist_t *pl, void *data) +{ + return pslist_prepend_ext(pl, data, &pslist_default_alloc); +} + +/** * Insert a new cell with data before specified cell (which must belong * to the list, or be NULL to indicate that data should be inserted at the * end of the list). @@ -361,11 +428,12 @@ * * @param pl the head of the list * @param data the data item we wish to remove + * @param ca cell allocator * * @return the new head of the list. */ pslist_t * -pslist_remove(pslist_t *pl, const void *data) +pslist_remove_ext(pslist_t *pl, const void *data, const pcell_alloc_t *ca) { pslist_t *l, *prev = NULL; @@ -376,7 +444,7 @@ prev->next = l->next; else pl = l->next; - WFREE(l); + ca->pcell_free(l); break; } prev = l; @@ -387,6 +455,20 @@ } /** + * Remove the first cell we find that contains the specified data, if any. + * + * @param pl the head of the list + * @param data the data item we wish to remove + * + * @return the new head of the list. + */ +pslist_t * +pslist_remove(pslist_t *pl, const void *data) +{ + return pslist_remove_ext(pl, data, &pslist_default_alloc); +} + +/** * Remove specified cell from the list, without freeing it.
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/pslist.h -> gtk-gnutella-1.1.11.tar.bz2/src/lib/pslist.h
Changed
@@ -119,6 +119,20 @@ pslist_t *pslist_random(const pslist_t *pl); void *pslist_shift(pslist_t **pl_ptr) NON_NULL_PARAM((1)); +struct pcell_allocator; + +pslist_t *pslist_append_ext(pslist_t *pl, + void *data, const struct pcell_allocator *ca); +pslist_t *pslist_prepend_ext(pslist_t *pl, + void *data, const struct pcell_allocator *ca); +pslist_t *pslist_remove_ext(pslist_t *pl, + const void *data, const struct pcell_allocator *ca); +pslist_t *pslist_delete_link_ext(pslist_t *pl, + pslist_t *cell, const struct pcell_allocator *ca); +pslist_t *pslist_foreach_remove_ext(pslist_t *pl, + data_rm_fn_t cbr, void *data, const struct pcell_allocator *ca); +void *pslist_shift_ext(pslist_t **pl_ptr, const struct pcell_allocator *ca); + static inline pslist_t * WARN_UNUSED_RESULT pslist_prepend_const(pslist_t *pl, const void *data) {
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/rand31.c -> gtk-gnutella-1.1.11.tar.bz2/src/lib/rand31.c
Changed
@@ -157,8 +157,7 @@ size_t nsecs; double cpu; jmp_buf env; - unsigned discard; - unsigned seed; + unsigned discard, seed, n; #ifndef ALLOW_UNINIT_VALUES ZERO(&garbage); @@ -204,7 +203,11 @@ discard += time(NULL); cpu = tm_cputime(NULL, NULL); discard += binary_hash2(&cpu, sizeof cpu); - discard = hashing_fold(discard, 12); + tm_precise_time(&now); + seed += binary_hash2(&now, sizeof now); + nsecs += now.tv_nsec; + n = nsecs % 31; + discard = UINT32_ROTL(discard, n); tm_precise_time(&now); seed += binary_hash2(&now, sizeof now); nsecs += now.tv_nsec; @@ -212,10 +215,17 @@ tm_precise_time(&now); seed += integer_hash2(now.tv_sec + now.tv_nsec); nsecs += now.tv_nsec; - nsecs %= 31; - seed = UINT32_ROTL(seed, nsecs); - if (rand31_is_zero(seed)) - seed = now.tv_sec; /* cannot be zero (modulo RAND31_MOD) */ + n = nsecs % 31; + seed = UINT32_ROTL(seed, n); + if (rand31_is_zero(seed)) { + tm_precise_time(&now); + seed += integer_hash2(now.tv_sec + now.tv_nsec); + if (rand31_is_zero(seed)) + seed += nsecs; + if (rand31_is_zero(seed)) + seed = now.tv_sec; /* cannot be zero (modulo RAND31_MOD) */ + } + discard = hashing_fold(discard, 12); while (0 != discard--) { seed = rand31_prng_next(seed); }
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/spopen-test.c -> gtk-gnutella-1.1.11.tar.bz2/src/lib/spopen-test.c
Changed
@@ -43,6 +43,7 @@ #include "glib-missing.h" #include "halloc.h" #include "hset.h" +#include "hstrfn.h" #include "htable.h" #include "log.h" #include "misc.h"
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/stacktrace.c -> gtk-gnutella-1.1.11.tar.bz2/src/lib/stacktrace.c
Changed
@@ -818,11 +818,15 @@ /* * Do not sleep if we are holding any locks, this could create * deadlocks. + * + * Dumping the lock stack could give away some precious information + * though, since we're not going to get any stack trace! */ if (0 != cnt) { s_rawwarn("%s(): not waiting, %s holds %zu lock%s", caller, thread_safe_name(), cnt, plural(cnt)); + thread_lock_dump_if_any(STDERR_FILENO, thread_small_id()); return FALSE; }
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/stringify.c -> gtk-gnutella-1.1.11.tar.bz2/src/lib/stringify.c
Changed
@@ -1220,12 +1220,22 @@ const char * compact_time(time_delta_t t) { - buf_t *b = buf_private(G_STRFUNC, SIZE_FIELD_MAX); - char *p = buf_data(b); - size_t n, sz = buf_size(b); + /* + * Because this routine can be called during logging at thread-exit time, + * we do not want to create a thread-private value, since it would leak. + * Therefore we manage a set of fix-sized strings indexed by thread ID. + * The maximum string we can print is "-49710d24h60m60s" or 17 chars. + */ - n = compact_time_to_buf(t, p, sz); - g_assert(n < sz); +#define COMPACT_TIME_MAX_LEN 17 + + static char bufTHREAD_MAXCOMPACT_TIME_MAX_LEN; + int stid = thread_small_id(); + char *p = &bufstid0; + size_t n; + + n = compact_time_to_buf(t, p, COMPACT_TIME_MAX_LEN); + g_assert(n < COMPACT_TIME_MAX_LEN); return p; }
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/strvec.c -> gtk-gnutella-1.1.11.tar.bz2/src/lib/strvec.c
Changed
@@ -84,6 +84,89 @@ } /** + * Free string vector content (not the array itself) with given free routine. + * + * The routine stops at the first NULL pointer in the vector and each entry + * is NULL-ified after being freed. + * + * @param fn the free routine (xfree, hfree, etc...) + * @param strv the string vector whose strings need to be freed + * + * @return the amount of entries up to the final NULL. + */ +size_t +strvec_free_with(free_fn_t fn, char **strv) +{ + size_t i; + + g_assert(fn != NULL); + g_assert(strv != NULL); + + for (i = 0; strvi != NULL; i++) { + (*fn)(strvi); + strvi = NULL; + } + + return i; +} + +/** + * Expand existing vector array and append items from the other vector into it. + * + * The strings are NOT duplicated, their pointer is simply copied. + * + * Upon return, "oldn" is updated to hold the new vector count. + * + * @param fn the reallocation routine (xrealloc, hrealloc, etc...) + * @param oldv the string vector we want to expand + * @param oldn contains current known amount of items in oldv, or 0 + * @param copyv the string vector we want to copy at the tail of oldv + * @param copyn if not-zero, the current known amount of items in copyv + * + * @return the address of the (possibly re-allocated) new vector + */ +char ** +strvec_append_with( + realloc_fn_t fn, + char **oldv, size_t *oldn, + char * const *copyv, size_t copyn) +{ + size_t n, m = copyn, i, j; + char **newv; + + g_assert(fn != NULL); + g_assert(oldv != NULL); + g_assert(copyv != NULL); + g_assert(oldn != NULL); + g_assert(size_is_non_negative(*oldn)); + g_assert(size_is_non_negative(copyn)); + + n = *oldn; + if (0 == n) + n = strvec_count(oldv); + + g_assert_log(NULL == oldvn, + "%s(): corrupted vector oldv=%p; given count %zu, %s count n=%zu", + G_STRFUNC, oldv, *oldn, 0 == *oldn ? "computed" : "used", n); + + if (0 == m) + m = strvec_count(copyv); + + g_assert_log(NULL == copyvm, + "%s(): corrupted vector copyv=%p; given count %zu, %s count m=%zu", + G_STRFUNC, copyv, copyn, 0 == copyn ? "computed" : "used", m); + + newv = (*fn)(oldv, (m + n + 1) * sizeof oldv0); + + for (i = n, j = 0; j <= m; /* empty */) + newvi++ = copyvj++; /* Will copy trailing NULL when j == m */ + + *oldn = n + m; + + return newv; +} + +/** * Copy string vector array by allocating items from a supplied memory buffer * and filling given destination vector with pointers. *
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/strvec.h -> gtk-gnutella-1.1.11.tar.bz2/src/lib/strvec.h
Changed
@@ -40,6 +40,10 @@ size_t strvec_count(char * const *strv); size_t strvec_size(char * const *strv); +size_t strvec_free_with(free_fn_t fn, char **strv); +char **strvec_append_with(realloc_fn_t fn, + char **oldv, size_t *oldn, + char * const *copyv, size_t copyn); void *strvec_cpy(char **dstv, char * const *strv, size_t cnt, void *mem, size_t *len);
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/symbols.c -> gtk-gnutella-1.1.11.tar.bz2/src/lib/symbols.c
Changed
@@ -1448,7 +1448,7 @@ } if (st->garbage) - return; /* Already went through the "done" part */ + goto unlock; /* Already went through the "done" part */ /* FALL THROUGH */ } @@ -1474,6 +1474,7 @@ if (!retried && !st->indirect && st->garbage) goto use_pre_computed; +unlock: SYMBOLS_WRITE_UNLOCK(st); }
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/teq.c -> gtk-gnutella-1.1.11.tar.bz2/src/lib/teq.c
Changed
@@ -1009,6 +1009,12 @@ events = thread_block_prepare(); } + if G_UNLIKELY(n > 1) { + s_info("%s(): RPC %s(%p) to %s completed after %u timeouts", + G_STRFUNC, stacktrace_function_name(routine), data, + thread_id_name(id), n); + } + return rpc.result; }
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/thread-test.c -> gtk-gnutella-1.1.11.tar.bz2/src/lib/thread-test.c
Changed
@@ -46,6 +46,7 @@ #include "getcpucount.h" #include "halloc.h" #include "hset.h" +#include "hstrfn.h" #include "log.h" #include "misc.h" #include "mutex.h"
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/thread.c -> gtk-gnutella-1.1.11.tar.bz2/src/lib/thread.c
Changed
@@ -394,6 +394,7 @@ const char *entry_name; /**< Symbolic name of thread entry point */ int suspend; /**< Suspension request(s) */ int pending; /**< Pending messages to emit */ + int interrupt; /**< Interrupt depth count */ socket_fd_t wfd2; /**< For the block/unblock interface */ unsigned joining_id; /**< ID of the joining thread */ unsigned unblock_events; /**< Counts unblock events received */ @@ -1245,6 +1246,39 @@ } /** + * A discovered thread (outside of "main") was seen running. + */ +static void +thread_element_mark_running(struct thread_element *te) +{ + /* + * We are in a discovered thread, and we take this opportunity to + * update the last time we see an activity for that thread. This + * allows thread tracing code to spot likely inactive discovered + * thread since we cannot know when they enter a blocking state due + * to thread synchronization (waiting for an event, sleeping, etc..). + * --RAM, 2015-02-23 + */ + + te->last_seen = tm_time_raw(); + + /* + * Loudly warn if the thread element is marked as gone. + * It means that thread_will_exit() was called, we marked the + * discovered thread as being gone and yet the same thread + * is still being active. + */ + + if G_UNLIKELY(te->gone) { + thread_element_mark_gone_seen(te); + } else if G_UNLIKELY(te->add_monitoring) { + /* No longer flagged as "gone", re-install monitoring */ + te->add_monitoring = FALSE; + thread_monitor_exit(te); + } +} + +/** * @return whether thread element is matching the QID. */ static bool @@ -1268,7 +1302,7 @@ */ if G_LIKELY(te->last_qid == qid) { - if G_LIKELY(THREAD_MAIN == te->stid || te->created) + if G_LIKELY(THREAD_MAIN_ID == te->stid || te->created) goto matched; /* @@ -1279,35 +1313,10 @@ if G_UNLIKELY(!te->valid) goto false_hit; - /* - * We are in a discovered thread, and we take this opportunity to - * update the last time we see an activity for that thread. This - * allows thread tracing code to spot likely inactive discovered - * thread since we cannot know when they enter a blocking state due - * to thread synchronization (waiting for an event, sleeping, etc..). - * --RAM, 2015-02-23 - */ - - te->last_seen = tm_time_raw(); - THREAD_STATS_INCX(qid_cache_self_check); if (thread_eq(te->tid, thread_self())) { - /* - * Loudly warn if the thread element is marked as gone. - * It means that thread_will_exit() was called, we marked the - * discovered thread as being gone and yet the same thread - * is still being active. - */ - - if G_UNLIKELY(te->gone) { - thread_element_mark_gone_seen(te); - } else if G_UNLIKELY(te->add_monitoring) { - /* No longer flagged as "gone", re-install monitoring */ - te->add_monitoring = FALSE; - thread_monitor_exit(te); - } - + thread_element_mark_running(te); goto matched; } @@ -1992,9 +2001,12 @@ THREAD_LOCK(te); if (!te->valid || !te->exit_started || !te->discovered) { + bool is_valid = te->valid; THREAD_UNLOCK(te); - s_warning("%s(): ID #%u seems to be already re-assigned to new %s", - G_STRFUNC, te->stid, thread_element_name(te)); + if (is_valid) { + s_warning("%s(): ID #%u seems to be already re-assigned to new %s", + G_STRFUNC, te->stid, thread_element_name(te)); + } return; } @@ -2034,9 +2046,12 @@ THREAD_LOCK(te); if (!te->valid || !te->exit_started || !te->discovered) { + bool is_valid = te->valid; THREAD_UNLOCK(te); - s_warning("%s(): ID #%u seems to be already re-assigned to new %s", - G_STRFUNC, te->stid, thread_element_name(te)); + if (is_valid) { + s_warning("%s(): ID #%u seems to be already re-assigned to new %s", + G_STRFUNC, te->stid, thread_element_name(te)); + } return; } @@ -3429,6 +3444,9 @@ } } + if (te != NULL && te->discovered && !te->main_thread) + thread_element_mark_running(te); + return te; } @@ -3580,7 +3598,10 @@ if G_UNLIKELY(te != NULL && te->discovered && !te->main_thread) { thread_t t = thread_self(); if (!thread_eq(te->tid, t)) { - te = thread_find_tid(t); /* Find proper TID instead */ + te = thread_find_tid(t); /* Find proper TID instead and... */ + /* ... will have called thread_element_mark_running() if needed */ + } else { + thread_element_mark_running(te); } } @@ -4029,10 +4050,14 @@ if (thread_sp_direction < 0) { /* Stack growing down, base is high_qid */ + if (qva > te->high_qid || qva < te->low_qid - 1) + return; /* Address not in the stack range or near top */ if (qva > te->low_qid + redzone) return; /* Not faulting in the red-zone page */ } else { /* Stack growing up, base is low_qid */ + if (qva < te->low_qid || qva > te->high_qid + 1) + return; /* Address not in the stack range or near top */ if (qva < te->high_qid - redzone) return; /* Not faulting in the red-zone page */ } @@ -4801,6 +4826,16 @@ return FALSE; /* + * If we are in an interrupt, do not suspend the thread: by definition + * the interrupt is critical processing that we want to perform, and it + * can be used during crashing! + * --RAM, 2016-06-19 + */ + + if G_UNLIKELY(te->interrupt != 0) + return FALSE; + + /* * Suspension is critical, especially in crash mode, so check this first. * * We normally only suspend threads that do not hold any locks, but we @@ -4964,7 +4999,7 @@ static bool suspendingTHREAD_MAX; struct thread_element *te; size_t i, n = 0; - unsigned busy = 0; + unsigned busy = 0, busy_skipped = 0; /* * Must use thread_find() and not thread_get_element() to avoid taking @@ -5065,15 +5100,27 @@ continue; } - atomic_int_inc(&xte->suspend); - if (lockwait) { THREAD_LOCK(xte); - if (0 != thread_element_lock_count(xte)) - busy++; + + /* + * An already suspended thread is unlikely to release its locks:
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/thread.h -> gtk-gnutella-1.1.11.tar.bz2/src/lib/thread.h
Changed
@@ -246,7 +246,7 @@ bool thread_is_single(void); bool thread_is_stack_pointer(const void *p, const void *top, unsigned *stid); void thread_exit_mode(void); -void thread_crash_mode(void); +void thread_crash_mode(bool disable_locks); bool thread_is_crashing(void); bool thread_in_crash_mode(void); void thread_lock_disable(bool silent); @@ -436,12 +436,12 @@ #define THREAD_INVALID_ID -1U /**< Invalid ID */ #define THREAD_UNKNOWN_ID -2U /**< Unknown ID */ -#define THREAD_MAIN 0 /**< ID of the main thread */ +#define THREAD_MAIN_ID 0 /**< ID of the main thread */ static inline bool thread_is_main(void) { - return THREAD_MAIN == thread_small_id(); + return THREAD_MAIN_ID == thread_small_id(); } /**
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/url.c -> gtk-gnutella-1.1.11.tar.bz2/src/lib/url.c
Changed
@@ -39,6 +39,7 @@ #include "glib-missing.h" #include "halloc.h" #include "host_addr.h" +#include "hstrfn.h" #include "htable.h" #include "mempcpy.h" #include "misc.h" /* For is_strprefix() */
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/utf8.c -> gtk-gnutella-1.1.11.tar.bz2/src/lib/utf8.c
Changed
@@ -70,6 +70,7 @@ #include "endian.h" #include "halloc.h" #include "hikset.h" +#include "hstrfn.h" #include "htable.h" #include "mempcpy.h" #include "misc.h"
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/vmm.c -> gtk-gnutella-1.1.11.tar.bz2/src/lib/vmm.c
Changed
@@ -5727,6 +5727,29 @@ xmalloc_vmm_inited(); atomic_bool_set(&vmm_fully_inited, TRUE); + + /* + * Need to call stacktrace_unwind() now because this may trigger the + * loading of a shared library, and the dynamic linker can call malloc() + * now. + * + * If we don't do that now, we may run into problems later when the thread + * layer attempts to run thread_backtrace_capture() when it waits for a + * spinlock() for instance: since the VMM page cache is protected by + * a spinlock() and not a mutex(), we could deadlock ourselves if, when + * attempting to lock the page cache, we have to wait and must enter a loop + * to get the spinlock... as soon as thread_backtrace_capture() is called, + * if we need to allocate memory to load a dynamic library, we'll re-enter + * the VMM layer through malloc() or xmalloc(). + * + * --RAM, 2016-11-03 + */ + + { + void *stack; + + stacktrace_unwind(&stack, 1, 0); + } } /**
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/walloc.c -> gtk-gnutella-1.1.11.tar.bz2/src/lib/walloc.c
Changed
@@ -202,7 +202,12 @@ * @param rounded rounded allocation size * @param allocate whether we should allocate a missing zone * - * @return the zone corresponding to the requested size. + * @attention + * This routine can return NULL, caller must check for that condition before + * blindly using the returned value. + * + * @return the zone corresponding to the requested size, NULL if the walloc + * layer was stopped. */ static zone_t * walloc_get_zone(size_t rounded, bool allocate) @@ -216,6 +221,9 @@ WALLOC_LOCK; if (NULL == (zone = wzoneidx)) { + if (walloc_stopped) + return NULL; + if (!allocate) s_error("missing %zu-byte zone", rounded); @@ -246,9 +254,6 @@ g_assert(size_is_positive(size)); - if G_UNLIKELY(walloc_stopped) - return xmalloc(size); - if G_UNLIKELY(rounded > walloc_max) { /* Too big for efficient zalloc() */ return xmalloc(size); @@ -256,6 +261,9 @@ zone = walloc_get_zone(rounded, TRUE); + if G_UNLIKELY(NULL == zone) + return xmalloc(size); + return zalloc(zone); } @@ -274,9 +282,6 @@ g_assert(ptr != NULL); g_assert(size_is_positive(size)); - if G_UNLIKELY(walloc_stopped) - return; - if G_UNLIKELY(rounded > walloc_max) { xfree(ptr); return; @@ -284,6 +289,9 @@ zone = walloc_get_zone(rounded, FALSE); + if G_UNLIKELY(NULL == zone) + return; + zfree(zone, ptr); } @@ -362,6 +370,12 @@ */ zone = walloc_get_zone(rounded, TRUE); + + if G_UNLIKELY(NULL == zone) { + depot = NULL; /* Race condition with walloc_stopped */ + goto done; + } + zsize = zone_size(zone); zidx = wzone_index(zsize); @@ -519,12 +533,11 @@ #endif if G_UNLIKELY(NULL == depot) { - zone_t *zone; + zone_t *zone = walloc_get_zone(rounded, FALSE); - if G_UNLIKELY(walloc_stopped) + if G_UNLIKELY(NULL == zone) return; - zone = walloc_get_zone(rounded, FALSE); zfree_pslist(zone, pl); } else { tmfree_pslist(depot, pl); @@ -566,12 +579,11 @@ #endif if G_UNLIKELY(NULL == depot) { - zone_t *zone; + zone_t *zone = walloc_get_zone(rounded, FALSE); - if G_UNLIKELY(walloc_stopped) + if G_UNLIKELY(NULL == zone) return; - zone = walloc_get_zone(rounded, FALSE); zfree_eslist(zone, el); } else { tmfree_eslist(depot, el); @@ -587,11 +599,9 @@ { zone_t *zone = walloc_get_zone(zalloc_round(size), FALSE); - if G_UNLIKELY(walloc_stopped) + if G_UNLIKELY(NULL == zone) return ptr; - g_assert(zone != NULL); - return zmove(zone, ptr); } @@ -633,6 +643,9 @@ old_zone = walloc_get_zone(old_rounded, FALSE); new_zone = walloc_get_zone(new_rounded, TRUE); + if G_UNLIKELY(NULL == new_zone) + return old; /* walloc_stopped has been set */ + if (old_zone == new_zone) return zmove(old_zone, old); /* Move around if interesting */ @@ -683,6 +696,9 @@ zone = walloc_get_zone(rounded, TRUE); + if G_UNLIKELY(NULL == zone) + return xmalloc(size); + return zalloc_track(zone, file, line); } @@ -763,18 +779,38 @@ } } - walloc_stopped = TRUE; + /* + * To limit race conditions with code that tests for "walloc_stopped" + * and would decide to use a zone, we make sure we nullify the zone + * before destroying it and ensure walloc_get_zone() will return NULL + * when "walloc_stopped" is set, regardless of whether it could allocate + * one on the fly otherwise. + * + * We also attempt to suspend all the other running threads to make sure + * they are not in the middle of using walloc() on the zones we're + * precisely going to destroy! + * + * --RAM, 2016-08-25 + */ + + walloc_stopped = TRUE; /* Prevents creation of new zones on the fly */ + + thread_suspend_others(TRUE); /* * Physically destroy the zones. */ for (i = 0; i < WZONE_SIZE; i++) { - if (wzonei != NULL) { - zdestroy(wzonei); - wzonei = NULL; - } + zone_t *zone = wzonei; + + wzonei = NULL; + + if (zone != NULL) + zdestroy(zone); } + + thread_unsuspend_others(); } /**
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/wd.c -> gtk-gnutella-1.1.11.tar.bz2/src/lib/wd.c
Changed
@@ -357,15 +357,38 @@ const char * wd_name(const watchdog_t *wd) { + watchdog_check(wd); return wd->name; } /** + * @return the configured period of the watchdog, in seconds. + */ +int +wd_period(const watchdog_t *wd) +{ + watchdog_check(wd); + return wd->period; +} + +/** + * @return the remaining time before the callback fires, TIME_DELTA_T_MAX if + * the watchdog is not awoken currently + */ +time_delta_t +wd_remaining(const watchdog_t *wd) +{ + watchdog_check(wd); + return NULL == wd->ev ? TIME_DELTA_T_MAX : cq_remaining(wd->ev) / 1000; +} + +/** * @return TRUE if watchdog has been woken up. */ bool wd_is_awake(const watchdog_t *wd) { + watchdog_check(wd); return wd->ev != NULL; }
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/wd.h -> gtk-gnutella-1.1.11.tar.bz2/src/lib/wd.h
Changed
@@ -37,6 +37,8 @@ #ifndef _wd_h_ #define _wd_h_ +#include "timestamp.h" /* For time_delta_t */ + typedef struct watchdog watchdog_t; /** @@ -61,6 +63,8 @@ const char *wd_name(const watchdog_t *wd); bool wd_is_awake(const watchdog_t *wd); +int wd_period(const watchdog_t *wd); +time_delta_t wd_remaining(const watchdog_t *wd); bool wd_sleep(watchdog_t *wd); bool wd_wakeup(watchdog_t *wd);
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/wordvec.c -> gtk-gnutella-1.1.11.tar.bz2/src/lib/wordvec.c
Changed
@@ -36,10 +36,11 @@ #include "wordvec.h" #include "utf8.h" #include "halloc.h" +#include "hstrfn.h" #include "htable.h" -#include "misc.h" #include "walloc.h" #include "zalloc.h" + #include "override.h" /* Must be the last header included */ #define WOVEC_DFLT 10 /**< Default size of word-vectors */
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/xmalloc.c -> gtk-gnutella-1.1.11.tar.bz2/src/lib/xmalloc.c
Changed
@@ -4523,10 +4523,17 @@ #undef realloc #undef calloc -#define xmalloc malloc -#define xfree free -#define xrealloc realloc -#define xcalloc calloc +/* + * The "e_" prefix is there because xmalloc(), xfree() and friends are already + * remapped in "xmalloc.h" to embed them and prevent conflicts with some + * system libraries that already define them. + * --RAM, 2016-10-28 + */ + +#define e_xmalloc malloc +#define e_xfree free +#define e_xrealloc realloc +#define e_xcalloc calloc #define is_trapping_malloc() 1 @@ -8559,33 +8566,37 @@ /* * Internally, code willing to use xmalloc() ignores whether it is actually * trapping malloc, so we need to define suitable wrapping entry points here. + * + * Note the leading "e_" in names to embed them and prevent conflicts with + * similar symbols on some system libraries. + * --RAM, 2011-10-28 */ #ifdef XMALLOC_IS_MALLOC -#undef xmalloc -#undef xfree -#undef xrealloc -#undef xcalloc +#undef e_xmalloc +#undef e_xfree +#undef e_xrealloc +#undef e_xcalloc void * -xmalloc(size_t size) +e_xmalloc(size_t size) { return malloc(size); } void * -xcalloc(size_t nmemb, size_t size) +e_xcalloc(size_t nmemb, size_t size) { return calloc(nmemb, size); } void -xfree(void *p) +e_xfree(void *p) { free(p); } void * -xrealloc(void *p, size_t size) +e_xrealloc(void *p, size_t size) { return realloc(p, size); }
View file
gtk-gnutella-1.1.9.tar.bz2/src/lib/xmalloc.h -> gtk-gnutella-1.1.11.tar.bz2/src/lib/xmalloc.h
Changed
@@ -62,6 +62,19 @@ #endif /* + * The "liberty" library defines and exports xmalloc(), xcalloc(), xrealloc() + * and xfree() and causes link problems on ArchLinux, and maybe elsewhere + * one day... Remap them to "internal" names so that we do not have to change + * the existing code. + * --RAM, 2016-10-28 + */ + +#define xmalloc e_xmalloc +#define xcalloc e_xcalloc +#define xrealloc e_xrealloc +#define xfree e_xfree + +/* * Public interface. */
View file
gtk-gnutella-1.1.9.tar.bz2/src/main.c -> gtk-gnutella-1.1.11.tar.bz2/src/main.c
Changed
@@ -105,7 +105,9 @@ #include "core/version.h" #include "core/vmsg.h" #include "core/whitelist.h" + #include "if/dht/dht.h" + #include "lib/adns.h" #include "lib/aging.h" #include "lib/atoms.h" @@ -128,6 +130,7 @@ #include "lib/gentime.h" #include "lib/glib-missing.h" #include "lib/halloc.h" +#include "lib/hstrfn.h" #include "lib/htable.h" #include "lib/inputevt.h" #include "lib/iso3166.h" @@ -149,6 +152,7 @@ #include "lib/random.h" #include "lib/setproctitle.h" #include "lib/sha1.h" +#include "lib/shuffle.h" #include "lib/signal.h" #include "lib/stacktrace.h" #include "lib/str.h" @@ -175,8 +179,11 @@ #include "lib/xsort.h" #include "lib/xxtea.h" #include "lib/zalloc.h" + #include "shell/shell.h" + #include "upnp/upnp.h" + #include "xml/vxml.h" #include "ui/gtk/gui.h" @@ -214,6 +221,9 @@ */ #define VMEA_SIZE (8 * 1024 * 1024) /**< Emergency region size: 8 MiB */ +#define OPT(x) optionsmain_arg_ ## x.used +#define OPTARG(x) optionsmain_arg_ ## x.arg + static unsigned main_slow_update; static volatile sig_atomic_t exiting; static volatile sig_atomic_t from_atexit; @@ -228,6 +238,119 @@ static bool main_timer(void *); +extern char **environ; + +enum main_arg { + /* Order matters and must the same as in options below */ + main_arg_child, + main_arg_cleanup, + main_arg_compile_info, + main_arg_daemonize, + main_arg_exec_on_crash, + main_arg_gdb_on_crash, + main_arg_geometry, + main_arg_help, + main_arg_log_stderr, + main_arg_log_stdout, + main_arg_log_supervise, + main_arg_minimized, + main_arg_no_dbus, + main_arg_no_halloc, + main_arg_no_restart, + main_arg_no_supervise, + main_arg_no_xshm, + main_arg_pause_on_crash, + main_arg_ping, + main_arg_restart_on_crash, + main_arg_shell, + main_arg_topless, + main_arg_use_poll, + main_arg_version, + + /* Passed through for Gtk+/GDK/GLib */ + main_arg_class, + main_arg_g_fatal_warnings, + main_arg_gdk_debug, + main_arg_gdk_no_debug, + main_arg_gtk_debug, + main_arg_gtk_no_debug, + main_arg_gtk_module, + main_arg_name, + + num_main_args +}; + +enum arg_type { + ARG_TYPE_NONE, + ARG_TYPE_TEXT, + ARG_TYPE_PATH +}; + +static struct option { + const enum main_arg id; + const char * const name; + const char * const summary; + const enum arg_type type; + const char *arg; /* memory will be allocated via halloc() */ + bool used; +} options = { +#define OPTION(name, type, summary) \ + { main_arg_ ## name , #name, summary, ARG_TYPE_ ## type, NULL, FALSE } + + OPTION(child, NONE, NULL), /* hidden option */ + OPTION(cleanup, NONE, "Final cleanup to help detect memory leaks."), + OPTION(compile_info, NONE, "Display compile-time information."), + OPTION(daemonize, NONE, "Daemonize the process."), +#ifdef HAS_FORK + OPTION(exec_on_crash, PATH, "Path of \"program\" to run on crash."), + OPTION(gdb_on_crash, NONE, "Execute gdb on crash."), +#else + OPTION(exec_on_crash, NONE, NULL), + OPTION(gdb_on_crash, NONE, NULL), /* ignore silently, hide */ +#endif /* HAS_FORK */ + OPTION(geometry, TEXT, "Placement of the main GUI window."), + OPTION(help, NONE, "Print this message."), + OPTION(log_stderr, PATH, "Log standard output to a file."), + OPTION(log_stdout, PATH, "Log standard error output to a file."), + OPTION(log_supervise, PATH, "Log for the supervisor process."), +#ifdef USE_TOPLESS + OPTION(minimized, NONE, NULL), /* accept but hide */ +#else + OPTION(minimized, NONE, "Start with minimized main window."), +#endif /* USE_TOPLESS */ + OPTION(no_dbus, NONE, "Disable D-BUS notifications."), +#ifdef USE_HALLOC + OPTION(no_halloc, NONE, "Disable malloc() replacement."), +#else + OPTION(no_halloc, NONE, NULL), /* ignore silently */ +#endif /* USE_HALLOC */ + OPTION(no_restart, NONE, "Disable auto-restarts on crash."), + OPTION(no_supervise, NONE, "Disable supervision by a parent process."), + OPTION(no_xshm, NONE, "Disable MIT shared memory extension."), + OPTION(pause_on_crash, NONE, "Pause the process on crash."), + OPTION(ping, NONE, "Check whether gtk-gnutella is running."), + OPTION(restart_on_crash,NONE, "Force auto-restarts on crash."), + OPTION(shell, NONE, "Access the local shell interface."), +#ifdef USE_TOPLESS + OPTION(topless, NONE, NULL), /* accept but hide */ +#else + OPTION(topless, NONE, "Disable the graphical user-interface."), +#endif /* USE_TOPLESS */ + OPTION(use_poll, NONE, "Use poll() instead of epoll(), kqueue() etc."), + OPTION(version, NONE, "Show version information."), + + /* These are handled by Gtk+/GDK/GLib */ + OPTION(class, TEXT, NULL), + OPTION(g_fatal_warnings, NONE, NULL), + OPTION(gdk_debug, TEXT, NULL), + OPTION(gdk_no_debug, TEXT, NULL), + OPTION(gtk_debug, TEXT, NULL), + OPTION(gtk_no_debug, TEXT, NULL), + OPTION(gtk_module, TEXT, NULL), + OPTION(name, TEXT, NULL), +#undef OPTION +}; + #ifdef SIGALRM /** * Force immediate shutdown of SIGALRM reception. @@ -627,7 +750,7 @@ return; /* - * Before running final cleanup, show allocation statistics. + * Before running final cleanup, show allocation and thread statistics. */ if (debugging(0)) { @@ -637,6 +760,7 @@ DO(vmm_dump_stats); DO(xmalloc_dump_stats); DO(zalloc_dump_stats); + DO(thread_dump_stats); } /* @@ -691,6 +815,7 @@ if (!running_topless) DO(settings_gui_shutdown); + DO(settings_shutdown); /* @@ -711,8 +836,7 @@ if (crashing) { /* Accelerated shutdown */ - DO(settings_close); - DO(cq_close); + DO(cq_halt);
View file
gtk-gnutella-1.1.9.tar.bz2/src/sdbm/sdbm.c -> gtk-gnutella-1.1.11.tar.bz2/src/sdbm/sdbm.c
Changed
@@ -22,6 +22,7 @@ #include "lib/fd.h" #include "lib/file.h" #include "lib/halloc.h" +#include "lib/hstrfn.h" #include "lib/log.h" #include "lib/misc.h" #include "lib/mutex.h"
View file
gtk-gnutella-1.1.9.tar.bz2/src/shell/shell.c -> gtk-gnutella-1.1.11.tar.bz2/src/shell/shell.c
Changed
@@ -55,6 +55,7 @@ #include "lib/glib-missing.h" #include "lib/halloc.h" #include "lib/hashing.h" +#include "lib/hstrfn.h" #include "lib/htable.h" #include "lib/inputevt.h" #include "lib/pmsg.h" @@ -759,7 +760,7 @@ */ if (!sh->shutdown) { - teq_safe_post(THREAD_MAIN, shell_resume_processing, args); + teq_safe_post(THREAD_MAIN_ID, shell_resume_processing, args); } else { sh->async = FALSE; /* Signal that async processing is done */ }
View file
gtk-gnutella-1.1.9.tar.bz2/src/shell/stats.c -> gtk-gnutella-1.1.11.tar.bz2/src/shell/stats.c
Changed
@@ -126,7 +126,7 @@ arg.get = get; arg.s = s; - (void) teq_rpc(THREAD_MAIN, stats_get_trampoline, &arg); + (void) teq_rpc(THREAD_MAIN_ID, stats_get_trampoline, &arg); } static enum shell_reply
View file
gtk-gnutella-1.1.9.tar.bz2/src/types.h -> gtk-gnutella-1.1.11.tar.bz2/src/types.h
Changed
@@ -138,6 +138,11 @@ typedef void *(*alloc_fn_t)(size_t n); typedef void *(*alloc_data_fn_t)(void *data, size_t n); +/* Re-allocator routine signatures, with or without allocating context */ + +typedef void *(*realloc_fn_t)(void *p, size_t n); +typedef void *(*realloc_data_fn_t)(void *data, void *p, size_t n); + /* Data freeing callbacks signatures, with or without allocating context */ typedef void (*free_fn_t)(void *data);
View file
gtk-gnutella-1.1.9.tar.bz2/src/ui/gtk/downloads_common.c -> gtk-gnutella-1.1.11.tar.bz2/src/ui/gtk/downloads_common.c
Changed
@@ -42,10 +42,12 @@ #include "lib/atoms.h" #include "lib/concat.h" +#include "lib/entropy.h" #include "lib/glib-missing.h" #include "lib/halloc.h" #include "lib/hashlist.h" #include "lib/hset.h" +#include "lib/hstrfn.h" #include "lib/htable.h" #include "lib/str.h" #include "lib/stringify.h" @@ -135,7 +137,7 @@ return; gtk_widget_set_sensitive( - gui_main_window_lookup("button_downloads_clear_stopped"), + gui_main_window_lookup("button_downloads_clear_completed"), guc_download_something_to_clear()); } @@ -143,14 +145,20 @@ * Clear all stopped, complete, and unavailable downloads. */ void -on_button_downloads_clear_stopped_clicked(GtkButton *unused_button, +on_button_downloads_clear_completed_clicked(GtkButton *unused_button, void *unused_udata) { (void) unused_button; (void) unused_udata; - guc_download_clear_stopped(TRUE, TRUE, TRUE, TRUE, TRUE); -} + entropy_harvest_time(); + + fi_gui_files_freeze(); + guc_file_info_clear_completed(); + fi_gui_files_thaw(); + + entropy_harvest_time(); +} /** * Freeze the downloads queue. @@ -946,6 +954,8 @@ static void selected_files_foreach_source(void (*func)(struct download *)) { + entropy_harvest_time(); + SELECTED_FILES_FOREACH_START(file) { struct download *source, *next; @@ -955,6 +965,8 @@ (*func)(source); } } SELECTED_FILES_FOREACH_END + + entropy_harvest_time(); } void @@ -1002,9 +1014,13 @@ (void) unused_menuitem; (void) unused_udata; + entropy_harvest_time(); + SELECTED_FILES_FOREACH_START(file) { fi_gui_pause(file); } SELECTED_FILES_FOREACH_END + + entropy_harvest_time(); } void @@ -1014,9 +1030,13 @@ (void) unused_menuitem; (void) unused_udata; + entropy_harvest_time(); + SELECTED_FILES_FOREACH_START(file) { fi_gui_resume(file); } SELECTED_FILES_FOREACH_END + + entropy_harvest_time(); } void @@ -1032,9 +1052,13 @@ static void fi_gui_purge_selected_files(void) { + entropy_harvest_time(); + SELECTED_FILES_FOREACH_START(file) { guc_fi_purge(file->handle); } SELECTED_FILES_FOREACH_END + + entropy_harvest_time(); } void @@ -1044,6 +1068,8 @@ (void) unused_menuitem; (void) unused_udata; + entropy_harvest_time(); + fi_gui_purge_selected_files(); } @@ -1056,6 +1082,8 @@ (void) unused_menuitem; (void) unused_udata; + entropy_harvest_time(); + file = fi_gui_get_file_at_cursor(); if (file) { char *magnet = fi_gui_file_get_magnet(file); @@ -1073,6 +1101,8 @@ (void) unused_menuitem; (void) unused_udata; + entropy_harvest_time(); + widget = fi_gui_files_widget(); g_return_if_fail(widget); @@ -1093,9 +1123,13 @@ (void) unused_menuitem; (void) unused_udata; + entropy_harvest_time(); + SELECTED_SOURCES_FOREACH_START(d) { guc_download_start(d); } SELECTED_SOURCES_FOREACH_END + + entropy_harvest_time(); } void @@ -1107,6 +1141,8 @@ (void) unused_menuitem; (void) unused_udata; + entropy_harvest_time(); + gnet_prop_get_boolean_val(PROP_SEND_PUSHES, &send_pushes); gnet_prop_get_boolean_val(PROP_IS_FIREWALLED, &firewalled); @@ -1115,6 +1151,8 @@ guc_download_fallback_to_push(d, FALSE, TRUE); } SELECTED_SOURCES_FOREACH_END } + + entropy_harvest_time(); } void @@ -1124,11 +1162,15 @@ (void) unused_menuitem; (void) unused_udata; + entropy_harvest_time(); + SELECTED_SOURCES_FOREACH_START(d) { search_gui_new_browse_host(download_hostname(d), download_addr(d), download_port(d), download_guid(d), NULL, download_is_g2(d) ? SOCK_F_G2 : 0); } SELECTED_SOURCES_FOREACH_END + + entropy_harvest_time(); } void @@ -1140,6 +1182,8 @@ (void) unused_menuitem; (void) unused_udata; + entropy_harvest_time(); + SELECTED_SOURCES_FOREACH_START(d) { removed += guc_download_remove_all_from_peer(download_guid(d), download_addr(d), download_port(d), FALSE); @@ -1148,6 +1192,8 @@ statusbar_gui_message(15, NG_("Forgot %u download", "Forgot %u downloads", removed), removed); + + entropy_harvest_time(); } void @@ -1157,9 +1203,13 @@
View file
gtk-gnutella-1.1.9.tar.bz2/src/ui/gtk/filter.c -> gtk-gnutella-1.1.11.tar.bz2/src/ui/gtk/filter.c
Changed
@@ -44,6 +44,7 @@ #include "lib/ascii.h" #include "lib/halloc.h" +#include "lib/hstrfn.h" #include "lib/parse.h" #include "lib/str.h" #include "lib/stringify.h"
View file
gtk-gnutella-1.1.9.tar.bz2/src/ui/gtk/filter_core.c -> gtk-gnutella-1.1.11.tar.bz2/src/ui/gtk/filter_core.c
Changed
@@ -48,6 +48,7 @@ #include "lib/atoms.h" #include "lib/glib-missing.h" #include "lib/halloc.h" +#include "lib/hstrfn.h" #include "lib/parse.h" #include "lib/str.h" #include "lib/stringify.h"
View file
gtk-gnutella-1.1.9.tar.bz2/src/ui/gtk/gtk-shared/callbacks.h -> gtk-gnutella-1.1.11.tar.bz2/src/ui/gtk/gtk-shared/callbacks.h
Changed
@@ -90,6 +90,7 @@ gboolean on_entry_config_speed_focus_out_event(GtkWidget *, GdkEventFocus *, gpointer user_data); +void on_button_downloads_clear_completed_clicked(GtkButton *, gpointer); void on_button_config_add_dir_clicked(GtkButton *, gpointer user_data); void on_button_config_move_path_clicked(GtkButton *, gpointer user_data); void on_button_config_rescan_dir_clicked(GtkButton *, gpointer user_data);
View file
gtk-gnutella-1.1.9.tar.bz2/src/ui/gtk/gtk2/fileinfo.c -> gtk-gnutella-1.1.11.tar.bz2/src/ui/gtk/gtk2/fileinfo.c
Changed
@@ -42,6 +42,7 @@ #include "if/gui_property.h" +#include "lib/entropy.h" #include "lib/htable.h" #include "lib/utf8.h" #include "lib/walloc.h" @@ -59,6 +60,18 @@ static GtkListStore *store_files; static GtkListStore *store_sources; +enum downloads_info_nb_page { + DOWNLOADS_INFO_NB_PAGE_DETAILS, + DOWNLOADS_INFO_NB_PAGE_ALIASES, + DOWNLOADS_INFO_NB_PAGE_SOURCES, + DOWNLOADS_INFO_NB_PAGE_TOOLS, + DOWNLOADS_INFO_NB_PAGE_SETTINGS, + + NUM_DOWNLOADS_INFO_NB_PAGES +}; + +static enum downloads_info_nb_page notebook_downloads_info_current_page; + #if GTK_CHECK_VERSION(2,6,0) static GtkSortType files_sort_type; static struct sorting_context files_sort; @@ -66,6 +79,22 @@ #endif /* Gtk+ => 2.6.0 */ static void +on_notebook_downloads_info_switch_page(GtkNotebook *unused_notebook, + GtkNotebookPage *unused_page, int page_num, void *unused_udata) +{ + (void) unused_notebook; + (void) unused_page; + (void) unused_udata; + + g_return_if_fail(UNSIGNED(page_num) < NUM_DOWNLOADS_INFO_NB_PAGES); + + entropy_harvest_single(VARLEN(page_num)); + + notebook_downloads_info_current_page = page_num; + gui_prop_set_guint32_val(PROP_DOWNLOADS_INFO_NOTEBOOK_TAB, page_num); +} + +static void fi_gui_files_sort_reset(void) { #if GTK_CHECK_VERSION(2,6,0) @@ -799,6 +828,23 @@ fi_gui_details_treeview_init(); fi_gui_common_init(); + + { + uint32 page; + GtkNotebook *notebook_downloads_info = + GTK_NOTEBOOK(gui_main_window_lookup("notebook_downloads_info")); + + gui_prop_get_guint32_val(PROP_DOWNLOADS_INFO_NOTEBOOK_TAB, &page); + + if (page >= NUM_DOWNLOADS_INFO_NB_PAGES) + page = DOWNLOADS_INFO_NB_PAGE_DETAILS; + + notebook_downloads_info_current_page = page; + gtk_notebook_set_current_page(notebook_downloads_info, page); + + gui_signal_connect(notebook_downloads_info, + "switch-page", on_notebook_downloads_info_switch_page, NULL); + } } void
View file
gtk-gnutella-1.1.9.tar.bz2/src/ui/gtk/gtk2/gnet_stats.c -> gtk-gnutella-1.1.11.tar.bz2/src/ui/gtk/gtk2/gnet_stats.c
Changed
@@ -33,6 +33,7 @@ #include "if/core/gnutella.h" #include "if/bridge/ui2c.h" +#include "lib/entropy.h" #include "lib/str.h" #include "lib/stringify.h" #include "lib/tm.h" @@ -45,7 +46,6 @@ static GtkTreeView *treeview_gnet_stats_recv; static GtkTreeView *treeview_gnet_stats_general; static GtkTreeView *treeview_gnet_stats_horizon; -static GtkNotebook *notebook_gnet_stats; static const gchar * const msg_stats_label = { N_("Type"), @@ -64,11 +64,30 @@ GNET_STATS_NB_PAGE_FLOWC, GNET_STATS_NB_PAGE_RECV, GNET_STATS_NB_PAGE_HORIZON, + GNET_STATS_NB_PAGE_FILE_TRANSFERS, NUM_GNET_STATS_NB_PAGES }; static void gnet_stats_update_drop_reasons(const gnet_stats_t *); +static enum gnet_stats_nb_page gnet_stats_notebook_current_page; + +static void +on_gnet_stats_notebook_switch_page(GtkNotebook *unused_notebook, + GtkNotebookPage *unused_page, int page_num, void *unused_udata) +{ + (void) unused_notebook; + (void) unused_page; + (void) unused_udata; + + g_return_if_fail(UNSIGNED(page_num) < NUM_GNET_STATS_NB_PAGES); + + entropy_harvest_single(VARLEN(page_num)); + + gnet_stats_notebook_current_page = page_num; + gui_prop_set_guint32_val(PROP_GNET_STATS_NOTEBOOK_TAB, page_num); + gnet_stats_gui_update_display(tm_time()); +} /*** *** Private functions @@ -633,8 +652,8 @@ void gnet_stats_gui_init(void) { - notebook_gnet_stats = GTK_NOTEBOOK( - gui_main_window_lookup("gnet_stats_notebook")); + GtkNotebook *notebook_gnet_stats = + GTK_NOTEBOOK(gui_main_window_lookup("gnet_stats_notebook")); /* * Initialize stats tables. @@ -651,6 +670,25 @@ (callback_fn_t) gnet_stats_gui_horizon_update, FREQ_UPDATES, 0); main_gui_add_timer(gnet_stats_gui_timer); + + /* + * Restore previous page. + */ + + { + uint32 page; + + gui_prop_get_guint32_val(PROP_GNET_STATS_NOTEBOOK_TAB, &page); + + if (page >= NUM_GNET_STATS_NB_PAGES) + page = GNET_STATS_NB_PAGE_STATS; + + gnet_stats_notebook_current_page = page; + gtk_notebook_set_current_page(notebook_gnet_stats, page); + } + + gui_signal_connect(notebook_gnet_stats, + "switch-page", on_gnet_stats_notebook_switch_page, NULL); } void @@ -687,12 +725,10 @@ gnet_stats_gui_update_display(time_t now) { static gnet_stats_t stats; - gint current_page; guc_gnet_stats_get(&stats); - current_page = gtk_notebook_get_current_page(notebook_gnet_stats); - switch ((enum gnet_stats_nb_page) current_page) { + switch (gnet_stats_notebook_current_page) { case GNET_STATS_NB_PAGE_STATS: gnet_stats_update_general(&stats); gnet_stats_update_drop_reasons(&stats); @@ -721,6 +757,7 @@ case GNET_STATS_NB_PAGE_RECV: gnet_stats_update_recv(&stats); break; + case GNET_STATS_NB_PAGE_FILE_TRANSFERS: case NUM_GNET_STATS_NB_PAGES: break; }
View file
gtk-gnutella-1.1.9.tar.bz2/src/ui/gtk/gtk2/gtk-gnutella.glade -> gtk-gnutella-1.1.11.tar.bz2/src/ui/gtk/gtk2/gtk-gnutella.glade
Changed
@@ -31845,7 +31845,7 @@ </child> <child> - <widget class="GtkNotebook" id="notebook2"> + <widget class="GtkNotebook" id="notebook_downloads_info"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="show_tabs">True</property> @@ -32252,85 +32252,7 @@ <property name="spacing">0</property> <child> - <widget class="GtkButton" id="button_downloads_clear_stopped"> - <property name="border_width">2</property> - <property name="visible">True</property> - <property name="sensitive">False</property> - <property name="tooltip" translatable="yes">Remove completed downloads from list</property> - <property name="can_focus">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <signal name="clicked" handler="on_button_downloads_clear_stopped_clicked" last_modification_time="Mon, 18 Aug 2003 20:33:21 GMT"/> - - <child> - <widget class="GtkAlignment" id="alignment29"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">0</property> - <property name="yscale">0</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">0</property> - <property name="right_padding">0</property> - - <child> - <widget class="GtkHBox" id="hbox160"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">2</property> - - <child> - <widget class="GtkImage" id="image30"> - <property name="visible">True</property> - <property name="stock">gtk-clear</property> - <property name="icon_size">1</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label411"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Clear completed</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - </child> - </widget> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - </packing> + <placeholder/> </child> <child> @@ -32859,7 +32781,7 @@ <widget class="GtkTable" id="table53"> <property name="visible">True</property> <property name="n_rows">1</property> - <property name="n_columns">7</property> + <property name="n_columns">8</property> <property name="homogeneous">False</property> <property name="row_spacing">2</property> <property name="column_spacing">0</property> @@ -33640,6 +33562,91 @@ <property name="top_attach">0</property> <property name="bottom_attach">1</property> <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="button_downloads_clear_completed"> + <property name="border_width">2</property> + <property name="visible">True</property> + <property name="sensitive">False</property> + <property name="tooltip" translatable="yes">Remove completed downloads from list</property> + <property name="can_focus">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_button_downloads_clear_completed_clicked" last_modification_time="Thu, 10 Nov 2016 19:07:42 GMT"/> + + <child> + <widget class="GtkAlignment" id="alignment150"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">0</property> + <property name="yscale">0</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkHBox" id="hbox9355"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">2</property> + + <child> + <widget class="GtkImage" id="image2295"> + <property name="visible">True</property> + <property name="stock">gtk-clear</property> + <property name="icon_size">1</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label1084"> + <property name="visible">True</property> + <property name="label" translatable="yes">_Clear completed</property> + <property name="use_underline">True</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + </widget> + <packing> + <property name="left_attach">7</property> + <property name="right_attach">8</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> <property name="y_options"></property> </packing> </child>
View file
gtk-gnutella-1.1.9.tar.bz2/src/ui/gtk/gtk2/interface-glade.c -> gtk-gnutella-1.1.11.tar.bz2/src/ui/gtk/gtk2/interface-glade.c
Changed
@@ -16129,7 +16129,7 @@ GtkWidget *label837; GtkWidget *frame105; GtkWidget *drawingarea_fi_progress; - GtkWidget *notebook2; + GtkWidget *notebook_downloads_info; GtkWidget *vbox106; GtkWidget *scrolledwindow88; GtkWidget *treeview_download_details; @@ -16152,11 +16152,6 @@ GtkWidget *checkbutton_downloads_filter_regex_invert; GtkWidget *checkbutton_downloads_filter_regex_case; GtkWidget *hbox9343; - GtkWidget *button_downloads_clear_stopped; - GtkWidget *alignment29; - GtkWidget *hbox160; - GtkWidget *image30; - GtkWidget *label411; GtkWidget *label1028; GtkWidget *hbox261; GtkWidget *table95; @@ -16223,6 +16218,11 @@ GtkWidget *hbox9335; GtkWidget *image1797; GtkWidget *label995; + GtkWidget *button_downloads_clear_completed; + GtkWidget *alignment150; + GtkWidget *hbox9355; + GtkWidget *image2295; + GtkWidget *label1084; GtkTooltips *tooltips; tooltips = gtk_tooltips_new (); @@ -16321,17 +16321,17 @@ gtk_tooltips_set_tip (tooltips, drawingarea_fi_progress, _("Shows visual information on the download progress. Green chunks have been downloaded, with the brighter green chunks touched during this session. Yellow chunks are active right now; these active chunks are also marked with a triangle. Red chunks have not been downloaded yet. The blue line indicates which parts of the file have been seen on the network in this session."), NULL); gtk_widget_set_events (drawingarea_fi_progress, GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK); - notebook2 = gtk_notebook_new (); - gtk_widget_set_name (notebook2, "notebook2"); - gtk_widget_show (notebook2); - gtk_box_pack_start (GTK_BOX (vbox151), notebook2, TRUE, TRUE, 0); - gtk_notebook_set_tab_pos (GTK_NOTEBOOK (notebook2), GTK_POS_BOTTOM); - gtk_notebook_set_scrollable (GTK_NOTEBOOK (notebook2), TRUE); + notebook_downloads_info = gtk_notebook_new (); + gtk_widget_set_name (notebook_downloads_info, "notebook_downloads_info"); + gtk_widget_show (notebook_downloads_info); + gtk_box_pack_start (GTK_BOX (vbox151), notebook_downloads_info, TRUE, TRUE, 0); + gtk_notebook_set_tab_pos (GTK_NOTEBOOK (notebook_downloads_info), GTK_POS_BOTTOM); + gtk_notebook_set_scrollable (GTK_NOTEBOOK (notebook_downloads_info), TRUE); vbox106 = gtk_vbox_new (FALSE, 2); gtk_widget_set_name (vbox106, "vbox106"); gtk_widget_show (vbox106); - gtk_container_add (GTK_CONTAINER (notebook2), vbox106); + gtk_container_add (GTK_CONTAINER (notebook_downloads_info), vbox106); scrolledwindow88 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_set_name (scrolledwindow88, "scrolledwindow88"); @@ -16351,12 +16351,12 @@ label1012 = gtk_label_new (_("Details")); gtk_widget_set_name (label1012, "label1012"); gtk_widget_show (label1012); - gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 0), label1012); + gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook_downloads_info), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook_downloads_info), 0), label1012); scrolledwindow72 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_set_name (scrolledwindow72, "scrolledwindow72"); gtk_widget_show (scrolledwindow72); - gtk_container_add (GTK_CONTAINER (notebook2), scrolledwindow72); + gtk_container_add (GTK_CONTAINER (notebook_downloads_info), scrolledwindow72); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow72), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow72), GTK_SHADOW_ETCHED_IN); @@ -16370,12 +16370,12 @@ label1013 = gtk_label_new (_("Aliases")); gtk_widget_set_name (label1013, "label1013"); gtk_widget_show (label1013); - gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 1), label1013); + gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook_downloads_info), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook_downloads_info), 1), label1013); scrolledwindow89 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_set_name (scrolledwindow89, "scrolledwindow89"); gtk_widget_show (scrolledwindow89); - gtk_container_add (GTK_CONTAINER (notebook2), scrolledwindow89); + gtk_container_add (GTK_CONTAINER (notebook_downloads_info), scrolledwindow89); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow89), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow89), GTK_SHADOW_IN); @@ -16389,12 +16389,12 @@ label1022 = gtk_label_new (_("Sources")); gtk_widget_set_name (label1022, "label1022"); gtk_widget_show (label1022); - gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 2), label1022); + gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook_downloads_info), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook_downloads_info), 2), label1022); frame147 = gtk_frame_new (NULL); gtk_widget_set_name (frame147, "frame147"); gtk_widget_show (frame147); - gtk_container_add (GTK_CONTAINER (notebook2), frame147); + gtk_container_add (GTK_CONTAINER (notebook_downloads_info), frame147); vbox154 = gtk_vbox_new (FALSE, 4); gtk_widget_set_name (vbox154, "vbox154"); @@ -16472,43 +16472,15 @@ gtk_widget_show (hbox9343); gtk_box_pack_start (GTK_BOX (vbox154), hbox9343, FALSE, TRUE, 0); - button_downloads_clear_stopped = gtk_button_new (); - gtk_widget_set_name (button_downloads_clear_stopped, "button_downloads_clear_stopped"); - gtk_widget_show (button_downloads_clear_stopped); - gtk_box_pack_start (GTK_BOX (hbox9343), button_downloads_clear_stopped, FALSE, TRUE, 0); - gtk_container_set_border_width (GTK_CONTAINER (button_downloads_clear_stopped), 2); - gtk_widget_set_sensitive (button_downloads_clear_stopped, FALSE); - gtk_tooltips_set_tip (tooltips, button_downloads_clear_stopped, _("Remove completed downloads from list"), NULL); - - alignment29 = gtk_alignment_new (0.5, 0.5, 0, 0); - gtk_widget_set_name (alignment29, "alignment29"); - gtk_widget_show (alignment29); - gtk_container_add (GTK_CONTAINER (button_downloads_clear_stopped), alignment29); - - hbox160 = gtk_hbox_new (FALSE, 2); - gtk_widget_set_name (hbox160, "hbox160"); - gtk_widget_show (hbox160); - gtk_container_add (GTK_CONTAINER (alignment29), hbox160); - - image30 = gtk_image_new_from_stock ("gtk-clear", GTK_ICON_SIZE_MENU); - gtk_widget_set_name (image30, "image30"); - gtk_widget_show (image30); - gtk_box_pack_start (GTK_BOX (hbox160), image30, FALSE, FALSE, 0); - - label411 = gtk_label_new_with_mnemonic (_("_Clear completed")); - gtk_widget_set_name (label411, "label411"); - gtk_widget_show (label411); - gtk_box_pack_start (GTK_BOX (hbox160), label411, FALSE, FALSE, 0); - label1028 = gtk_label_new (_("Tools")); gtk_widget_set_name (label1028, "label1028"); gtk_widget_show (label1028); - gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 3), label1028); + gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook_downloads_info), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook_downloads_info), 3), label1028); hbox261 = gtk_hbox_new (FALSE, 2); gtk_widget_set_name (hbox261, "hbox261"); gtk_widget_show (hbox261); - gtk_container_add (GTK_CONTAINER (notebook2), hbox261); + gtk_container_add (GTK_CONTAINER (notebook_downloads_info), hbox261); gtk_container_set_border_width (GTK_CONTAINER (hbox261), 2); table95 = gtk_table_new (4, 4, FALSE); @@ -16654,9 +16626,9 @@ label1014 = gtk_label_new (_("Settings")); gtk_widget_set_name (label1014, "label1014"); gtk_widget_show (label1014); - gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 4), label1014); + gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook_downloads_info), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook_downloads_info), 4), label1014); - table53 = gtk_table_new (1, 7, FALSE); + table53 = gtk_table_new (1, 8, FALSE); gtk_widget_set_name (table53, "table53"); gtk_widget_show (table53); gtk_box_pack_start (GTK_BOX (vbox142), table53, FALSE, TRUE, 0); @@ -16885,6 +16857,36 @@ gtk_widget_show (label995); gtk_box_pack_start (GTK_BOX (hbox9335), label995, FALSE, TRUE, 0); + button_downloads_clear_completed = gtk_button_new (); + gtk_widget_set_name (button_downloads_clear_completed, "button_downloads_clear_completed"); + gtk_widget_show (button_downloads_clear_completed); + gtk_table_attach (GTK_TABLE (table53), button_downloads_clear_completed, 7, 8, 0, 1, + (GtkAttachOptions) (GTK_FILL), + (GtkAttachOptions) (0), 0, 0); + gtk_container_set_border_width (GTK_CONTAINER (button_downloads_clear_completed), 2); + gtk_widget_set_sensitive (button_downloads_clear_completed, FALSE); + gtk_tooltips_set_tip (tooltips, button_downloads_clear_completed, _("Remove completed downloads from list"), NULL); + + alignment150 = gtk_alignment_new (0.5, 0.5, 0, 0); + gtk_widget_set_name (alignment150, "alignment150"); + gtk_widget_show (alignment150); + gtk_container_add (GTK_CONTAINER (button_downloads_clear_completed), alignment150); + + hbox9355 = gtk_hbox_new (FALSE, 2); + gtk_widget_set_name (hbox9355, "hbox9355"); + gtk_widget_show (hbox9355); + gtk_container_add (GTK_CONTAINER (alignment150), hbox9355); + + image2295 = gtk_image_new_from_stock ("gtk-clear", GTK_ICON_SIZE_MENU); + gtk_widget_set_name (image2295, "image2295"); + gtk_widget_show (image2295); + gtk_box_pack_start (GTK_BOX (hbox9355), image2295, FALSE, FALSE, 0); + + label1084 = gtk_label_new_with_mnemonic (_("_Clear completed")); + gtk_widget_set_name (label1084, "label1084"); + gtk_widget_show (label1084); + gtk_box_pack_start (GTK_BOX (hbox9355), label1084, FALSE, FALSE, 0); + g_signal_connect ((gpointer) drawingarea_fi_progress, "realize", G_CALLBACK (on_drawingarea_fi_progress_realize), NULL); @@ -16909,12 +16911,12 @@ g_signal_connect ((gpointer) checkbutton_downloads_filter_regex_case, "toggled",
View file
gtk-gnutella-1.1.9.tar.bz2/src/ui/gtk/gtk2/search.c -> gtk-gnutella-1.1.11.tar.bz2/src/ui/gtk/gtk2/search.c
Changed
@@ -54,14 +54,15 @@ #include "lib/atoms.h" #include "lib/halloc.h" #include "lib/hset.h" +#include "lib/hstrfn.h" #include "lib/htable.h" #include "lib/iso3166.h" #include "lib/mime_type.h" #include "lib/misc.h" -#include "lib/tm.h" -#include "lib/url.h" #include "lib/stringify.h" #include "lib/timestamp.h" +#include "lib/tm.h" +#include "lib/url.h" #include "lib/utf8.h" #include "lib/walloc.h"
View file
gtk-gnutella-1.1.9.tar.bz2/src/ui/gtk/html_view.c -> gtk-gnutella-1.1.11.tar.bz2/src/ui/gtk/html_view.c
Changed
@@ -37,12 +37,15 @@ #include "lib/concat.h" #include "lib/glib-missing.h" #include "lib/halloc.h" +#include "lib/hstrfn.h" #include "lib/html.h" #include "lib/mempcpy.h" #include "lib/str.h" #include "lib/utf8.h" #include "lib/walloc.h" +#include "lib/override.h" + #define STYLE_TAG(x) static const gchar STYLE_TAG_ ## x = #x ; STYLE_TAG(ANCHOR) STYLE_TAG(ANCHOR_EXTERN)
View file
gtk-gnutella-1.1.9.tar.bz2/src/ui/gtk/main.c -> gtk-gnutella-1.1.11.tar.bz2/src/ui/gtk/main.c
Changed
@@ -72,6 +72,7 @@ #include "lib/entropy.h" #include "lib/glib-missing.h" #include "lib/halloc.h" +#include "lib/hstrfn.h" #include "lib/omalloc.h" #include "lib/path.h" #include "lib/product.h" @@ -256,6 +257,8 @@ old_page = notebook_main_current_page; notebook_main_current_page = page_num; + gui_prop_set_guint32_val(PROP_MAIN_NOTEBOOK_TAB, page_num); + if (main_window_is_visible) { main_gui_page_visibility_change(old_page, FALSE); main_gui_page_visibility_change(notebook_main_current_page, TRUE); @@ -1025,12 +1028,29 @@ 8, 8); /* - * Make sure the application starts in the Gnet pane. + * Make sure the application starts in the Gnet pane by default, or + * whereever they had left it in the previous session if it restarted + * abnormally (after a crash). */ gui_signal_connect(GTK_NOTEBOOK(gui_main_window_lookup("notebook_main")), "switch-page", on_notebook_main_switch_page, NULL); - main_gui_notebook_set_page(nb_main_page_network); + + { + uint32 page = nb_main_page_network; + bool clean_restart; + + gnet_prop_get_boolean_val(PROP_CLEAN_RESTART, &clean_restart); + + if (!clean_restart) { + gui_prop_get_guint32_val(PROP_MAIN_NOTEBOOK_TAB, &page); + + if (page >= nb_main_page_num) + page = nb_main_page_network; + } + + main_gui_notebook_set_page(page); + } settings_gui_restore_panes(); gtk_main();
View file
gtk-gnutella-1.1.9.tar.bz2/src/ui/gtk/search_common.c -> gtk-gnutella-1.1.11.tar.bz2/src/ui/gtk/search_common.c
Changed
@@ -65,6 +65,7 @@ #include "lib/halloc.h" #include "lib/hashing.h" #include "lib/hset.h" +#include "lib/hstrfn.h" #include "lib/htable.h" #include "lib/iso3166.h" #include "lib/magnet.h"
View file
gtk-gnutella-1.1.9.tar.bz2/src/ui/gtk/statusbar.c -> gtk-gnutella-1.1.11.tar.bz2/src/ui/gtk/statusbar.c
Changed
@@ -40,6 +40,7 @@ #include "lib/glib-missing.h" #include "lib/halloc.h" +#include "lib/hstrfn.h" #include "lib/misc.h" #include "lib/product.h" #include "lib/str.h"
View file
gtk-gnutella-1.1.9.tar.bz2/src/ui/gtk/uploads_common.c -> gtk-gnutella-1.1.11.tar.bz2/src/ui/gtk/uploads_common.c
Changed
@@ -305,7 +305,8 @@ concat_strings(buf, sizeof buf, host_addr_to_string(u->addr), - u->encrypted ? (u->tls_upgraded ? " (e) " : " (E) ") : " ", + u->encrypted ? (u->tls_upgraded ? " (e) " : " (E) ") : "", + u->g2 ? " G2 " : "", peer ? " <" : "", peer ? peer : "", peer ? ">" : "",
View file
gtk-gnutella-1.1.9.tar.bz2/src/upnp/service.c -> gtk-gnutella-1.1.11.tar.bz2/src/upnp/service.c
Changed
@@ -43,6 +43,7 @@ #include "lib/atoms.h" #include "lib/buf.h" #include "lib/halloc.h" +#include "lib/hstrfn.h" #include "lib/nv.h" #include "lib/once.h" #include "lib/parse.h"
View file
gtk-gnutella-1.1.9.tar.bz2/src/xml/vxml.c -> gtk-gnutella-1.1.11.tar.bz2/src/xml/vxml.c
Changed
@@ -43,6 +43,7 @@ #include "lib/buf.h" #include "lib/endian.h" #include "lib/halloc.h" +#include "lib/hstrfn.h" #include "lib/misc.h" #include "lib/nv.h" #include "lib/ostream.h"
View file
gtk-gnutella-1.1.9.tar.bz2/src/xml/xattr.c -> gtk-gnutella-1.1.11.tar.bz2/src/xml/xattr.c
Changed
@@ -42,6 +42,7 @@ #include "lib/halloc.h" #include "lib/hashing.h" #include "lib/hashlist.h" +#include "lib/hstrfn.h" #include "lib/walloc.h" #include "lib/override.h" /* Must be the last header included */
View file
gtk-gnutella-1.1.9.tar.bz2/src/xml/xfmt.c -> gtk-gnutella-1.1.11.tar.bz2/src/xml/xfmt.c
Changed
@@ -40,6 +40,7 @@ #include "lib/ascii.h" #include "lib/halloc.h" #include "lib/hset.h" +#include "lib/hstrfn.h" #include "lib/htable.h" #include "lib/log.h" /* For log_file_printable() */ #include "lib/misc.h" /* For CONST_STRLEN() */
View file
gtk-gnutella-1.1.9.tar.bz2/src/xml/xnode.c -> gtk-gnutella-1.1.11.tar.bz2/src/xml/xnode.c
Changed
@@ -41,6 +41,7 @@ #include "lib/etree.h" #include "lib/halloc.h" #include "lib/hashlist.h" +#include "lib/hstrfn.h" #include "lib/nv.h" #include "lib/str.h" #include "lib/walloc.h"
View file
gtk-gnutella-1.1.9.tar.bz2/version -> gtk-gnutella-1.1.11.tar.bz2/version
Changed
@@ -1,1 +1,1 @@ -1.1.9 +1.1.11
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.