updates
authorPekka Riikonen <priikone@silcnet.org>
Sat, 21 Jul 2001 17:10:54 +0000 (17:10 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Sat, 21 Jul 2001 17:10:54 +0000 (17:10 +0000)
lib/silcske/groups.c
lib/silcske/groups.h
lib/silcske/groups_internal.h
lib/silcske/payload.c
lib/silcske/payload.h
lib/silcske/silcske.c
lib/silcske/silcske.h
lib/silcske/silcske_status.h

index 20cba0c01ea3f61c9a703d45a55de11d67651d34..17a34c9111bd6d69d3e6d6a4cecea01aa9b63cdb 100644 (file)
@@ -2,9 +2,9 @@
 
   groups.c
 
-  Author: Pekka Riikonen <priikone@poseidon.pspt.fi>
+  Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2000 Pekka Riikonen
+  Copyright (C) 2000 - 2001 Pekka Riikonen
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
index 29941dbfe10bc2c84d453c0bb464f74299cfb1ca..1e36c5dec556bf1c22e35dff542cd137807f2fb5 100644 (file)
@@ -2,9 +2,9 @@
 
   groups.h
 
-  Author: Pekka Riikonen <priikone@poseidon.pspt.fi>
+  Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2000 Pekka Riikonen
+  Copyright (C) 2000 - 2001 Pekka Riikonen
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
index 2651885d77f1249f453877ef1847dd6d5e3948df..ab2787b4751fe3a5fcbff79aef3d7fc6bd812e03 100644 (file)
@@ -2,9 +2,9 @@
 
   groups_internal.h
 
-  Author: Pekka Riikonen <priikone@poseidon.pspt.fi>
+  Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2000 Pekka Riikonen
+  Copyright (C) 2000 - 2001 Pekka Riikonen
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
index ef420bdec71cb8fe34c7cd997252628e3c748377..d9e89389ed29d4e9f03a0eac3efadd0567c483a8 100644 (file)
@@ -2,7 +2,7 @@
 
   payload.c
 
-  Author: Pekka Riikonen <priikone@poseidon.pspt.fi>
+  Author: Pekka Riikonen <priikone@silcnet.org>
 
   Copyright (C) 2000 - 2001 Pekka Riikonen
 
index dd31fc105f8024912f92a231fbc2afb58776bf66..ba9000422af3b94eee0696f4a6bc1950df471bae 100644 (file)
@@ -2,7 +2,7 @@
 
   payload.h
 
-  Author: Pekka Riikonen <priikone@poseidon.pspt.fi>
+  Author: Pekka Riikonen <priikone@silcnet.org>
 
   Copyright (C) 2000 - 2001 Pekka Riikonen
 
index 2838a68589dfb543745f56e9edc389853b1793d2..6cf7c952b887eaa4054b4b44210b09d8527a904e 100644 (file)
@@ -2,7 +2,7 @@
 
   silcske.c
 
-  Author: Pekka Riikonen <priikone@poseidon.pspt.fi>
+  Author: Pekka Riikonen <priikone@silcnet.org>
 
   Copyright (C) 2000 - 2001 Pekka Riikonen
 
@@ -23,7 +23,7 @@
 #include "silcske.h"
 #include "groups_internal.h"
 
-/* Structure to hold all SKE callbacks-> */
+/* Structure to hold all SKE callbacks. */
 struct SilcSKECallbacksStruct {
   SilcSKESendPacketCb send_packet;
   SilcSKECb payload_receive;
@@ -216,6 +216,7 @@ SilcSKEStatus silc_ske_initiator_phase_1(SilcSKE ske,
   status = silc_ske_payload_start_decode(ske, start_payload, &payload);
   if (status != SILC_SKE_STATUS_OK) {
     ske->status = status;
+    silc_ske_payload_start_free(ske->start_payload);
     return status;
   }
 
@@ -418,18 +419,17 @@ static void silc_ske_initiator_finish_final(SilcSKE ske,
   if (ske->status == SILC_SKE_STATUS_FREED) {
     silc_ske_free(ske);
     return;
-  } else {
-    ske->users--;
   }
 
-  payload = ske->ke2_payload;
-
   /* If the caller returns PENDING status SKE library will assume that
      the caller will re-call this callback when it is not anymore in
      PENDING status. */
   if (status == SILC_SKE_STATUS_PENDING)
     return;
 
+  ske->users--;
+  payload = ske->ke2_payload;
+
   /* If the status is an error then the public key that was verified
      by the caller is not authentic. */
   if (status != SILC_SKE_STATUS_OK) {
@@ -762,18 +762,17 @@ static void silc_ske_responder_phase2_final(SilcSKE ske,
   if (ske->status == SILC_SKE_STATUS_FREED) {
     silc_ske_free(ske);
     return;
-  } else {
-    ske->users--;
   }
 
-  recv_payload = ske->ke1_payload;
-
   /* If the caller returns PENDING status SKE library will assume that
      the caller will re-call this callback when it is not anymore in
      PENDING status. */
   if (status == SILC_SKE_STATUS_PENDING)
     return;
 
+  ske->users--;
+  recv_payload = ske->ke1_payload;
+
   /* If the status is an error then the public key that was verified
      by the caller is not authentic. */
   if (status != SILC_SKE_STATUS_OK) {
index 4f08aebb44675856d78eab6338d9031fb502bc75..55a0e0bfdc7072cc4be0e24cd6fe4e4a91c882c6 100644 (file)
@@ -2,7 +2,7 @@
 
   silcske.h
 
-  Author: Pekka Riikonen <priikone@poseidon.pspt.fi>
+  Author: Pekka Riikonen <priikone@silcnet.org>
 
   Copyright (C) 2000 - 2001 Pekka Riikonen
 
index 0863ad18b013da2c9cbd508fd482ac302439a3c4..3dc0ad6160f60be2872d634fbe488359e1cf7544 100644 (file)
@@ -2,9 +2,9 @@
 
   silcske_status.h
 
-  Author: Pekka Riikonen <priikone@poseidon.pspt.fi>
+  Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2000 Pekka Riikonen
+  Copyright (C) 2000 - 2001 Pekka Riikonen
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by