aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2015-02-20Don't orphan slave nodes in example suiteAnders Svensson
Stops were aborted at the first failure.
2015-02-20Refresh example codeAnders Svensson
Which hasn't received any attention for some time. Clean it up, rename the poorly named peer.erl (it's Diameter *nodes* that are implemented), and make the it possible to specify arbitrary transport configuration.
2015-02-20Improve language consistency in diameter(1)Anders Svensson
In particular, do away with unnecessary articles in the first sentence of item lists.
2015-02-20Add pool suite to test transport_opt() pool_sizeAnders Svensson
With testcases that uses restrict_connections and pool_size config to establish multiple connections between two Diameter nodes, checking for the expected number of transport processes using diameter:service_info/2.
2015-02-20Adapt tcp/sctp transport modules for pool_size > 1Anders Svensson
In particular, that starts for the same transport reference can now be concurrent. Looking up a listener process and starting a new one if not found did handle this (more than one process could find no listener), and diameter_sctp assumed there could only be one transport process waiting for an association.
2015-02-20Add transport_opt() pool_sizeAnders Svensson
Transport processes are started by diameter one at a time. In the listening case, a transport process accepts a connection, tells the peer_fsm process, which tells its watchdog process, which tells its service process, which then starts a new watchdog, which starts a new peer_fsm, which starts a new transport process, which (finally) goes about accepting another connection. In other words, not particularly aggressive in accepting new connections. This behaviour doesn't do particularly well with a large number of concurrent connections: with TCP and 250 connecting peers we see connections being refused. This commit adds the possibilty of configuring a pool of accepting processes, by way of a new transport option, pool_size. Instead of diameter:add_transport/2 starting just a single process, it now starts the configured number, so that instead of a single process waiting for a connection there's now a pool. The option is even available for connecting processes, which provides an alternate to adding multiple transports when multiple connections to the same peer are required. In practice this also means configuring {restrict_connections, false}: this is not implicit. For backwards compatibility, the form of diameter:service_info(_,transport) differs in the connecting case, depending on whether or not pool_size is configured. Note that transport processes for the same transport_ref() can be started concurrently when pool_size > 1. This places additional requirements on diameter_{tcp,sctp}, that will be dealt with in a subsequent commit.
2015-02-19Fix typos ("received to the socket")Daniel Kempkens
2015-02-19Merge branch 'erland/diameter/time/OTP-12439' into maintErland Schönbeck
* erland/diameter/time/OTP-12439: otp_SUITE: Ignore diameter undefined function errors
2015-02-19Merge branch 'ia/ssl/delete-vs-remove' into maintIngela Anderton Andin
* ia/ssl/delete-vs-remove: ssl: remove -> delete
2015-02-19Implement kernel inet_dist_{listen,connect}_optionsRaimo Niskanen
2015-02-18Add missing -group flag in ct_run help textPeter Andersson
2015-02-18otp_SUITE: Ignore diameter undefined function errorsErland Schönbeck
2015-02-18Merge branch 'richcarl/shell-module-md5-info' into maintZandra Hird
* richcarl/shell-module-md5-info: make c:m/1 show module MD5 OTP-12500
2015-02-18Merge branch 'siri/cuddle-with-tests' into maintSiri Hansen
* siri/cuddle-with-tests: [sasl] Make test unreliable of kernel.appup
2015-02-18Merge branch 'stevendanna/eldap-anon-auth-fix' into maintZandra Hird
* stevendanna/eldap-anon-auth-fix: Correctly process anon_auth option for eldap:open()
2015-02-18ssl: remove -> deleteIngela Anderton Andin
Correct mistake
2015-02-18Merge branch 'studzien/ct_cover_paths' into maintZandra Hird
* studzien/ct_cover_paths: Add tests for absolute incl_dirs path and for excl_dirs [ct_cover] Fix paths of incl_dirs in cover spec OTP-12498
2015-02-18Remove infinite loop in inet:gethostbyname_tm/4Raimo Niskanen
An erroneous lookup option is needed to trigger the bug, and that can only enter the system from a parsed file e.g .inetrc. Pinpointed by Emil Holmström
2015-02-17Modify some tests to verify that new functionality worksPeter Andersson
2015-02-17make c:m/1 show module MD5Richard Carlsson
2015-02-17Merge branch 'ia/ssl/os-timestamp' into maintIngela Anderton Andin
* ia/ssl/os-timestamp: ssl: erlang:timestamp -> os:timestamp Complements commit 450773958165539951cd431a9233ce7666ec20e2
2015-02-17ssl: erlang:timestamp -> os:timestampIngela Anderton Andin
Complements commit 450773958165539951cd431a9233ce7666ec20e2
2015-02-17Don't discard component diameter_avp list on Grouped AVP decode errorAnders Svensson
The AVPs of an incoming Diameter message diameter_codec:decode/2,3 are decoded into a diameter_packet record in two ways: as a message-specific record in the 'msg' field and as a deep list of diameter_avp records in the 'avps' field. The record decode came first; the diameter_avp decode came later to support the Diameter relay application, but can also be convenient for non-relay applications. The diameter_avp representation can be used with outgoing messages, but what exactly is supported for isn't clearly documented. In the diameter_avp list representation, it's AVPs of type Grouped that lead to nesting: instead of a diameter_avp record, a Grouped AVP is represented by a diameter_avp list whose head is the Grouped AVP itself, and whose tail is the list of component AVPs. The diameter_avp decode was broken in the case of decode errors: the Grouped AVP was represented as a bare diameter_avp, and the component records were lost. The decode now produces the intended list. Note that component AVPs that could not be decoded will have 'undefined' in their data field.
2015-02-17Fix process dictionary manipulation during message decodeAnders Svensson
Decode can span multiple codec modules, so written entries cannot be tagged on ?MODULE.
2015-02-16Make it possible to print in the test case log from on_tc_* hook funcsPeter Andersson
OTP-12468
2015-02-16Add helper function to reduce code duplicationAndy Ledvina
I was going through application_controller.erl looking for why something was behaving a certain way, saw a comment about removing this duplicated code one day, and decided to move that a step forward.
2015-02-13Merge branch 'emauton/mnesia_create_table_docfix' into maintZandra Hird
* emauton/mnesia_create_table_docfix: Fix index for #person.address in create_table/2
2015-02-13Merge branch 'crownedgrouse/fix_mnesia_subscribe_doc' into maintZandra Hird
* crownedgrouse/fix_mnesia_subscribe_doc: Fix xml doc return value mnesia:(un)subscribe
2015-02-13Merge branch 'yannayl/patch-1' into maintZandra Hird
* yannayl/patch-1: Fixed fun_test examples
2015-02-12Merge remote branch 'origin/hb/dialyzer/fix_map_type/OTP-12472' into maintHans Bolinder
* origin/hb/dialyzer/fix_map_type/OTP-12472: [dialyzer] Fix a bug concerning map() types
2015-02-11Add tests for absolute incl_dirs path and for excl_dirsRafal Studnicki
2015-02-11Fixed fun_test examplesyannayl
Removed false example from fun_test.erl Removed unused code from fun_test.erl
2015-02-11Merge branch 'derek121/getting-started-typos' into maintZandra Hird
* derek121/getting-started-typos: Fix typos OTP-12478
2015-02-10Merge branch ↵Dan Gudmundsson
'dumbbell/mnesia-hang-if-remote-stopped-after-proto-negotiation' into maint * dumbbell/mnesia-hang-if-remote-stopped-after-proto-negotiation: mnesia: Check nodes after protocol negotiation OTP-12473
2015-02-10mnesia: Check nodes after protocol negotiationJean-Sébastien Pédron
During Mnesia startup, after protocol negotiation, the list of connected nodes is written to "recover_nodes". This list is later used to merge the schema. If Mnesia was stopped on a remote node between the protocol negotiation and the moment the list is stored in "recover_nodes", the remote node is still considered running: the value of "recover_nodes" stored during mnesia_down/1 is overwritten. Therefore, this node may be used to acquire a write lock on the schema in order to perform the merge. In this case, the remote node never answers to the lock request and Mnesia hang forever (application:start(mnesia) never returns). To fix the problem, we check the list one last time and remove from it all nodes where Mnesia is stopped. And because there is still a chance for missing mnesia_down event, handle_cast({mnesia_down, ...}, ...) writes to recover_nodes again, in addition to mnesia_down/1.
2015-02-10[dialyzer] Fix a bug concerning map() typesHans Bolinder
It is allowed in Erlang/OTP 17 to redefine the map() types. However, Dialyzer did not handle local map() types correctly.
2015-02-10Fix failing test casePeter Andersson
2015-02-09Fix typosDerek Brown
Fixed a number of typos.
2015-02-09Merge branch 'ia/ssl/timestamp' into maintIngela Anderton Andin
* ia/ssl/timestamp: ssl: erlang:timestamp -> os:timestamp
2015-02-09ssl: erlang:timestamp -> os:timestampIngela Anderton Andin
For comparison with file time stamps os:timestamp makes more sense and is present in 17 as well as 18.
2015-02-07Correctly process anon_auth option for eldap:open()Steven Danna
Previously, it was impossible to set anon_auth to true. Making it difficult to anonymously bind: 1> {ok, Conn} = eldap:open(["localhost"], [{anon_auth, true}]). {ok,<0.34.0>} 2> eldap:simple_bind(Conn, "", ""). {error,anonymous_auth} With this change: 1> {ok, Conn} = eldap:open(["localhost"], [{anon_auth, true}]). {ok,<0.34.0>} 2> eldap:simple_bind(Conn, "", ""). ok NB: Users could previously work around this by calling simple_bind as follows: eldap:simple_bind(Conn, anon, anon)
2015-02-06test_server: Let ts_make have a latin1 fallbackBjörn-Egil Dahlberg
Simple fallback if io:put_chars/1 fails. A badarg is likely due to latin1 code points in buffer when utf-8 was expected.
2015-02-06Merge branch 'ia/ssl/pem-cache/OTP-12464' into maintIngela Anderton Andin
* ia/ssl/pem-cache/OTP-12464: ssl: Improve PEM cache by validating entries
2015-02-06Make sure total_timeout can get triggered before idle_timeoutPeter Andersson
OTP-12335
2015-02-06ssl: Improve PEM cache by validating entriesIngela Anderton Andin
The PEM cache is now validated by a background process, instead of always keeping it if it is small enough and clearing it otherwhiss. That strategy required that small caches where cleared by API function if a file changes on disk. However document the clearing API function as it can still be usefull.
2015-02-05Merge branch 'hans/ssh/error_timeout/OTP-12369' into maintHans Nilsson
* hans/ssh/error_timeout/OTP-12369: Fix ssh:connect erroneus error msg at timeout
2015-02-05Fix ssh:connect erroneus error msg at timeoutHans Nilsson
2015-02-05Merge branch 'scrapinghub/httpc_set_cookie_with_empty_values' into maintZandra Hird
* scrapinghub/httpc_set_cookie_with_empty_values: inets: parse correctly 'Set-Cookie' header with empty value OTP-12455
2015-02-05Update primary bootstrapBjörn Gustavsson
2015-02-05Merge branch 'bjorn/compiler/maps-comparison/OTP-12456' into maintBjörn Gustavsson
* bjorn/compiler/maps-comparison/OTP-12456: Correct unsafe optimization of '==' and '/='