s3: Explicitly pass smb_srv_trans_enc_ctx to srv_enc_ctx
authorVolker Lendecke <vl@samba.org>
Fri, 5 Aug 2011 14:22:48 +0000 (16:22 +0200)
committerVolker Lendecke <vl@samba.org>
Thu, 25 Aug 2011 19:36:18 +0000 (21:36 +0200)
source3/smbd/seal.c

index fa25cadf60b5d6d687eb0fdadd79c7ec982d2007..1b9b3b07df4f6fcaf98bb9ac60a245bdc4fe597f 100644 (file)
@@ -46,9 +46,9 @@ struct smb_srv_trans_enc_ctx {
  Return global enc context - this must change if we ever do multiple contexts.
 ******************************************************************************/
 
-static uint16_t srv_enc_ctx(void)
+static uint16_t srv_enc_ctx(const struct smb_srv_trans_enc_ctx *ec)
 {
-       return srv_trans_enc_ctx->es->enc_ctx_num;
+       return ec->es->enc_ctx_num;
 }
 
 /******************************************************************************
@@ -73,7 +73,7 @@ bool is_encrypted_packet(const uint8_t *inbuf)
        }
 
        /* Encrypted messages are 0xFF'E'<ctx> */
-       if (srv_trans_enc_ctx && enc_num == srv_enc_ctx()) {
+       if (srv_trans_enc_ctx && enc_num == srv_enc_ctx(srv_trans_enc_ctx)) {
                return true;
        }
        return false;