in progress use DDF to serialise names
[mech_eap.orig] / process_context_token.c
index daba6f8..5bad3c0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, JANET(UK)
+ * Copyright (c) 2011, JANET(UK)
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -42,8 +42,10 @@ gss_process_context_token(OM_uint32 *minor,
 
     *minor = 0;
 
-    if (ctx == NULL)
-        return GSS_S_NO_CONTEXT;
+    if (ctx == NULL) {
+        *minor = EINVAL;
+        return GSS_S_CALL_INACCESSIBLE_READ | GSS_S_NO_CONTEXT;
+    }
 
     GSSEAP_MUTEX_LOCK(&ctx->mutex);