1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-30 01:55:30 +00:00
Commit Graph

22 Commits

Author SHA1 Message Date
Witold Filipczyk
a77925ebb5 [bittorrent] const in init_bittorrent_peer_id 2022-02-21 16:52:48 +01:00
Witold Filipczyk
07fb70a4a3 [bittorrent] const in get_peer_message 2022-02-17 19:29:04 +01:00
Witold Filipczyk
04b2dce53f [bittorrent] enum bittorrent_message_id -> bittorrent_message_id_T 2022-01-28 16:55:27 +01:00
Witold Filipczyk
5ec6572ed7 [bittorrent] initialization 2022-01-28 16:36:14 +01:00
Witold Filipczyk
4487234de3 [bittorrent] enum bittorrent_blacklist_flags -> bittorrent_blacklist_flags_T 2022-01-28 16:31:07 +01:00
Witold Filipczyk
1d862ec801 [bittorrent] cast 2022-01-25 19:08:21 +01:00
Witold Filipczyk
881f896e85 [mem_calloc] Cast 2022-01-16 21:08:50 +01:00
Witold Filipczyk
20c161559c [mem_alloc] cast return value 2022-01-16 19:09:27 +01:00
Witold Filipczyk
ee06a871c3 [c] More fixes related to redefined PF_INET 2021-12-22 16:27:29 +01:00
Witold Filipczyk
0fea79cc8f [cflags] Removed -Wno-pointer-sign
Likely some new bugs were introduced by this change.
The long term goal is clean compilation by g++.
2021-01-02 16:20:27 +01:00
Witold Filipczyk
8cf00fa61c delete -> delete_ for C++ compatibility 2016-04-20 18:57:32 +02:00
Kalle Olavi Niemitalo
a73fe73cd2 Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:

	src/document/document.h
	src/encoding/encoding.c
	src/network/connection.c
	src/protocol/bittorrent/bittorrent.c
	src/protocol/bittorrent/bittorrent.h
	src/protocol/bittorrent/common.h
	src/protocol/bittorrent/connection.c
	src/protocol/bittorrent/dialogs.c
	src/protocol/bittorrent/tracker.c
	src/protocol/file/cgi.c
	src/protocol/http/http.c
2008-08-03 22:18:53 +03:00
Kalle Olavi Niemitalo
6c2e8cd7b2 Bug 1013: Don't assume errno is between 0 and 100000
Replace almost all uses of enum connection_state with struct
connection_status.  This removes the assumption that errno values used
by the system are between 0 and 100000.  The GNU Hurd uses values like
ENOENT = 0x40000002 and EMIG_SERVER_DIED = -308.

This commit is derived from my attachments 450 and 467 to bug 1013.
2008-08-03 17:56:41 +03:00
Kalle Olavi Niemitalo
7a72a685e5 1008: Centralize random numbers.
If ELinks is being linked with SSL library, use its random number
generator.

Otherwise, try /dev/urandom and /dev/prandom.  If they do not work,
fall back to rand(), calling srand() only once.  This fallback is
mostly interesting for the Hurd and Microsoft Windows.

BitTorrent piece selection and dom/test/html-mangle.c still use rand()
(but not srand()) directly.  Those would not benefit from being
unpredictable, I think.
2008-05-25 18:44:21 +03:00
Kalle Olavi Niemitalo
f0d10c9f29 Add struct bittorrent_const_string.
Previously, struct string was used here.  However,
bittorrent_fetch_callback does not initialize response.magic,
and parse_bittorrent_tracker_response changes response->source
to point to data that must not be freed.  So the util/string.h
functions are not actually safe to use on these objects.
For this reason, it is safer to use a separate type.
2008-01-26 18:16:45 +02:00
Kalle Olavi Niemitalo
a831beb6c8 const in BitTorrent 2008-01-26 18:10:35 +02:00
Kalle Olavi Niemitalo
07535cf886 Define BITTORRENT_NULL_ID in common.c; declare extern in common.h.
This change avoids linker warnings when building with Debian tcc
0.9.23-4 + patch from Debian bug 418360:

      [LD]   src/protocol/bittorrent/lib.o
bittorrent.o: 'BITTORRENT_NULL_ID' defined twice
common.o: 'BITTORRENT_NULL_ID' defined twice
connection.o: 'BITTORRENT_NULL_ID' defined twice
dialogs.o: 'BITTORRENT_NULL_ID' defined twice
peerconnect.o: 'BITTORRENT_NULL_ID' defined twice
peerwire.o: 'BITTORRENT_NULL_ID' defined twice
piececache.o: 'BITTORRENT_NULL_ID' defined twice
tracker.o: 'BITTORRENT_NULL_ID' defined twice
2007-09-14 16:58:16 +02:00
Kalle Olavi Niemitalo
96176a8c77 Declare element types of lists. 2007-07-26 22:47:23 +03:00
Miciah Dashiel Butler Masters
daad05c055 Don't check is_in_progress_state before calling cancel_download
With commit 637f1e82e6 ('NET: Merge
change_connection into cancel_download'), cancel_download returns
immediately if the connection is not in a result state, so save some
code by not checking is_in_progress_state before calling cancel_download.
2006-02-12 15:41:21 +00:00
Jonas Fonseca
3324496b57 NET: Replace change_connection with cancel_download and move_download
This simplifies unqueuing of downloads and makes it more obvious that
the 'change' being performed is to migrate or replace an old download
handle with a new one.
2006-02-03 10:44:28 +01:00
Laurent MONIN
df065ead80 Remove now useless $Id: lines. 2005-10-21 09:14:07 +02:00
Petr Baudis
0f6d4310ad Initial commit of the HEAD branch of the ELinks CVS repository, as of
Thu Sep 15 15:57:07 CEST 2005. The previous history can be added to this
by grafting.
2005-09-15 15:58:31 +02:00