mono.git
13 years agoMerge branch 'bugfix'
Marek Habersack [Mon, 4 Oct 2010 13:47:32 +0000 (15:47 +0200)]
Merge branch 'bugfix'

* bugfix:
  [asp.net] Part of fix for bug #579837. AuthorizationRule.SerializeElement will not process unmodified elements.
  [configuration] Part of fix for bug #579837. CommaDelimitedStringCollection must properly note that it was modified.

13 years ago[asp.net] Part of fix for bug #579837. AuthorizationRule.SerializeElement will not...
Marek Habersack [Mon, 4 Oct 2010 13:43:54 +0000 (15:43 +0200)]
[asp.net] Part of fix for bug #579837. AuthorizationRule.SerializeElement will not process unmodified elements.

* AuthorizationRule.cs: if the configuration save is not Full, SerializeElement checks whether the rule being
  serialized is modified. If it isn't, validation and serialization are not performed.
* AuthorizationRuleCollection.cs: there is no element name for the collection.

13 years ago[configuration] Part of fix for bug #579837. CommaDelimitedStringCollection must...
Marek Habersack [Mon, 4 Oct 2010 13:39:29 +0000 (15:39 +0200)]
[configuration] Part of fix for bug #579837. CommaDelimitedStringCollection must properly note that it was modified.

When one manipulates the collection as an instance of StringCollection, the 'modified' field will not
be set (Add, Remove etc. from the underlying StringCollection type will be used). To work around it
a check has to be performed in IsModified whether the contents of the collection changed. It is done
by comparing string hash codes of the original vs current string.
CommaDelimitedStringCollectionConverter forces string hash code update on the new collection, so that IsModified
works correctly on collections converted from comma-delimited strings.

13 years ago2010-10-01 Veerapuram Varadhan <v.varadhan@gmail.com>
vvaradhan [Mon, 4 Oct 2010 11:14:44 +0000 (16:44 +0530)]
2010-10-01  Veerapuram Varadhan  <v.varadhan@gmail.com>

** Fixes #582732 - Patch by Jeffrey Alvarez <kuritsu@gmail.com>
* DataColumn.cs (Clone): Deep copy the ExtendedProperties
collection.
* XmlSchemaDataImporter.cs: Support import of extended
properties.
* XmlSchemaWriter.cs: Fix exception by writing the extended
properties before simpletype element.

13 years agoMerge branch 'master' of github.com:mono/mono into masterwork
vvaradhan [Mon, 4 Oct 2010 10:02:49 +0000 (15:32 +0530)]
Merge branch 'master' of github.com:mono/mono into masterwork

13 years ago2010-10-01 Veerapuram Varadhan <vvaradhan@novell.com>
vvaradhan [Mon, 4 Oct 2010 09:57:52 +0000 (15:27 +0530)]
2010-10-01  Veerapuram Varadhan  <vvaradhan@novell.com>

** Fixes #561667
* SqlCommand.cs (Dispose): While Disposing, set connection's
datareader to null so the connection can be reused with another datareader.

13 years agoHandle Initialization correctly.
Atsushi Eno [Mon, 4 Oct 2010 09:30:11 +0000 (18:30 +0900)]
Handle Initialization correctly.

13 years agoSet have_response
Gonzalo Paniagua Javier [Mon, 4 Oct 2010 06:40:25 +0000 (02:40 -0400)]
Set have_response

Set have_response to true when there's a protocol error or a previous
exception for POST/PUT.
Patch by Bassam Tabbara.

13 years agoCheck no longer needed.
Gonzalo Paniagua Javier [Mon, 4 Oct 2010 05:04:56 +0000 (01:04 -0400)]
Check no longer needed.

The is_* function takes care of this check now.

13 years agoGet constructor arguments (x:Arguments) working on XamlXmlWriter and XamlObjectReader.
Atsushi Eno [Mon, 4 Oct 2010 06:28:34 +0000 (15:28 +0900)]
Get constructor arguments (x:Arguments) working on XamlXmlWriter and XamlObjectReader.

