HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/firewall/server/__pycache__/server.cpython-310.pyc
o

bhAbY�@stdgZddlZddlmZddlZddlZddlZddlmZddl	m
Z
ddlmZdd�Z
d	d
�Zd
dd�ZdS)�
run_server�N)�GLib)�config)�log)�	FirewallDcCs|��dS)NT)�reload)�service�r	�8/usr/lib/python3/dist-packages/firewall/server/server.py�sighup0srcCs|��dS)N)�quit)�mainloopr	r	r
�sigterm4srFc
sdd}|r#ddlm�ddl�������j�d�����fdd��zMtjjj	dd�t�
�}tjjt
jj|d	�}t|t
jj�}t��}|rMt����ttd
�rVtj}ntj}|tjtjt|�|tjtjt|�|��Wn7ty~t� d�Yn*t!y�t�"d�Ynt#y�}zt�"d
|j$j%t&|��WYd}~nd}~ww|r�|�'�dSdS)zI Main function for firewall server. Handles D-Bus and GLib mainloop.
    Nr)�pformat�
csn���t�j�dkr/td�tdt�j���jD]}tt|�d�t�|��qtd�t����dS)NrzP
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
zGARBAGE OBJECTS (%d):
z
  zP
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
)�collect�len�garbage�print�typer�timeout_add_seconds)�x��gc�
gc_collect�
gc_timeoutrr	r
rHs
zrun_server.<locals>.gc_collectT)�set_as_default)�bus�unix_signal_addz
Stopping..z Raising SystemExit in run_serverzException %s: %s)(�pprintrr�enable�	set_debug�
DEBUG_LEAK�dbusr
�glib�
DBusGMainLoop�	SystemBusr�BusNamer�DBUS_INTERFACEr�	DBUS_PATHr�MainLoopr�hasattrr�unix_signal_add_full�
PRIORITY_HIGH�signal�SIGHUPr�SIGTERMr�run�KeyboardInterruptr�debug1�
SystemExit�error�	Exception�	__class__�__name__�str�stop)�debug_gcrr�namer
r�er	rr
r=sJ


�
�"���)F)�__all__r.�
gi.repositoryrr#�dbus.service�dbus.mainloop.glib�firewallr�firewall.core.loggerr�firewall.server.firewalldrrrrr	r	r	r
�<module>s