MCPcopy Create free account
hub / github.com/OpenVPN/openvpn3-linux / UpdateEntry

Method UpdateEntry

src/common/requiresqueue.cpp:249–283  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247
248
249void RequiresQueue::UpdateEntry(ClientAttentionType type,
250 ClientAttentionGroup group,
251 uint32_t id,
252 std::string newvalue)
253{
254 if (QueueDone(type, group))
255 {
256 throw RequiresQueueException("User input not required");
257 }
258
259 for (auto &e : slots)
260 {
261 if (e.type == type
262 && e.group == group
263 && e.id == id)
264 {
265 if (!e.provided)
266 {
267 e.provided = true;
268 e.value = filter_ctrl_chars(newvalue, true);
269
270 callbacks.RunCallback(CallbackType::PROVIDE_RESPONSE);
271 return;
272 }
273 else
274 {
275 throw RequiresQueueException("net.openvpn.v3.error.input-already-provided",
276 "Request ID " + std::to_string(id)
277 + " has already been provided");
278 }
279 }
280 }
281 throw RequiresQueueException("net.openvpn.v3.invalid-input",
282 "No matching entry found in the request queue");
283}
284
285
286void RequiresQueue::UpdateEntry(GVariant *indata)

Callers 3

QueueSetupMethod · 0.95
eventMethod · 0.80
selftestFunction · 0.80

Calls 4

filter_ctrl_charsFunction · 0.85
RunCallbackMethod · 0.80
emptyMethod · 0.45

Tested by 1

selftestFunction · 0.64