13 years agoFix line endings.
Gonzalo Paniagua Javier [Mon, 4 Oct 2010 04:54:47 +0000 (00:54 -0400)]
Fix line endings.

13 years agoExecute some specialized tests using the normal test infrastructure.
Zoltan Varga [Mon, 4 Oct 2010 00:32:06 +0000 (02:32 +0200)]
Execute some specialized tests using the normal test infrastructure.

13 years agoFix the handling of varargs in g_set_error ().
Zoltan Varga [Sun, 3 Oct 2010 23:59:16 +0000 (01:59 +0200)]
Fix the handling of varargs in g_set_error ().

13 years agoFixed conding style and added license/copyright header to new files
Pablo Ruiz Garcia [Sun, 3 Oct 2010 18:19:49 +0000 (02:19 +0800)]
Fixed conding style and added license/copyright header to new files

13 years ago[FIX] Fixes https://bugzilla.novell.com/show_bug.cgi?id=643368 (Transaction.Transacti...
Pablo Ruiz Garcia [Sun, 3 Oct 2010 17:41:55 +0000 (01:41 +0800)]
[FIX] Fixes https://bugzilla.novell.com/show_bug.cgi?id=643368 (Transaction.TransactionCompleted not firing

13 years ago[API] Implemented System.Transactions (tx preparation) timeout handling
Pablo Ruiz Garcia [Sun, 3 Oct 2010 16:57:19 +0000 (00:57 +0800)]
[API] Implemented System.Transactions (tx preparation) timeout handling

13 years agoCheck class names in a better way
Gonzalo Paniagua Javier [Sun, 3 Oct 2010 17:26:13 +0000 (13:26 -0400)]
Check class names in a better way

Verify image, nesting status, namespace and class for the types
used in threadpool.c

13 years agoRetval is not a reserved keyword, fixes 643345
Miguel de Icaza [Sun, 3 Oct 2010 16:30:10 +0000 (12:30 -0400)]
Retval is not a reserved keyword, fixes 643345

13 years agoremove extraneous reference to sys.configuration.
Atsushi Eno [Sun, 3 Oct 2010 15:55:11 +0000 (00:55 +0900)]
remove extraneous reference to sys.configuration.

13 years agoA couple of fixes around XamlSchemaContext.GetXamlType(XamlTypeName) and get XamlXmlR...
Atsushi Eno [Sun, 3 Oct 2010 15:44:53 +0000 (00:44 +0900)]
A couple of fixes around XamlSchemaContext.GetXamlType(XamlTypeName) and get XamlXmlReader pass with unknown type names.

13 years agoThe EndPoint cannot be null
Gonzalo Paniagua Javier [Sat, 2 Oct 2010 05:40:10 +0000 (01:40 -0400)]
The EndPoint cannot be null

The EndPoint argument in Begin/EndSendTo cannot be null.

13 years agoCreate only 1 callback instance for read/write
Gonzalo Paniagua Javier [Fri, 1 Oct 2010 03:03:08 +0000 (23:03 -0400)]
Create only 1 callback instance for read/write

Read/Write were creating one callback instance per call. Now we keep
the same delegate around for all the calls.

13 years agoHandle error in BeginAcceptReceive
Gonzalo Paniagua Javier [Fri, 1 Oct 2010 02:55:56 +0000 (22:55 -0400)]
Handle error in BeginAcceptReceive

We were ignore possible errors when reading after a socket has been
accepted.

13 years agoSchedule the user callback from unmanaged code
Gonzalo Paniagua Javier [Fri, 1 Oct 2010 02:53:50 +0000 (22:53 -0400)]
Schedule the user callback from unmanaged code

When possible, schedule the user callback from unmanaged code. We pass
it from the IO pool to the regular pool after our internal callback is
finished.

