mirror of
https://github.com/henrypp/simplewall.git
synced 2026-10-21 18:43:09 -05:00
rename dir->direction
This commit is contained in:
4 files changed
+13
-12
No files matched your search
+4
-3
@@ -966,7 +966,7 @@ INT_PTR CALLBACK EditorProc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
|
||||
SendDlgItemMessage (hwnd, IDC_DIRECTION_EDIT, CB_INSERTSTRING, 1, (LPARAM)app.LocaleString (IDS_DIRECTION_2, nullptr).GetString ());
|
||||
SendDlgItemMessage (hwnd, IDC_DIRECTION_EDIT, CB_INSERTSTRING, 2, (LPARAM)text_any.GetString ());
|
||||
|
||||
SendDlgItemMessage (hwnd, IDC_DIRECTION_EDIT, CB_SETCURSEL, (WPARAM)ptr_rule->dir, 0);
|
||||
SendDlgItemMessage (hwnd, IDC_DIRECTION_EDIT, CB_SETCURSEL, (WPARAM)ptr_rule->direction, 0);
|
||||
|
||||
// protocols
|
||||
{
|
||||
@@ -1310,7 +1310,7 @@ INT_PTR CALLBACK EditorProc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
|
||||
ptr_rule->protocol = (UINT8)SendDlgItemMessage (hwnd, IDC_PROTOCOL_EDIT, CB_GETITEMDATA, SendDlgItemMessage (hwnd, IDC_PROTOCOL_EDIT, CB_GETCURSEL, 0, 0), 0);
|
||||
ptr_rule->af = (ADDRESS_FAMILY)SendDlgItemMessage (hwnd, IDC_PORTVERSION_EDIT, CB_GETITEMDATA, SendDlgItemMessage (hwnd, IDC_PORTVERSION_EDIT, CB_GETCURSEL, 0, 0), 0);
|
||||
|
||||
ptr_rule->dir = (FWP_DIRECTION)SendDlgItemMessage (hwnd, IDC_DIRECTION_EDIT, CB_GETCURSEL, 0, 0);
|
||||
ptr_rule->direction = (FWP_DIRECTION)SendDlgItemMessage (hwnd, IDC_DIRECTION_EDIT, CB_GETCURSEL, 0, 0);
|
||||
ptr_rule->is_block = !!SendDlgItemMessage (hwnd, IDC_ACTION_EDIT, CB_GETCURSEL, 0, 0);
|
||||
|
||||
if (ptr_rule->type == DataRuleCustom)
|
||||
@@ -4018,7 +4018,7 @@ find_wrap:
|
||||
{
|
||||
case NIN_POPUPOPEN:
|
||||
{
|
||||
PR_OBJECT ptr_log_object = _app_notifyget_obj (_app_notifyget_id (config.hnotification, 0));
|
||||
PR_OBJECT ptr_log_object = _app_notifyget_obj (_app_notifyget_id (config.hnotification, false));
|
||||
|
||||
if (ptr_log_object)
|
||||
{
|
||||
@@ -5930,6 +5930,7 @@ find_wrap:
|
||||
case 1000:
|
||||
{
|
||||
app.LogError (L"Test func", 5, L"asdasd", UID);
|
||||
|
||||
break;
|
||||
}
|
||||
#endif // _DEBUG || _APP_BETA
|
||||
|
||||
+1
-1
@@ -388,7 +388,7 @@ typedef struct tagITEM_RULE
|
||||
|
||||
ADDRESS_FAMILY af = AF_UNSPEC;
|
||||
|
||||
FWP_DIRECTION dir = FWP_DIRECTION_OUTBOUND;
|
||||
FWP_DIRECTION direction = FWP_DIRECTION_OUTBOUND;
|
||||
|
||||
UINT8 profile = 0; // ffu!
|
||||
|
||||
|
||||
+4
-4
@@ -594,7 +594,7 @@ void _app_setruleiteminfo (HWND hwnd, INT listview_id, INT item, PITEM_RULE ptr_
|
||||
|
||||
_r_listview_setitem (hwnd, listview_id, item, 0, ptr_rule->type == DataRuleCustom && ptr_rule->is_readonly ? _r_fmt (L"%s" SZ_READONLY_RULE, ptr_rule->pname) : ptr_rule->pname, _app_getruleicon (ptr_rule), _app_getrulegroup (ptr_rule));
|
||||
_r_listview_setitem (hwnd, listview_id, item, 1, ptr_rule->protocol ? _app_getprotoname (ptr_rule->protocol, AF_UNSPEC) : app.LocaleString (IDS_ANY, nullptr));
|
||||
_r_listview_setitem (hwnd, listview_id, item, 2, app.LocaleString (ptr_rule->dir == FWP_DIRECTION_MAX ? IDS_ANY : IDS_DIRECTION_1 + ptr_rule->dir, nullptr));
|
||||
_r_listview_setitem (hwnd, listview_id, item, 2, app.LocaleString (ptr_rule->direction == FWP_DIRECTION_MAX ? IDS_ANY : IDS_DIRECTION_1 + ptr_rule->direction, nullptr));
|
||||
|
||||
_r_listview_setitemcheck (hwnd, listview_id, item, ptr_rule->is_enabled);
|
||||
|
||||
@@ -1166,7 +1166,7 @@ void _app_profile_load_helper (const pugi::xml_node& root, EnumDataType type, UI
|
||||
_r_str_alloc (&ptr_rule->prule_local, rule_local_length, attr_rule_local);
|
||||
}
|
||||
|
||||
ptr_rule->dir = (FWP_DIRECTION)item.attribute (L"dir").as_int ();
|
||||
ptr_rule->direction = (FWP_DIRECTION)item.attribute (L"dir").as_int ();
|
||||
ptr_rule->protocol = (UINT8)item.attribute (L"protocol").as_int ();
|
||||
ptr_rule->af = (ADDRESS_FAMILY)item.attribute (L"version").as_int ();
|
||||
|
||||
@@ -1766,8 +1766,8 @@ void _app_profile_save (LPCWSTR path_custom)
|
||||
if (ptr_rule->profile)
|
||||
item.append_attribute (L"profile").set_value (ptr_rule->profile);
|
||||
|
||||
if (ptr_rule->dir != FWP_DIRECTION_OUTBOUND)
|
||||
item.append_attribute (L"dir").set_value (ptr_rule->dir);
|
||||
if (ptr_rule->direction != FWP_DIRECTION_OUTBOUND)
|
||||
item.append_attribute (L"dir").set_value (ptr_rule->direction);
|
||||
|
||||
if (ptr_rule->protocol != 0)
|
||||
item.append_attribute (L"protocol").set_value (ptr_rule->protocol);
|
||||
|
||||
+4
-4
@@ -1229,10 +1229,10 @@ bool _wfp_create4filters (HANDLE hengine, const OBJECTS_VEC& ptr_rules, UINT lin
|
||||
// apply rules for services hosts
|
||||
if (ptr_rule->is_forservices)
|
||||
{
|
||||
if (!_wfp_createrulefilter (hengine, ptr_rule->pname, config.ntoskrnl_hash, rule_remote, rule_local, ptr_rule->protocol, ptr_rule->af, ptr_rule->dir, ptr_rule->weight, ptr_rule->is_block ? FWP_ACTION_BLOCK : FWP_ACTION_PERMIT, 0, &guids))
|
||||
if (!_wfp_createrulefilter (hengine, ptr_rule->pname, config.ntoskrnl_hash, rule_remote, rule_local, ptr_rule->protocol, ptr_rule->af, ptr_rule->direction, ptr_rule->weight, ptr_rule->is_block ? FWP_ACTION_BLOCK : FWP_ACTION_PERMIT, 0, &guids))
|
||||
is_haveerrors = true;
|
||||
|
||||
if (!_wfp_createrulefilter (hengine, ptr_rule->pname, config.svchost_hash, rule_remote, rule_local, ptr_rule->protocol, ptr_rule->af, ptr_rule->dir, ptr_rule->weight, ptr_rule->is_block ? FWP_ACTION_BLOCK : FWP_ACTION_PERMIT, 0, &guids))
|
||||
if (!_wfp_createrulefilter (hengine, ptr_rule->pname, config.svchost_hash, rule_remote, rule_local, ptr_rule->protocol, ptr_rule->af, ptr_rule->direction, ptr_rule->weight, ptr_rule->is_block ? FWP_ACTION_BLOCK : FWP_ACTION_PERMIT, 0, &guids))
|
||||
is_haveerrors = true;
|
||||
}
|
||||
|
||||
@@ -1243,13 +1243,13 @@ bool _wfp_create4filters (HANDLE hengine, const OBJECTS_VEC& ptr_rules, UINT lin
|
||||
if (ptr_rule->is_forservices && (p.first == config.ntoskrnl_hash || p.first == config.svchost_hash))
|
||||
continue;
|
||||
|
||||
if (!_wfp_createrulefilter (hengine, ptr_rule->pname, p.first, rule_remote, rule_local, ptr_rule->protocol, ptr_rule->af, ptr_rule->dir, ptr_rule->weight, ptr_rule->is_block ? FWP_ACTION_BLOCK : FWP_ACTION_PERMIT, 0, &guids))
|
||||
if (!_wfp_createrulefilter (hengine, ptr_rule->pname, p.first, rule_remote, rule_local, ptr_rule->protocol, ptr_rule->af, ptr_rule->direction, ptr_rule->weight, ptr_rule->is_block ? FWP_ACTION_BLOCK : FWP_ACTION_PERMIT, 0, &guids))
|
||||
is_haveerrors = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!_wfp_createrulefilter (hengine, ptr_rule->pname, 0, rule_remote, rule_local, ptr_rule->protocol, ptr_rule->af, ptr_rule->dir, ptr_rule->weight, ptr_rule->is_block ? FWP_ACTION_BLOCK : FWP_ACTION_PERMIT, 0, &guids))
|
||||
if (!_wfp_createrulefilter (hengine, ptr_rule->pname, 0, rule_remote, rule_local, ptr_rule->protocol, ptr_rule->af, ptr_rule->direction, ptr_rule->weight, ptr_rule->is_block ? FWP_ACTION_BLOCK : FWP_ACTION_PERMIT, 0, &guids))
|
||||
is_haveerrors = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user