[2/3] openvpn-authenticator: Drop some dead code

Message ID 20221206100144.4150532-2-michael.tremer@ipfire.org
State Accepted
Commit d7618ccba8ba312916593e6ebbadee1d90575c0f
Headers
Series [1/3] openvpn-authenticator: Avoid infinite loop when losing socket connection |

Commit Message

Michael Tremer Dec. 6, 2022, 10:01 a.m. UTC
  Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
---
 config/ovpn/openvpn-authenticator | 12 ------------
 1 file changed, 12 deletions(-)
  

Comments

Adolf Belka Dec. 7, 2022, 12:22 p.m. UTC | #1
Tested-by: Adolf Belka <adolf.belka@ipfire.org>

On 06/12/2022 11:01, Michael Tremer wrote:
> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
> ---
>   config/ovpn/openvpn-authenticator | 12 ------------
>   1 file changed, 12 deletions(-)
>
> diff --git a/config/ovpn/openvpn-authenticator b/config/ovpn/openvpn-authenticator
> index 5d9348d7e..c22e08f0a 100644
> --- a/config/ovpn/openvpn-authenticator
> +++ b/config/ovpn/openvpn-authenticator
> @@ -97,18 +97,6 @@ class OpenVPNAuthenticator(object):
>   		# Send the command
>   		self._write_line(command)
>   
> -		return # XXX Code below doesn't work
> -
> -		# Read response
> -		response = self._read_line()
> -
> -		# Handle response
> -		if not response.startswith("SUCCESS:"):
> -			log.error("Command '%s' returned an error:" % command)
> -			log.error("  %s" % response)
> -
> -			return response
> -
>   	def run(self):
>   		# Connect to socket
>   		self.sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
  

Patch

diff --git a/config/ovpn/openvpn-authenticator b/config/ovpn/openvpn-authenticator
index 5d9348d7e..c22e08f0a 100644
--- a/config/ovpn/openvpn-authenticator
+++ b/config/ovpn/openvpn-authenticator
@@ -97,18 +97,6 @@  class OpenVPNAuthenticator(object):
 		# Send the command
 		self._write_line(command)
 
-		return # XXX Code below doesn't work
-
-		# Read response
-		response = self._read_line()
-
-		# Handle response
-		if not response.startswith("SUCCESS:"):
-			log.error("Command '%s' returned an error:" % command)
-			log.error("  %s" % response)
-
-			return response
-
 	def run(self):
 		# Connect to socket
 		self.sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)