13 years agoCheck the debugger_thread_exited condition in a loop to guard against spurious wakeup...
Zoltan Varga [Fri, 1 Oct 2010 21:45:46 +0000 (23:45 +0200)]
Check the debugger_thread_exited condition in a loop to guard against spurious wakeups. Fixes #642780.

13 years agoref/out arguments are always of static type
Marek Safar [Fri, 1 Oct 2010 18:38:06 +0000 (19:38 +0100)]
ref/out arguments are always of static type

13 years agoKeep imported indexer parameters (they can contain non-inflated type parameters)
Marek Safar [Fri, 1 Oct 2010 17:28:32 +0000 (18:28 +0100)]
Keep imported indexer parameters (they can contain non-inflated type parameters)

13 years agoImplement compound assignment over null value
Marek Safar [Fri, 1 Oct 2010 16:48:33 +0000 (17:48 +0100)]
Implement compound assignment over null value

13 years agoWork around Android's pthread/kernel_id/fork bug to fix mono multithreading and GC_st...
Koushik Dutta [Thu, 30 Sep 2010 04:15:42 +0000 (21:15 -0700)]
Work around Android's pthread/kernel_id/fork bug to fix mono multithreading and GC_stop_world in processes that have been forked.

13 years agoFix a crash when using the embedding api
Geoff Norton [Fri, 1 Oct 2010 15:58:17 +0000 (11:58 -0400)]
Fix a crash when using the embedding api

error_msg is null when passed into this function from a few places, so
lets not do a null deref here.

13 years agoFix code buffer reallocation check for OP_SWITCH on arm.
Zoltan Varga [Fri, 1 Oct 2010 14:27:51 +0000 (16:27 +0200)]
Fix code buffer reallocation check for OP_SWITCH on arm.

13 years ago2010-09-29 Veerapuram Varadhan <vvaradhan@novell.com>
vvaradhan [Fri, 1 Oct 2010 13:47:48 +0000 (19:17 +0530)]
2010-09-29  Veerapuram Varadhan  <vvaradhan@novell.com>

** Fixes failed test for smallmoney
* Tds70.cs (WriteParameterInfo): Round money values to 4
decimals, for smallmoney too.

13 years agoNew test
Marek Safar [Fri, 1 Oct 2010 13:23:22 +0000 (14:23 +0100)]
New test

13 years agoDynamic compound assignment breaks standard C# result conversion rules
Marek Safar [Fri, 1 Oct 2010 13:20:39 +0000 (14:20 +0100)]
Dynamic compound assignment breaks standard C# result conversion rules

13 years agovoid is never of type object
Marek Safar [Thu, 30 Sep 2010 14:00:44 +0000 (15:00 +0100)]
void is never of type object

13 years agoNull constant cannot be used for ref/out variables
Marek Safar [Thu, 30 Sep 2010 12:01:12 +0000 (13:01 +0100)]
Null constant cannot be used for ref/out variables

13 years agoInitialize both disposable and local variable for dynamic expressions.
Marek Safar [Thu, 30 Sep 2010 12:00:00 +0000 (13:00 +0100)]
Initialize both disposable and local variable for dynamic expressions.

13 years agorename source file.
Atsushi Eno [Fri, 1 Oct 2010 06:33:11 +0000 (15:33 +0900)]
rename source file.

13 years agoRemove old code.
Atsushi Eno [Fri, 1 Oct 2010 06:30:07 +0000 (15:30 +0900)]
Remove old code.

13 years agoFix a deadlock introduced by 5c2e3bf7 by using a separate low level lock to procect...
Zoltan Varga [Fri, 1 Oct 2010 02:47:54 +0000 (04:47 +0200)]
Fix a deadlock introduced by 5c2e3bf7 by using a separate low level lock to procect access to the file_share_hash hash table. Fixes #642985.

