diff --git a/proto/protocol.xml b/proto/protocol.xml
index fdbc0df..9787b21 100644
--- a/proto/protocol.xml
+++ b/proto/protocol.xml
@@ -143,8 +143,8 @@
from the EIS implementation. A context type of sender is a libei context
sending events to the EIS implementation.
-
-
+
+
diff --git a/src/libeis-connection-setup.c b/src/libeis-connection-setup.c
index 0fedda5..54296cf 100644
--- a/src/libeis-connection-setup.c
+++ b/src/libeis-connection-setup.c
@@ -137,9 +137,11 @@ client_msg_context_type(struct eis_connection_setup *setup, uint32_t type)
{
switch(type) {
case EIS_CONNECTION_SETUP_CONTEXT_TYPE_SENDER:
+ setup->is_sender = true;
+ return NULL;
case EIS_CONNECTION_SETUP_CONTEXT_TYPE_RECEIVER:
- setup->is_sender = !!type;
- return 0;
+ setup->is_sender = false;
+ return NULL;
}
return brei_result_new(EIS_CONNECTION_DISCONNECT_REASON_VALUE, "Invalid context type %u", type);