+2007-01-19 Miguel de Icaza <miguel@novell.com>
+
+ * socket-io.c (convert_sockopt_level_and_name): return -2 as a
+ value that means that the value is not supported, but that we
+ should not return a failure, but instead report this as a
+ successful operation.
+
2007-01-19 Raja R Harinath <rharinath@novell.com>
Fix tests/bug79956.2.il
return (flags ? flags : -1);
}
+/*
+ * Returns:
+ * 0 on success (mapped mono_level and mono_name to system_level and system_name
+ * -1 on error
+ * -2 on non-fatal error (ie, must ignore)
+ */
static gint32 convert_sockopt_level_and_name(MonoSocketOptionLevel mono_level,
MonoSocketOptionName mono_name,
int *system_level,
/* Not quite the same */
*system_name = IP_MTU_DISCOVER;
break;
+#else
+ return (-2);
#endif /* HAVE_IP_DONTFRAGMENT */
case SocketOptionName_AddSourceMembership:
case SocketOptionName_DropSourceMembership:
*error = WSAENOPROTOOPT;
return;
}
+ if (ret == -2)
+ return;
/* No need to deal with MulticastOption names here, because
* you cant getsockopt AddMembership or DropMembership (the
*error = WSAENOPROTOOPT;
return;
}
+ if(ret==-2)
+ return;
valsize=mono_array_length(*byte_val);
buf=mono_array_addr(*byte_val, guchar, 0);
*error = WSAENOPROTOOPT;
return;
}
+ if(ret==-2){
+ return;
+ }
/* Only one of obj_val, byte_val or int_val has data */
if(obj_val!=NULL) {