13 years ago[wcf] serialization member namespace was wrong when root namesp ace is given. Fixed...
Atsushi Eno [Fri, 1 Oct 2010 02:32:19 +0000 (11:32 +0900)]
[wcf] serialization member namespace was wrong when root namesp ace is given. Fixed possible infinite loop during DefaultTypeMap initialization.

MS Basic/Contract/Data/POCO sample got working fine.

13 years agoRemove extra call to HttpResponse.Flush() which would crash.
Atsushi Eno [Fri, 1 Oct 2010 00:11:26 +0000 (09:11 +0900)]
Remove extra call to HttpResponse.Flush() which would crash.

13 years ago[asp.net] Handle closed responses gracefully.
Marek Habersack [Thu, 30 Sep 2010 21:45:59 +0000 (23:45 +0200)]
[asp.net] Handle closed responses gracefully.

If ReleaseResources or Flush (true) were called, a flag is set that causes
any subsequent Flush () calls to fail with an exception.
At the same time, ReleaseResources does not destroy the output stream completely -
it has to remain around to match .NET behavior.

13 years agoRevert "[asp.net] Make sure output_stream is not null before using it"
Marek Habersack [Thu, 30 Sep 2010 21:19:22 +0000 (23:19 +0200)]
Revert "[asp.net] Make sure output_stream is not null before using it"

This reverts commit a4ed8be6973dcfede7131f080340220b3ce4830b since what we
do in ReleaseResources is not what .NET does - a better fix will follow.

13 years ago[Json] Fix uint type conversion when reading, should be mapped to long, not int
Andreia Gaita [Thu, 30 Sep 2010 19:29:06 +0000 (20:29 +0100)]
[Json] Fix uint type conversion when reading, should be mapped to long, not int

13 years agoAvoid a few warnings
Gonzalo Paniagua Javier [Thu, 30 Sep 2010 19:30:49 +0000 (15:30 -0400)]
Avoid a few warnings

13 years agoAdd DataContractResolver stuff (dummy), and fix Id reference from inside the referenc...
Atsushi Eno [Thu, 30 Sep 2010 11:56:00 +0000 (20:56 +0900)]
Add DataContractResolver stuff (dummy), and fix Id reference from inside the referenced object.

13 years agoMore awkward nullable binary expressions which are not lifted even though they should be
Marek Safar [Thu, 30 Sep 2010 09:17:54 +0000 (10:17 +0100)]
More awkward nullable binary expressions which are not lifted even though they should be

13 years agoImplement binary user operators over nullable not lifted expressions.
Marek Safar [Wed, 29 Sep 2010 12:18:57 +0000 (13:18 +0100)]
Implement binary user operators over nullable not lifted expressions.

13 years agoDynamic compound assignment can be used as an expression as well.
Marek Safar [Wed, 29 Sep 2010 11:12:35 +0000 (12:12 +0100)]
Dynamic compound assignment can be used as an expression as well.

13 years agoInvoke the callback in separate threads
Gonzalo Paniagua Javier [Thu, 30 Sep 2010 05:41:22 +0000 (01:41 -0400)]
Invoke the callback in separate threads

The callbacks need to be invoked in different threads to avoid clogging
the IO pool.

Fixes bug #639656.

13 years agoDisable the freeing of monitors again, it still crashes with sgen when running tests...
Zoltan Varga [Thu, 30 Sep 2010 02:44:31 +0000 (04:44 +0200)]
Disable the freeing of monitors again, it still crashes with sgen when running tests/async_read.exe.

13 years agoFix AOT support for delegates
Rodrigo Kumpera [Thu, 30 Sep 2010 00:13:51 +0000 (21:13 -0300)]
Fix AOT support for delegates

13 years agoFix buffer checks on Socket.[Receive|Send]Async
Sebastien Pouliot [Wed, 29 Sep 2010 18:29:40 +0000 (14:29 -0400)]
Fix buffer checks on Socket.[Receive|Send]Async

