X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=avahi-sharp%2FClient.cs;h=6d39469072947cb6fd0f7ad694be45df239d013d;hb=9541ceb22b5ecd525e16a318b95329a38240a7a4;hp=8ec6616d4403b956201f9d91c38884631540e5e2;hpb=d8fcf547a8c853ad6b2f92d2671a0389aa65b556;p=catta diff --git a/avahi-sharp/Client.cs b/avahi-sharp/Client.cs index 8ec6616..6d39469 100644 --- a/avahi-sharp/Client.cs +++ b/avahi-sharp/Client.cs @@ -52,15 +52,22 @@ namespace Avahi public class ClientStateArgs : EventArgs { private ClientState state; + private ErrorCode error; public ClientState State { get { return state; } } - public ClientStateArgs (ClientState state) + public ErrorCode Error + { + get { return error; } + } + + public ClientStateArgs (ClientState state, ErrorCode error) { this.state = state; + this.error = error; } } @@ -349,7 +356,7 @@ namespace Avahi private void OnClientCallback (IntPtr client, ClientState state, IntPtr userData) { if (StateChanged != null) - StateChanged (this, new ClientStateArgs (state)); + StateChanged (this, new ClientStateArgs (state, LastError)); } private int OnPollCallback (IntPtr ufds, uint nfds, int timeout) {