Skip to content

Commit 53c6970

Browse files
committed
nsp: remove unused oneoff synthesis code
References: DESK-359
1 parent 793e461 commit 53c6970

File tree

2 files changed

+2
-24
lines changed

2 files changed

+2
-24
lines changed

exch/nsp/main.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ static DCERPC_ENDPOINT *ep_6001, *ep_6004;
4949
static constexpr cfg_directive nsp_cfg_defaults[] = {
5050
{"cache_interval", "5min", CFG_TIME, "1s", "1d"},
5151
{"hash_table_size", "3000", CFG_SIZE, "1"},
52-
{"nsp_synthesize_oneoff", "0", CFG_BOOL},
5352
{"nsp_trace", "0", CFG_BOOL},
5453
{"session_check", "1", CFG_BOOL},
5554
{"x500_org_name", "Gromox default"},
@@ -67,7 +66,6 @@ static bool exch_nsp_reload(std::shared_ptr<CONFIG_FILE> cfg)
6766
return false;
6867
}
6968
g_nsp_trace = cfg->get_ll("nsp_trace");
70-
g_nsp_synthesize_oneoff = cfg->get_ll("nsp_synthesize_oneoff");
7169
return true;
7270
}
7371

exch/nsp/nsp_interface.cpp

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ enum {
6363
TI_SCRIPT = 0x4,
6464
};
6565

66-
unsigned int g_nsp_trace, g_nsp_synthesize_oneoff;
66+
unsigned int g_nsp_trace;
6767
static BOOL g_session_check;
6868
static bool (*verify_cpid)(uint32_t cpid);
6969
static decltype(mysql_adaptor_get_domain_ids) *get_domain_ids;
@@ -2658,27 +2658,7 @@ int nsp_interface_resolve_namesw(NSPI_HANDLE handle, uint32_t reserved,
26582658
auto pnode = nsp_interface_resolve_gal(pbase->gal_list,
26592659
pstat->codepage, ptoken, &b_ambiguous);
26602660
if (NULL == pnode) {
2661-
if (b_ambiguous) {
2662-
*pproptag = MID_AMBIGUOUS;
2663-
} else if (g_nsp_synthesize_oneoff &&
2664-
strncasecmp(pstrs->ppstr[i], "=SMTP:", 6) == 0) {
2665-
prow = common_util_proprowset_enlarge(*pprows);
2666-
if (NULL == prow || NULL ==
2667-
common_util_propertyrow_init(prow)) {
2668-
*ppmids = nullptr;
2669-
*pprows = nullptr;
2670-
return ecServerOOM;
2671-
}
2672-
result = nsp_interface_fetch_smtp_row(pstrs->ppstr[i] + 6, pproptags, prow);
2673-
if (result != ecSuccess) {
2674-
*ppmids = nullptr;
2675-
*pprows = nullptr;
2676-
return result;
2677-
}
2678-
*pproptag = MID_RESOLVED;
2679-
} else {
2680-
*pproptag = MID_UNRESOLVED;
2681-
}
2661+
*pproptag = b_ambiguous ? MID_AMBIGUOUS : MID_UNRESOLVED;
26822662
continue;
26832663
}
26842664
*pproptag = MID_RESOLVED;

0 commit comments

Comments
 (0)