* System.Net.Sockets/Socket_2_1.cs: Fix, by explicitely throwing an NRE,
the checks in [Receive|Send]Async methods - otherwise an exception would
occur later, on another thread and close the socket (leading to other,
unexpected, exceptions)

* Test/System.Net.Sockets/SocketTest.cs: Add parameter validation test
cases for both ReceiveAsync and SendAsync

13 years ago[moon] Move policy restriction / elevated trust check outside of loop
Sebastien Pouliot [Wed, 29 Sep 2010 18:27:36 +0000 (14:27 -0400)]
[moon] Move policy restriction / elevated trust check outside of loop

* System.Net.Sockets/SocketAsyncEventArgs.cs: Move policy restriction
and elevated trust check outside of loop since its value won't change
based on the ipaddress

13 years agoFix "4762b18c: Fix the moonlight build"
Sebastien Pouliot [Tue, 28 Sep 2010 14:09:57 +0000 (10:09 -0400)]
Fix "4762b18c: Fix the moonlight build"

* System.Net.Sockets/Socket_2_1.cs: Do not #id-def out [Receive|Send]
Generic from moonlight build

13 years agoFix arm and ppc builds
Rodrigo Kumpera [Wed, 29 Sep 2010 15:33:52 +0000 (12:33 -0300)]
Fix arm and ppc builds

13 years agoHandle error creating xdb.il
Gonzalo Paniagua Javier [Wed, 29 Sep 2010 16:24:48 +0000 (12:24 -0400)]
Handle error creating xdb.il

If creating the xdb.il file fails, disable the mono support for
debugging in gdb. Managed symbol names won't be displayed in stack
traces.

Fixes bug #642625.

13 years agoRemove "NotWorking" from a test that now works.
Rodrigo Kumpera [Wed, 29 Sep 2010 15:22:07 +0000 (12:22 -0300)]
Remove "NotWorking" from a test that now works.

13 years agondle static methods with bound first arg.
Rodrigo Kumpera [Wed, 29 Sep 2010 15:20:31 +0000 (12:20 -0300)]
ndle static methods with bound first arg.

* marshal.c (mono_marshal_get_delegate_invoke): Properly
handle a static method that has it's first argument bound.

* marshal.c (mono_marshal_free_inflated_wrappers): Free
from the new hashtable too.

* image.c (mono_image_close_except_pools): Free the new
hash table.

* metadata-internals.h (MonoImage): Add new hashtable
to store the new kind of invoke wrappers.

13 years agoAdd missing members.
Atsushi Eno [Wed, 29 Sep 2010 14:34:49 +0000 (23:34 +0900)]
Add missing members.

13 years ago[ReaderWriterLockSlim] Fix state corruption and race in a special interleaving.
Jérémie Laval [Wed, 29 Sep 2010 13:48:43 +0000 (14:48 +0100)]
[ReaderWriterLockSlim] Fix state corruption and race in a special interleaving.

Fix possible state corruption in the case where Upgradeable wasn't reactivating its read bit after a downgrade and set events accordingly. Fix possible race where a write process wannabe could step in the middle of Upgradeable actually upgrading to write mode.

13 years agoAdd some missing StructLayoutAttributes.
Atsushi Eno [Wed, 29 Sep 2010 13:00:38 +0000 (22:00 +0900)]
Add some missing StructLayoutAttributes.

13 years ago[wcf-discovery] ExclusiveAddressUse won't work. AcceptChannel() should nreturn null...
Atsushi Eno [Wed, 29 Sep 2010 12:58:56 +0000 (21:58 +0900)]
[wcf-discovery] ExclusiveAddressUse won't work. AcceptChannel() should nreturn null when it is being closed.

13 years ago[wcf-discovery] Fix MessageEncoder retrieval, failure on EndReceive and ExclusiveAddr...
Atsushi Eno [Wed, 29 Sep 2010 11:47:10 +0000 (20:47 +0900)]
[wcf-discovery] Fix MessageEncoder retrieval, failure on EndReceive and ExclusiveAddressUse.

