ldap: Replace if with switch on bool

The change from a2a535d0c9 used
zeek/spicy#1841, but Zeek 7.0 does not have that functionality
yet. Replace with switch ( bool ).
This commit is contained in:
Arne Welzel 2025-05-06 09:45:25 +02:00
parent ceb798b42a
commit bdcb1c8a44

View file

@ -484,8 +484,8 @@ type BindRequest = unit(inout message: Message, ctx: Ctx&) {
}
}
if ( |self.authData| > 0 ) {
switch ( self.authType ) {
switch ( |self.authData| > 0 ) {
True -> switch ( self.authType ) {
BindAuthType::BIND_AUTH_SIMPLE ->
: void {
self.simpleCreds = self.authData.decode();
@ -502,10 +502,10 @@ type BindRequest = unit(inout message: Message, ctx: Ctx&) {
sicilyMessage: SicilyMessage {
message.arg = self.sicilyMessage.signature_decoded;
}
* -> : void;
} &parse-from=self.authData;
};
};
* -> : void;
} &parse-from=self.authData;
} &requires=(self?.authType && (self.authType != BindAuthType::Undef));
type ServerSaslCreds = unit {