mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-10 12:12:31 +00:00
* Added TextElementBranch that uses a slot as the conditional.
* Added timeout to WindowText and updated download and peer info. * Moved default http agent string to rtorrent/configure.ac. * Periodic syncing of chunks now tries to only sync tightly packed ranges of chunks unless timeout_sync has been reached. * ChunkManager now checks if max memory is set to RLIM_INFINITY, if so use 2^32. * Added safe_sync option that forces MS_SYNC to be used before unmapping chunks. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@757 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -47,11 +47,16 @@ const torrent::Object Variable::m_emptyObject;
|
||||
const char*
|
||||
Variable::string_to_value_unit(const char* pos, value_type* value, int base, int unit) {
|
||||
char* last;
|
||||
|
||||
*value = strtoll(pos, &last, base);
|
||||
|
||||
if (last == pos)
|
||||
if (last == pos) {
|
||||
if (strcasecmp(pos, "no") == 0) { *value = 0; return pos + strlen("no"); }
|
||||
if (strcasecmp(pos, "yes") == 0) { *value = 1; return pos + strlen("yes"); }
|
||||
if (strcasecmp(pos, "true") == 0) { *value = 1; return pos + strlen("true"); }
|
||||
if (strcasecmp(pos, "false") == 0) { *value = 0; return pos + strlen("false"); }
|
||||
|
||||
throw torrent::input_error("Could not convert string to value.");
|
||||
}
|
||||
|
||||
switch (*last) {
|
||||
case 'b':
|
||||
|
||||
Reference in New Issue
Block a user