13 years ago[wcf discovery] Use appropriate MessageVersion defined in DiscoveryVersion.
Atsushi Eno [Wed, 29 Sep 2010 11:45:47 +0000 (20:45 +0900)]
[wcf discovery] Use appropriate MessageVersion defined in DiscoveryVersion.

13 years ago[wcf] Make sure context exists in the dictionary getting its associated wait handle.
Marek Habersack [Wed, 29 Sep 2010 10:44:27 +0000 (12:44 +0200)]
[wcf] Make sure context exists in the dictionary getting its associated wait handle.

SvcHttpHandler maintains a mapping of HttpContext to ManualResetEvent. Entries are
removed from the cache in EndHttpRequest. The code makes sure the context exists in
the cache before attempting to access it.

13 years agoMerge branch 'bugfix'
Marek Habersack [Wed, 29 Sep 2010 10:01:33 +0000 (12:01 +0200)]
Merge branch 'bugfix'

* bugfix:
  [asp.net] Make sure output_stream is not null before using it

13 years ago[asp.net] Make sure output_stream is not null before using it
Marek Habersack [Wed, 29 Sep 2010 09:59:37 +0000 (11:59 +0200)]
[asp.net] Make sure output_stream is not null before using it

It is possible that some code will still attempt to access the HttpResponse instance
after ReleaseResources got called. This patch prevents NREX in such cases.

13 years ago[System.ServiceModel] Fix a few potential exceptions in background threads
Alan McGovern [Wed, 29 Sep 2010 09:37:56 +0000 (10:37 +0100)]
[System.ServiceModel] Fix a few potential exceptions in background threads

Pass the listener as it's own async state so that we avoid potential null derefs in the callback. Also wrap the BeginAccept and EndAccept calls in their own try/catches in case they throw an exception.

13 years ago2010-09-20 Veerapuram Varadhan <vvaradhan@novell.com>
vvaradhan [Wed, 29 Sep 2010 09:09:01 +0000 (14:39 +0530)]
2010-09-20  Veerapuram Varadhan  <vvaradhan@novell.com>

* SqlDataReaderTest.cs: Add test for bug#613087

13 years agotest fixes
vvaradhan [Wed, 29 Sep 2010 09:07:37 +0000 (14:37 +0530)]
test fixes

13 years agoNew test.
Marek Safar [Wed, 29 Sep 2010 08:12:14 +0000 (09:12 +0100)]
New test.

13 years ago[642437] Nested types have to check type arguments only and not full class
Marek Safar [Wed, 29 Sep 2010 08:11:04 +0000 (09:11 +0100)]
[642437] Nested types have to check type arguments only and not full class

13 years agoNew test.
Marek Safar [Wed, 29 Sep 2010 07:40:40 +0000 (08:40 +0100)]
New test.

13 years agoSkip inaccessible nested types for member access expressions.
Marek Safar [Wed, 29 Sep 2010 07:39:02 +0000 (08:39 +0100)]
Skip inaccessible nested types for member access expressions.

13 years agoInflate custom site container delegates correctly.
Marek Safar [Wed, 29 Sep 2010 07:37:44 +0000 (08:37 +0100)]
Inflate custom site container delegates correctly.

13 years agoOptional parameters can be of a user value type
Marek Safar [Tue, 28 Sep 2010 16:00:35 +0000 (17:00 +0100)]
Optional parameters can be of a user value type

13 years agoIgnore imported not visible internal types
Marek Safar [Tue, 28 Sep 2010 14:39:52 +0000 (15:39 +0100)]
Ignore imported not visible internal types

13 years agoFix the issue that callback contract often gets confused by picking unexpected contra...
Atsushi Eno [Wed, 29 Sep 2010 07:41:59 +0000 (16:41 +0900)]
Fix the issue that callback contract often gets confused by picking unexpected contract type.

