code polishing
authorDaniel Kouril <kouril@ics.muni.cz>
Wed, 30 Mar 2011 01:13:04 +0000 (21:13 -0400)
committerDaniel Kouril <kouril@ics.muni.cz>
Wed, 30 Mar 2011 01:13:04 +0000 (21:13 -0400)
nsMoonshotSessionState.cpp
nsMoonshotSessionState.h

index 20b325d..127d08e 100644 (file)
@@ -15,7 +15,7 @@ nsMoonshotSessionState::~nsMoonshotSessionState()
        gss_delete_sec_context(&min_stat, &gss_ctx, GSS_C_NO_BUFFER);
 
     if (gss_cred != GSS_C_NO_CREDENTIAL)
-       gss_release_cred(&min_stat, &gss_ctx);
+       gss_release_cred(&min_stat, &gss_cred);
 
     gss_ctx = GSS_C_NO_CONTEXT;
     gss_cred = GSS_C_NO_CREDENTIAL;
index c29ef1b..7e623d8 100644 (file)
@@ -1,26 +1,27 @@
 #ifndef _nsMoonshotSessionState_h__
 #define _nsMoonshotSessionState_h__
 
+#include <nsISupportsUtils.h>
 #include <gssapi.h>
 
+typedef enum {
+    GSS_CTX_EMPTY,
+    GSS_CTX_IN_PROGRESS,
+    GSS_CTX_ESTABLISHED
+} gss_state_t;
+
 class nsMoonshotSessionState : public nsISupports
 {
     public:
-       NS_DECL_ISUPPORTS;
+       NS_DECL_ISUPPORTS
 
        nsMoonshotSessionState();
        virtual ~nsMoonshotSessionState();
-       NS_IMETHOD Reset();
-
-       enum {
-           GSS_CTX_EMPTY,
-           GSS_CTX_IN_PROGRESS,
-           GSS_CTX_ESTABLISHED
-       } gss_state;
+       void Reset();
 
+       gss_state_t gss_state;
        gss_cred_id_t gss_cred;
-
-    private:
-}
+       gss_ctx_id_t gss_ctx;
+};
 
 #endif