aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2018-11-15Removed a lot of unnecessary includesMartijn Otto9-72/+9
2018-10-27tests: fix MSYS2 warning 'MONERO_DEFAULT_LOG_CATEGORY redefined'xiphon1-0/+2
2018-10-24epee: some minor speedup in parsingmoneromooo-monero1-2/+4
2018-10-20console_handler: add a global log when exiting via EOFmoneromooo-monero1-1/+4
It's a common confusion point for users which run monerod without stdin and with --detach
2018-10-12readline_buffer: fix "cursor in prompt" bugmoneromooo-monero2-1/+5
It happens when readline displays a prompt just before switching to a shorter one
2018-10-12Remove epee header dependency on cryptonote_coremoneromooo-monero2-6/+5
2018-10-08ANSI colors in Windows 10iDunk54001-0/+35
2018-10-02epee: initialize a few data members where it seems to be appropriatemoneromooo-monero2-1/+4
2018-10-02abstract_tcp_server2: move m_period to subclassmoneromooo-monero1-5/+6
This is where it is actually used, and initialized
2018-10-02connection_basic: remove unused floating time start timemoneromooo-monero2-10/+0
2018-10-02Catch more exceptions in dtorsmoneromooo-monero1-1/+2
Misc coverity reports
2018-09-29Merge pull request #4459Riccardo Spagni4-3/+16
bcf3f6af fuzz_tests: catch unhandled exceptions (moneromooo-monero) 3ebd05d4 miner: restore stream flags after changing them (moneromooo-monero) a093092e levin_protocol_handler_async: do not propagate exception through dtor (moneromooo-monero) 1eebb82b net_helper: do not propagate exceptions through dtor (moneromooo-monero) fb6a3630 miner: do not propagate exceptions through dtor (moneromooo-monero) 2e2139ff epee: do not propagate exception through dtor (moneromooo-monero) 0749a8bd db_lmdb: do not propagate exceptions in dtor (moneromooo-monero) 1b0afeeb wallet_rpc_server: exit cleanly on unhandled exceptions (moneromooo-monero) 418a9936 unit_tests: catch unhandled exceptions (moneromooo-monero) ea7f9543 threadpool: do not propagate exceptions through the dtor (moneromooo-monero) 6e855422 gen_multisig: nice exit on unhandled exception (moneromooo-monero) 53df2deb db_lmdb: catch error in mdb_stat calls during migration (moneromooo-monero) e67016dd blockchain_blackball: catch failure to commit db transaction (moneromooo-monero) 661439f4 mlog: don't remove old logs if we failed to rename the current file (moneromooo-monero) 5fdcda50 easylogging++: test for NULL before dereference (moneromooo-monero) 7ece1550 performance_test: fix bad last argument calling add_arg (moneromooo-monero) a085da32 unit_tests: add check for page size > 0 before dividing (moneromooo-monero) d8b1ec8b unit_tests: use std::shared_ptr to shut coverity up about leaks (moneromooo-monero) 02563bf4 simplewallet: top level exception catcher to print nicer messages (moneromooo-monero) c57a65b2 blockchain_blackball: fix shift range for 32 bit archs (moneromooo-monero)
2018-09-29Merge pull request #4443Riccardo Spagni1-0/+2
b2972927 osx compilation fix: missing boost libs added (Dusan Klinec)
2018-09-26osx compilation fix: missing boost libs addedDusan Klinec1-0/+2
2018-09-25epee: fix stack overflow on crafted inputmoneromooo-monero1-5/+8
2018-09-25epee: fix invalid memory write reading an array entrymoneromooo-monero1-0/+8
Reported by Lilith Wyatt at Talos. Since this is not needed in normal operation, I just let this error out.
2018-09-14mlog: do not display http errors by defaultmoneromooo-monero1-1/+1
They're controllable by potential attackers and would just spam
2018-09-12wipeable_string: add hex_to_pod functionmoneromooo-monero3-2/+21
2018-09-10Modify depends for monero's dependenciesTheCharlatan1-1/+1
Add readline, ldns, graphviz, unbound to depends packages Add a cmake toolchain file to depends that is uniquely created for every build and placed in triple/share/toolchain.cmake This file is then passed to cmake with -DCMAKE_TOOLCHAIN_FILE=/path/to/triple/share/toolchain.cmake Add the boost locale package to depends In the depends cmake toolchain file, a DEPENDS flag is added to exclude, or change cmake checks done that are required for depends Link miniupnpc and unwind from depends and not external Add libiconv and icu4c to depends, required for mingw32 builds. Headers (winsock) need to be lower case in order to compile on unix systems. This should not affect building on windows.
2018-09-09abstract_tcp_server2: fix binding to the wrong IPmoneromooo-monero1-4/+4
2018-08-27epee: use the socket::bind variant which does not throwmoneromooo-monero1-2/+18
When this throws in a loop, stack trace generation can take a significant amount of CPU
2018-08-19epee: some speedup in parsingmoneromooo-monero1-1/+8
2018-08-17epee: resize vectors where possible in serializationmoneromooo-monero1-0/+6
to avoid unnecessary repeated reallocation
2018-08-16common: add a class to safely wrap mlock/munlockmoneromooo-monero4-1/+277
This class will allow mlocking small objects, of which there may be several per page. It adds refcounting so pages are only munlocked when the last object on that page munlocks.
2018-08-16store secret keys encrypted where possiblemoneromooo-monero1-0/+9
The secret spend key is kept encrypted in memory, and decrypted on the fly when needed. Both spend and view secret keys are kept encrypted in a JSON field in the keys file. This avoids leaving the keys in memory due to being manipulated by the JSON I/O API.
2018-08-16wallet: wipe seed from memory where appropriatemoneromooo-monero5-6/+194
2018-08-03Added features to epee::span<T> :Lee Clagett1-6/+40
- Support for classes - Added `remove_prefix` function - Added `to_mut_span` and `as_mut_byte_span`
2018-07-26mlog: handle filenames without parent directoriesmoneromooo-monero1-1/+3
eg, --log-file=foo.log This would otherwise throw and crash with a stack overflow
2018-07-25epee: set jsonrpc to "2.0" in parse error return datamoneromooo-monero1-0/+1
2018-07-15abstract_tcp_server2: fix race on shutdownmoneromooo-monero2-1/+9
2018-07-10memwipe: don't call the workhorse for 0 bytesmoneromooo-monero1-3/+5
Some of them don't like it
2018-07-03http_protocol_handler: fix HTTP/x.y parsingmoneromooo-monero1-1/+1
It was accepting any character for the dot (yeah, massive big I know)
2018-07-03http_protocol_handler: catch invalid numbers when parsingmoneromooo-monero1-4/+12
2018-06-29abstract_tcp_server2: fix use after freemoneromooo-monero1-2/+2
2018-06-28epee.string_tools: add conversion between UTF-8 and UTF-16stoffu2-15/+45
2018-06-18abstract_tcp_server2: restart async accept on errormoneromooo-monero1-4/+19
2018-06-13wallet-rpc: added IPs to error logging in simple_http_connection_handlerjcktm2-18/+18
2018-06-13mlog: --max-log-files to set the max number of rotated log filesstoffu2-3/+53
2018-06-10epee: adaptive connection timeout systemmoneromooo-monero4-19/+75
a connection's timeout is halved for every extra connection from the same host. Also keep track of when we don't need to use a connection anymore, so we can close it and free the resource for another connection. Also use the longer timeout for non routable local addresses.
2018-06-09epee: fallback to a counter if gmtime fails when rotating logsmoneromooo-monero1-1/+2
2018-06-09epee: fix include for ofstreammoneromooo-monero1-1/+1
2018-06-09abstract_tcp_server2: fix busy calling of idle IO servicemoneromooo-monero1-2/+4
This would make monerod use 100% CPU when running with torsocks without Tor running
2018-06-01epee: fix detection of 172.16.0.0/172.31.255.255 local IP rangemoneromooo-monero1-1/+1
2018-05-28disable file size sanity check when loading the wallet cachemoneromooo-monero1-3/+3
2018-05-27http_protocol_handler: limit the number of starting newlinesmoneromooo-monero3-1/+12
2018-05-26abstract_tcp_server2: timeout on RPC connectionsmoneromooo-monero2-1/+68
2018-05-26http_protocol_handler: speedup newline discardingmoneromooo-monero1-2/+5
2018-05-26console_handler: fix start_default_console use of prompt parametermoneromooo-monero1-3/+21
It had not been updated to the function type change
2018-05-17epee: log type name when a container size check failsmoneromooo-monero1-1/+1
2018-04-25mlog: fix setting no logsmoneromooo-monero1-1/+6
2018-04-19epee: Drop deprecated Boost.Thread headerJan Beich2-2/+4
In file included from src/cryptonote_basic/hardfork.cpp:33: In file included from src/blockchain_db/blockchain_db.h:42: In file included from src/cryptonote_basic/hardfork.h:31: contrib/epee/include/syncobj.h:37:10: fatal error: 'boost/thread/v2/thread.hpp' file not found #include <boost/thread/v2/thread.hpp> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from src/rpc/daemon_handler.cpp:29: In file included from src/rpc/daemon_handler.h:36: In file included from src/p2p/net_node.h:41: In file included from contrib/epee/include/net/levin_server_cp2.h:32: In file included from contrib/epee/include/net/abstract_tcp_server2.h:324: contrib/epee/include/net/abstract_tcp_server2.inl:44:10: fatal error: 'boost/thread/v2/thread.hpp' file not found #include <boost/thread/v2/thread.hpp> // TODO ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ contrib/epee/include/math_helper.h: In member function 'bool epee::math_helper::average<val, default_base>::set_base()': contrib/epee/include/syncobj.h:227:56: error: 'sleep_for' is not a member of 'boost::this_thread' #define CRITICAL_REGION_LOCAL(x) {boost::this_thread::sleep_for(boost::chrono::milliseconds(epee::debug::g_test_dbg_lock_sleep()));} epee::critical_region_t<decltype(x)> critical_region_var(x) ^ contrib/epee/include/syncobj.h:227:56: note: in definition of macro 'CRITICAL_REGION_LOCAL' #define CRITICAL_REGION_LOCAL(x) {boost::this_thread::sleep_for(boost::chrono::milliseconds(epee::debug::g_test_dbg_lock_sleep()));} epee::critical_region_t<decltype(x)> critical_region_var(x) ^~~~~~~~~ contrib/epee/include/syncobj.h:227:56: note: suggested alternative: 'sleep' #define CRITICAL_REGION_LOCAL(x) {boost::this_thread::sleep_for(boost::chrono::milliseconds(epee::debug::g_test_dbg_lock_sleep()));} epee::critical_region_t<decltype(x)> critical_region_var(x) ^ contrib/epee/include/syncobj.h:227:56: note: in definition of macro 'CRITICAL_REGION_LOCAL' #define CRITICAL_REGION_LOCAL(x) {boost::this_thread::sleep_for(boost::chrono::milliseconds(epee::debug::g_test_dbg_lock_sleep()));} epee::critical_region_t<decltype(x)> critical_region_var(x) ^~~~~~~~~
2018-03-15Fix typos in various filesDimitris Apostolou3-3/+3
2018-02-25Wallet2 + CLI wallet: UTF-8 support for filenames and paths under Windowsrbrunner71-1/+82
2018-02-18wipeable_string: don't try to wipe an empty buffermoneromooo-monero1-3/+6
memset_s doesn't like it
2018-02-17memwipe: add missing #include <stdio.h>stoffu1-0/+1
2018-02-11Fix #602 Turn on socket keepaliveHoward Chu1-0/+3
2018-02-08epee get_ns_count: cast to uint64_t before multiplying 10^9 to avoid overflowstoffu1-2/+2
2018-02-02pass large parameters by const ref, not valuemoneromooo-monero4-11/+11
Coverity 136394 136397 136409 136526 136529 136533 175302
2018-02-01call _exit instead of abort in release modemoneromooo-monero1-0/+6
Avoids cores being created, as they're nowadays often piped to some call home system
2018-01-31wipeable_string: call memwipe directlymoneromooo-monero2-13/+6
since the original reason for the indirect call (that memwipe was not in contrib) is now gone
2018-01-29Fix method name in invoke_http_json_rpcErik de Castro Lopo1-1/+1
Previously, the method name was printed as an exmpty string because the input string had already been moved with `std::move`.
2018-01-29Allow the number of incoming connections to be limitedErik de Castro Lopo1-33/+45
It was already possible to limit outgoing connections. One might want to do this on home network connections with high bandwidth but low usage caps.
2018-01-26Readd copyright starting datexmr-eric7-7/+7
2018-01-26Update 2018 copyrightxmr-eric17-17/+17
2018-01-26levin_protocol_handler_async: erase from back of vector instead of frontstoffu1-1/+1
2018-01-18remove unnecessary includeJethro Grassie1-1/+0
2018-01-18Remove is_pod trait, and replace with is_standard_layout requirementLee Clagett3-12/+15
2018-01-11epee: detect strptime, use std::get_time as fallbackmoneromooo-monero1-0/+6
2018-01-11Keep readline optionalJethro Grassie1-1/+1
2018-01-10move memwipe to epee to avoid common<->crypto circular dependenciesmoneromooo-monero3-1/+195
2018-01-10epee: remove dependency on commonmoneromooo-monero7-13/+12
2017-12-27epee: check some error return valuesmoneromooo-monero1-8/+18
2017-12-23wipeable_string: fix buffer overreadmoneromooo-monero1-1/+1
2017-12-23Fix Windows builddEBRUYNE-11-0/+4
Fix no new line
2017-12-23http_client: rewrite header parsing manually for speedmoneromooo-monero1-74/+95
boost::regex is stupendously atrocious at parsing malformed data
2017-12-23tests: add http client fuzz testmoneromooo-monero1-3/+14
2017-12-22factor STL container serializationmoneromooo-monero1-1/+0
2017-12-21epee: use strptime instead of std::get_time, for compatibilitymoneromooo-monero1-3/+3
2017-12-19wipeable_string: move a wipe from reserve to growmoneromooo-monero1-3/+2
That way, all implicit wipes ends up in grow, which is more robust
2017-12-19wipeable_string: ignore reserve size less than actual sizemoneromooo-monero1-2/+1
This was asserting, but stoffu pointed out the std::string standard considers this ok and ignorable
2017-12-19wipeable_string: fix clear and push_backmoneromooo-monero1-1/+4
2017-12-18network_throttle: fix ineffective lockingmoneromooo-monero1-3/+5
2017-12-18network_throttle: remove unused xxx static membermoneromooo-monero2-5/+0
2017-12-18abstract_tcp_server2: log init_server errors as fatalmoneromooo-monero1-1/+11
so they show up by default
2017-12-18net_parse_helpers: fix regex error checkingmoneromooo-monero1-2/+2
2017-12-18catch const exceptionsmoneromooo-monero1-1/+1
2017-12-18add empty container sanity checks when using front() and back()moneromooo-monero1-1/+1
2017-12-18epee: trap failure to parse URI from requestmoneromooo-monero1-1/+6
2017-12-18mlog: terminate a string at last char, just in casemoneromooo-monero1-0/+1
2017-12-16move connection_basic and network_throttle from src/p2p to epeemoneromooo-monero8-3/+1218
These even had the epee namespace. This fixes some ugly circular dependencies.
2017-12-16move includes around to lessen overall loadmoneromooo-monero22-75/+87
2017-12-16Scrub keys from memory just before scope end.moneromooo-monero1-1/+1
Partially implements #74. Securely erases keys from memory after they are no longer needed. Might have a performance impact, which I haven't measured (perf measurements aren't generally reliable on laptops). Thanks to @stoffu for the suggestion to specialize the pod_to_hex/hex_to_pod functions. Using overloads + SFINAE instead generalizes it so other types can be marked as scrubbed without adding more boilerplate.
2017-12-15levin_protocol_handler_async: another attempt at fixing at exceptionmoneromooo-monero1-3/+12
2017-12-15Revert "epee: keep a ref to a connection we're deleting"moneromooo-monero1-8/+2
This reverts commit f2939bdce8c86b0f96921f731184c361106390c8.
2017-12-15levin_protocol_handler_async: add missing response handler lockingmoneromooo-monero1-5/+9
2017-12-15epee: add a get_file_size functionmoneromooo-monero1-0/+20
2017-12-11levin_protocol_handler_async: call handler destroy function on dtormoneromooo-monero1-0/+1
2017-12-09net_utils_base: fix peer list parsingmoneromooo-monero1-3/+25
Fields are written with their "name" as key, and that name changed.
2017-12-07epee: add do while(0) around brace statement in a macromoneromooo-monero1-1/+1
Allows use in more complex expressions
2017-12-01epee: fix kv_unserialize return value when a field is not foundmoneromooo-monero1-2/+2
2017-11-28Corrections in rate limiting / trottle code, especially in 'out' directionrbrunner71-5/+4
Deleted 3 out of 4 calls to method connection_basic::sleep_before_packet that were erroneous / superfluous, which enabled the elimination of a "fudge" factor of 2.1 in connection_basic::set_rate_up_limit; also ended the multiplying of limit values and numbers of bytes transferred by 1024 before handing them over to the global throttle objects
2017-11-27new wipeable_string class to replace std::string passphrasesmoneromooo-monero5-4/+228
2017-11-26Added command descriptionsCifrado1-9/+15
2017-11-16RPC: CORS add Access-Control-Allow-Headers to OPTIONS preflightTim L1-0/+3
2017-11-14epee: don't disable -Wtautological-constant-out-of-range-compare on GCCmoneromooo-monero1-0/+2
It's a CLANG only option, and causes GCC to error out
2017-11-14split off readline code into epee_readlinemoneromooo-monero1-3/+14
2017-11-14remove "using namespace std" from headersmoneromooo-monero1-2/+0
It's nasty, and actually breaks on Solaris, where if.h fails to build due to: struct map *if_memmap;
2017-11-07RPC: get_info add rpc_connections_countTim L2-0/+11
2017-11-03Fix file permission issueTim L6-0/+0
This branch fixes a file permission issue introduced by https://github.com/monero-project/monero/commit/69c37200aa87f100f731e755bdca7a0dc6ae820a
2017-10-30RPC Add cross origin resource sharing supportTim L6-17/+60
2017-10-28epee: disable a spurious warning for a storage functionmoneromooo-monero1-0/+1
2017-10-20net_helper: fix massive slowdown after SSL supportmoneromooo-monero1-5/+5
2017-10-17cmake: epee: use var from FindOpenSSL.cmakeredfish1-2/+1
This fixes linking when path to openssl is defined manually: cmake -DOPENSSL_ROOT_DIR='/usr/include/openssl-1.0;/usr/lib/openssl-1.0' ... This is useful for building with OpenSSL v1.0 when default system installation is v1.1. The linking error is undefined SSL_load_error_strings symbol. This is due to -L /usr/lib/openssl-1.0 not making it onto the linkline (so -lssl pulls in the default system openssl).
2017-10-17epee: use boost type for SSL error coderedfish1-1/+9
Fixes compile error when building with OpenSSL v1.1: contrib/epee/include/net/net_helper.h: In member function ‘void epee::net_utils::blocked_mode_client::shutdown_ssl()’: contrib/epee/include/net/net_helper.h:579:106: error: ‘SSL_R_SHORT_READ’ was not declared in this scope if (ec.category() == boost::asio::error::get_ssl_category() && ec.value() != ERR_PACK(ERR_LIB_SSL, 0, SSL_R_SHORT_READ)) ^ contrib/epee/include/net/net_helper.h:579:106: note: suggested alternative: ‘SSL_F_SSL_READ’ See boost/asio/ssl/error.hpp. Boost handles differences between OpenSSL versions. cmake: fail if Boost is too old for OpenSSL v1.1
2017-10-15epee: link against ssl/crypto for the new SSL codemoneromooo-monero1-0/+2
2017-10-15add string_tools::validate_hex()Jaquee1-0/+6
2017-10-15Serializer: string to integer conversion for MyMonero compatibilityJaquee1-0/+27
mymonero timestamp conversion
2017-10-15epee http_client SSL supportJaquee3-46/+111
2017-10-09Fix an object lifetime bug in net load testsmoneromooo-monero5-6/+27
The commands handler must not be destroyed before the config object, or we'll be accessing freed memory. An earlier attempt at using boost::shared_ptr to control object lifetime turned out to be very invasive, though would be a better solution in theory.
2017-10-07frob level 1 logs a bit for consistencymoneromooo-monero3-6/+6
Level 1 logs map to INFO, so setting log level to 1 should show these. Demote some stuff to DEBUG to avoid spam, though.
2017-10-07Subaddresseskenshi841-5/+41
2017-10-05Upgrades to epee::net_utils::network_addressLee Clagett4-73/+189
- internal nullptr checks - prevent modifications to network_address (shallow copy issues) - automagically works with any type containing interface functions - removed fnv1a hashing - ipv4_network_address now flattened with no base class
2017-09-27copyable_atomic: add a ctor with initial valuemoneromooo-monero1-0/+2
2017-09-25serialization: add deque serializationmoneromooo-monero1-0/+36
2017-09-25http_base: init size_t in http_request_info ctormoneromooo-monero1-1/+2
CID 161879
2017-09-22Log categories can now be added to and removed frommoneromooo-monero2-2/+40
Also, set_log without parameters now prints the log categories
2017-09-22epee: factor log level/categories settingmoneromooo-monero1-2/+1
2017-09-19epee: keep a ref to a connection we're deletingmoneromooo-monero1-2/+8
close might end up dropping a ref, ending up removing the connection from m_connects, as the lock is recursive. This'd cause an out of bounds exception and kill the idle connection maker thread
2017-09-18epee: give virtual dtor to network_address_basemoneromooo-monero1-0/+3
It has virtual functions and is used as a base class
2017-09-17daemon, wallet: add --max-log-file-size optionselsta2-3/+4
2017-08-23print peer id in 0 padded hex for consistencymoneromooo-monero1-0/+12
2017-08-22http_client: add getters for host and portmoneromooo-monero1-0/+3
2017-08-22Simplify readline supportHoward Chu3-140/+85
And don't use std::mutex
2017-08-16abstract_tcp_server2: improve tracking/cancelling of early connectionsmoneromooo-monero2-22/+15
We don't actually need to keep them past the call to start, as this adds them to the config object list, and so they'll then be cancelled already when the stop signal arrives. This allows removing the periodic call to cleanup connections.
2017-08-16Construct on first use for completion_commandsJethro Grassie2-15/+23
2017-08-16Add sync lock on stopJethro Grassie1-5/+4
Also added and moved two free's hoping to fix leaks.
2017-08-15Tweak net logs so we get more info on why networking can't startmoneromooo-monero1-1/+1
This should prevent "silent" failures to start
2017-08-09epee: fixup KV_SERIALIZE_OPT to work in more casesmoneromooo-monero1-1/+4
2017-08-07cryptonote_protocol_handler: sync speedupmoneromooo-monero1-0/+14
A block queue is now placed between block download and block processing. Blocks are now requested only from one peer (unless starved). Includes a new sync_info coommand.
2017-08-05epee: remove a couple unused localsmoneromooo-monero1-2/+2
2017-08-02simplewallet: add (out of sync) or (no daemon) markers in the promptmoneromooo-monero1-11/+16
Should help people who don't realize why they haven't seen their monero yet.
2017-08-01p2p: move m_in_timedsync from connection_context to p2p_connection_contextmoneromooo-monero1-3/+0
It's got no place in the base class as it's P2P specific field
2017-08-01epee: add nanosecond timer and pause/restart profiling macrosmoneromooo-monero2-5/+17
Nanosecond timer precision won't work on Windows, but we don't care since I'm using that just for profiling incremental code paths, but a Windows coder is welcome to add it if there's a way.
2017-07-24epee: add a KV_SERIALIZE variant for optional parametersmoneromooo-monero1-0/+7
2017-07-24Fix readline prompt when command does not outputJethro Grassie1-13/+24
2017-07-24mlog: default to msgwriter logs only for log level 1moneromooo-monero1-1/+1
There might be privacy issues doing it by default
2017-07-24Make msgwriter logs go to file onlymoneromooo-monero1-0/+1
This was the case for monero-wallet-cli already, but not for monerod, which was making it pretty spammy as it was duplicating intended output. Since my original intent was to ensure logs included command output for debugging, this achieves both.
2017-07-22mlog: fix crash accessing stale data when rotating logsmoneromooo-monero1-1/+1
2017-07-15mlog: make MONERO_LOGS env var understand N,logs type specmoneromooo-monero1-1/+1
2017-07-09Add various readline related fixesJethro Grassie3-16/+74
- Add missing unbind key - Fix colored messages - Add command completion - Preserve last command input - Fix cursor position issues - Fix trailing whitespace in commands - Synchronize set_prompt
2017-07-07Add notification on stopJethro Grassie1-0/+1
2017-07-06mlog: add msgwriter:INFO to log 0 and 1 defaultsmoneromooo-monero1-2/+2
This ensures command output gets logged by default
2017-07-05epee: don't send the body of the response to a HEAD HTTP requestGuillaume LE VAILLANT1-1/+1
According to the HTTP spec: "The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response".
2017-07-05Fix spelling errorsErik de Castro Lopo6-9/+9
2017-07-02epee: Remove unused variableErik de Castro Lopo1-1/+0
2017-07-01Fix issue #2119 SEGVHoward Chu1-15/+20
Due to bad refactoring in PR #2073. timeout_handler() doesn't work as a virtual function.
2017-06-28monero-wallet-cli: hang on exit in readline code (#2117)moneromooo-monero1-3/+2
readline_buffer: move a local to local scope Also limit the select fd limit to what we use Signed-off-by: Jethro Grassie <jtg@xtrabass.com>
2017-06-28monero-wallet-cli: hang on exit in readline code (#2117)moneromooo-monero1-2/+10
readline_buffer: fix start/stop threads being starved by process process could run for quite some time re-acquiring the process lock, leaving start/stop starving. Yielding after unlock in process is much better but doesn't seem to be enough to reliably yield, so we sleep for a millisecond, which should be transparent for user input anyway. Signed-off-by: Jethro Grassie <jtg@xtrabass.com>
2017-06-28abstract_tcp_server2: guard against accessing lock on a destroyed objectmoneromooo-monero1-3/+3
2017-06-28Remove typeid use in network_addressmoneromooo-monero1-3/+2
Since I had to add an ID to the derived classes anyway, this can be used instead. This removes an apparently pointless warning from CLANG too.
2017-06-26Fix #2071: remove declaration of unused variable "it" in epeebinaryFate1-1/+0
2017-06-25Fix multiline wallet cli output with readlineJethro Grassie1-1/+5
monero-wallet-cli commands which have multine output sometimes causes issues with the readline support. This patch fixes show_transfers, payments and incoming_transfers.
2017-06-24Add readline improvementsJethro Grassie2-3/+10
Color prompt now working and no reprompting on exit command.
2017-06-23readline_buffer: fix busy waitmoneromooo-monero1-1/+1
It'd eat up a core constantly, due to spending its time jumping back and forth between userland and kernel. We now wait for up to a millisecond in kernel, which will be transparent to the user and drop to idle most of the time.
2017-06-21readline: fix invalid memory accessmoneromooo-monero1-1/+1
m_cout_buf was not initialized
2017-06-21readline_buffer: add a couple constmoneromooo-monero2-3/+3
2017-06-19net_utils_base: added missing template keywordkenshi841-1/+1
2017-06-18Add readline support to clijethro4-1/+283
This PR adds readline support to the daemon and monero-wallet-cli. Only GNU readline is supported (e.g. not libedit) and there are cmake checks to ensure this. There is a cmake variable, Readline_ROOT_DIR that can specify a directory to find readline, otherwise some default paths are searched. There is also a cmake option, USE_READLINE, that defaults to ON. If set to ON, if readline is not found, the build continues but without readline support. One negative side effect of using readline is that the color prompt in the wallet-cli now has no color and just uses terminal default. I know how to fix this but it's quite a big change so will tackle another time.
2017-06-15Don't issue a new timedsync while one is already in progressHoward Chu1-0/+3
A timedsync is issued every minute on a connection, but the input tineout is 2 minutes. This means a new sync request could be issued while a slow sync request was already in progress. The additional request will further clog the network on a slow connection, and cause a premature timeout.
2017-06-15Don't timeout a slow operation that's making progressHoward Chu1-9/+46
If we got at least MIN_BYTES_WANTED (default 512) during any network poll, reset the timeout to allow more time for data to arrive.
2017-06-15Fix PR#2039Howard Chu1-1/+1
Missed a crypto -> cncrypto rename
2017-06-04Fix PR#2039Howard Chu1-1/+1
Missed a crypto -> cncrypto rename
2017-05-31Fix PR#2039Howard Chu1-1/+1
Missed a crypto -> cncrypto rename
2017-05-27abstracted nework addressesmoneromooo-monero8-26/+122
All code which was using ip and port now uses a new IPv4 object, subclass of a new network_address class. This will allow easy addition of I2P addresses later (and also IPv6, etc). Both old style and new style peer lists are now sent in the P2P protocol, which is inefficient but allows peers using both codebases to talk to each other. This will be removed in the future. No other subclasses than IPv4 exist yet.
2017-05-17shared libs build (i.e. make debug)stoffu1-2/+0
2017-04-25Removed some unused epee functionsLee Clagett3-726/+2
2017-04-11Simplified the implementation and features of spanLee Clagett4-199/+142
2017-04-11Improvements for epee binary to hex functions:Lee Clagett6-49/+342
- Performance improvements - Added `span` for zero-copy pointer+length arguments - Added `std::ostream` overload for direct writing to output buffers - Removal of unused `string_tools::buff_to_hex`
2017-04-10setThreadName moved in new version of easylogging++moneromooo-monero1-1/+1
2017-04-10update easylogging++ to latest upstreammoneromooo-monero2-9/+1
2017-04-01mlog: direct log category changes to file onlymoneromooo-monero1-4/+9
Because some people just won't even try to read what is written and freak out because the word FATAL is in here, despite the context making it clear it's not an error.
2017-03-21Fix freebsd buildLee Clagett1-0/+1
2017-03-19Revert "Increase the log level for the info about log levels"moneromooo-monero1-2/+2
We want to know which log categories are active. This reverts commit 4f7bce6d20c72a1384289f7c35b7fe0ee796ed41.
2017-03-18Removed boost/asio.hpp include from epee/string_tools.hLee Clagett6-33/+77
2017-03-05http_client: allow cancelling a downloadmoneromooo-monero1-2/+10
2017-03-05http_client: allow derived class to get headers at startmoneromooo-monero1-0/+11
2017-02-26mlog: default net.cn to FATALmoneromooo-monero1-1/+1
Errors in this layer depend on how peers behave, and thus errors are expected
2017-02-25Increase the log level for the info about log levelsNano Akron1-2/+2
2017-02-24Updated default RPC timeout from 5 seconds to 15 secondsLee Clagett1-4/+4
2017-02-21http_server_impl_base: set bind message to MGINFOanonimal1-1/+1
2017-02-21update copyright year, fix occasional lack of newline at line endRiccardo Spagni4-4/+4
2017-02-21mlog: restrict net.p2p to FATAL by defaultmoneromooo-monero1-1/+1
2017-02-20mlog: only silence errors for net by default, not net.*moneromooo-monero1-1/+1
2017-02-20http_client: add a couple constsmoneromooo-monero1-2/+2
2017-02-12epee: fix some log macros not printing context nicelymoneromooo-monero1-5/+5
2017-02-12Fixup choice of easylogging++ vs libunwind stack trace codemoneromooo-monero1-2/+3
2017-02-12mlog: move log level changes to global levelmoneromooo-monero1-2/+2
Makes it more likely to show up
2017-02-12mlog: s/Mew/New/ in logmoneromooo-monero1-2/+2
2017-02-08extract some basic code from libcryptonote_core into libcryptonote_basickenshi841-1/+9
2017-02-06Add server auth to monerod, and client auth to wallet-cli and wallet-rpcLee Clagett7-46/+86