The problem is that DispatchRuntime.Type is a service implementation type
that could implement two or more contract interfaces, and it was in random
order how ServiceProxyGenerator picks up the contract type. Now it looks
for correct contract type instead of the service type by exactly looking
for the target contract in the endpoint (dispatcher).

13 years agoAllow mono_install_assembly_preload_hook() to provide mscorlib.dll
Jonathan Pryor [Wed, 29 Sep 2010 02:26:03 +0000 (22:26 -0400)]
Allow mono_install_assembly_preload_hook() to provide mscorlib.dll

In some embedding scenarios, mscorlib.dll may be present in a non-standard
location (outside of MONO_PATH) or with an alternate filename.

Use the installed assembly preload hooks to search for mscorlib.dll before
falling back to the default lookup strategy.

13 years agoFix 'thread may have been prematurely finalized' warnings when a GC happens during...
Zoltan Varga [Wed, 29 Sep 2010 02:29:16 +0000 (04:29 +0200)]
Fix 'thread may have been prematurely finalized' warnings when a GC happens during thread attach in sgen.

13 years agoRemap more eglib symbols
Rolf Bjarne Kvinge [Sat, 25 Sep 2010 00:00:37 +0000 (02:00 +0200)]
Remap more eglib symbols

13 years ago[asp.net] Remove lock recursion in Cache.ExpireItems
Marek Habersack [Tue, 28 Sep 2010 20:34:34 +0000 (22:34 +0200)]
[asp.net] Remove lock recursion in Cache.ExpireItems

13 years agoTCP channel listener: remove extra complication (threads) in the previous change.
Atsushi Eno [Tue, 28 Sep 2010 16:02:09 +0000 (01:02 +0900)]
TCP channel listener: remove extra complication (threads) in the previous change.

13 years ago2010-09-16 Veerapuram Varadhan <vvaradhan@novell.com>
vvaradhan [Tue, 28 Sep 2010 15:06:55 +0000 (20:36 +0530)]
2010-09-16  Veerapuram Varadhan  <vvaradhan@novell.com>

* SqlCommandTest.cs: Add test for bug#569543

13 years ago2010-09-16 Veerapuram Varadhan <vvaradhan@novell.com>
vvaradhan [Tue, 28 Sep 2010 14:58:44 +0000 (20:28 +0530)]
2010-09-16  Veerapuram Varadhan  <vvaradhan@novell.com>

* SqlCommandTest.cs: Add test for bug#584833

13 years agoRework TCP listening model, and fix AcceptTcpClient() to not drop timed out requests...
Atsushi Eno [Tue, 28 Sep 2010 14:05:26 +0000 (23:05 +0900)]
Rework TCP listening model, and fix AcceptTcpClient() to not drop timed out requests that actually steals next requests in the air.

13 years agoWebResponse.Headers is not always available (e.g. moonlight browser stack)
Sebastien Pouliot [Tue, 28 Sep 2010 12:36:21 +0000 (08:36 -0400)]
WebResponse.Headers is not always available (e.g. moonlight browser stack)

* System.ServiceModel.Channels/HttpRequestChannel.cs: For Moonlight use
the WebResponse.SupportsHeaders before accessing the Headers collection.
This is needed because (the default) browser stack does not expose the
headers from its responses. Fix bug #642193

13 years agoTurn Is*LockHeld properties into thread-specific values in ReaderWriterLockSlim....
Jérémie Laval [Tue, 28 Sep 2010 11:13:10 +0000 (12:13 +0100)]
Turn Is*LockHeld properties into thread-specific values in ReaderWriterLockSlim. Add corresponding unit tests.

13 years ago[asp.net] Get rid of a possible (although unlikely) race condition when acquiring...
Marek Habersack [Tue, 28 Sep 2010 11:29:21 +0000 (13:29 +0200)]
[asp.net] Get rid of a possible (although unlikely) race condition when acquiring locks

The patch removes a small race condition where a boolean flag is set after acquiring a lock to
indicate to code executing in the finally {} block that it should release the lock. The boolean
variable is now removed and the lock is released unconditionally. It carries a potential to
throw an exception when the lock is not held, but it's better than to fail to release it and
lead the application to a deadlock.

13 years agoAvoid a culture-specific check for the end of an URI
Sebastien Pouliot [Tue, 28 Sep 2010 01:55:59 +0000 (21:55 -0400)]
Avoid a culture-specific check for the end of an URI

* System/Uri.cs: Avoid the culture-specific String.EndsWith when
reducing an URI

13 years agoUse same socket family as the endpoint when retrieving the policy
Sebastien Pouliot [Tue, 28 Sep 2010 00:20:24 +0000 (20:20 -0400)]
Use same socket family as the endpoint when retrieving the policy

* System.Net.Policy/CrossDomainPolicyManager.cs: Use same socket family
as the endpoint when retrieving the policy. Also do not try to create a
policy out of an empty stream (avoid misleading exceptions in logs)

13 years agoFix Socket.RemoteEndPoint after ConnectAsync on Moonlight
Sebastien Pouliot [Fri, 24 Sep 2010 18:58:35 +0000 (14:58 -0400)]
Fix Socket.RemoteEndPoint after ConnectAsync on Moonlight

* System.Net.Sockets/SocketAsyncEventArgs.cs: Set the Socket
RemoteEndPoint to our RemoteEndPoint on Connect operation.
* System.Net.Sockets/Socket_2_1.cs: Return the 'candidate' EndPoint
provided by SocketAsyncEventArgs in ConnectAsync (intead of null)
until the connection is completed.

13 years ago[wcf] Make simplified configuration for behaviors work (4.0)
Marek Habersack [Mon, 27 Sep 2010 22:12:45 +0000 (00:12 +0200)]
[wcf] Make simplified configuration for behaviors work (4.0)

* NamedServiceModelExtensionCollectionElement.cs: minimum length of the Name property value is 0 for 4.0
* ServiceBehaviorElementCollection.cs: added an override of BaseAdd which makes sure that the element being
  added has its Name set to String.Empty if the element's name is null
* ServiceHostBase.cs: support for simplified behavior configuration. Refactored behavior addition code to a
  separate method. Check whether behavior is not in the collection before adding it.

13 years agoAdd runtime test for delegates with null target.
Rodrigo Kumpera [Mon, 27 Sep 2010 20:12:37 +0000 (17:12 -0300)]
Add runtime test for delegates with null target.

13 years agoAdd comment on the reason of a non obvious check.
Rodrigo Kumpera [Mon, 27 Sep 2010 20:10:19 +0000 (17:10 -0300)]
Add comment on the reason of a non obvious check.

13 years agoEnable test that has been fixed in the runtime.
Rodrigo Kumpera [Mon, 27 Sep 2010 20:08:31 +0000 (17:08 -0300)]
Enable test that has been fixed in the runtime.

13 years agoRaise ArgumentException for delegate on closed methods.
Rodrigo Kumpera [Mon, 27 Sep 2010 19:50:06 +0000 (16:50 -0300)]
Raise ArgumentException for delegate on closed methods.

* method-to-ir.c (mono_method_to_ir): Check for null
on delegate construction so closed-on-null is not allowed
when using the delegate .ctor.

If the delegate been constructed is open-on-target then
the null check must not be applied as the IL pattern is:

ldnull
ldftn void Bla::Foo(int)
newobj Bar (object, native int) // delegate void Bar(Bla,int)

13 years agoMov the jit map generation code from tramp-x86.c to mini-trampolines.c, add amd64...
Zoltan Varga [Mon, 27 Sep 2010 19:55:02 +0000 (21:55 +0200)]
Mov the jit map generation code from tramp-x86.c to mini-trampolines.c, add amd64 support.