diff options
author | Justin Clark-Casey (justincc) | 2014-10-07 00:03:05 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-11-25 23:18:39 +0000 |
commit | 679eaec22fbfd1764c11bfffe0bbfae5d9264d83 (patch) | |
tree | f7521209e2bccee8e5dd2718d080199fe861b65d /OpenSim/Region/ClientStack/Linden/UDP | |
parent | minor: add apparant total to logging when client sets throttles (diff) | |
download | opensim-SC-679eaec22fbfd1764c11bfffe0bbfae5d9264d83.zip opensim-SC-679eaec22fbfd1764c11bfffe0bbfae5d9264d83.tar.gz opensim-SC-679eaec22fbfd1764c11bfffe0bbfae5d9264d83.tar.bz2 opensim-SC-679eaec22fbfd1764c11bfffe0bbfae5d9264d83.tar.xz |
Allow "debug lludp throttle *" commands to work without a user name, in which case they apply to all users in the lludp server
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs | 72 |
1 files changed, 51 insertions, 21 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs index f0f186a..3dbd8ef 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs | |||
@@ -130,7 +130,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
130 | "Debug", | 130 | "Debug", |
131 | false, | 131 | false, |
132 | "debug lludp throttle log", | 132 | "debug lludp throttle log", |
133 | "debug lludp throttle log <level> <avatar-first-name> <avatar-last-name>", | 133 | "debug lludp throttle log <level> [<avatar-first-name> <avatar-last-name>]", |
134 | "Change debug logging level for throttles.", | 134 | "Change debug logging level for throttles.", |
135 | "If level >= 0 then throttle debug logging is performed.\n" | 135 | "If level >= 0 then throttle debug logging is performed.\n" |
136 | + "If level <= 0 then no throttle debug logging is performed.", | 136 | + "If level <= 0 then no throttle debug logging is performed.", |
@@ -140,7 +140,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
140 | "Debug", | 140 | "Debug", |
141 | false, | 141 | false, |
142 | "debug lludp throttle get", | 142 | "debug lludp throttle get", |
143 | "debug lludp throttle get <avatar-first-name> <avatar-last-name>", | 143 | "debug lludp throttle get [<avatar-first-name> <avatar-last-name>]", |
144 | "Return debug settings for throttles.", | 144 | "Return debug settings for throttles.", |
145 | HandleThrottleGetCommand); | 145 | HandleThrottleGetCommand); |
146 | 146 | ||
@@ -148,7 +148,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
148 | "Debug", | 148 | "Debug", |
149 | false, | 149 | false, |
150 | "debug lludp throttle set", | 150 | "debug lludp throttle set", |
151 | "debug lludp throttle set <param> <value> <avatar-first-name> <avatar-last-name>", | 151 | "debug lludp throttle set <param> <value> [<avatar-first-name> <avatar-last-name>]", |
152 | "Set a throttle parameter for the given client.", | 152 | "Set a throttle parameter for the given client.", |
153 | "Only current setting is 'adaptive' which must be 'true' or 'false'", | 153 | "Only current setting is 'adaptive' which must be 'true' or 'false'", |
154 | HandleThrottleSetCommand); | 154 | HandleThrottleSetCommand); |
@@ -278,9 +278,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
278 | if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != m_udpServer.Scene) | 278 | if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != m_udpServer.Scene) |
279 | return; | 279 | return; |
280 | 280 | ||
281 | if (args.Length != 7) | 281 | bool all = args.Length == 5; |
282 | bool one = args.Length == 7; | ||
283 | |||
284 | if (!all && !one) | ||
282 | { | 285 | { |
283 | MainConsole.Instance.OutputFormat("Usage: debug lludp throttle log <level> <avatar-first-name> <avatar-last-name>"); | 286 | MainConsole.Instance.OutputFormat( |
287 | "Usage: debug lludp throttle log <level> [<avatar-first-name> <avatar-last-name>]"); | ||
284 | return; | 288 | return; |
285 | } | 289 | } |
286 | 290 | ||
@@ -288,12 +292,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
288 | if (!ConsoleUtil.TryParseConsoleInt(MainConsole.Instance, args[4], out level)) | 292 | if (!ConsoleUtil.TryParseConsoleInt(MainConsole.Instance, args[4], out level)) |
289 | return; | 293 | return; |
290 | 294 | ||
291 | string firstName = args[5]; | 295 | string firstName = null; |
292 | string lastName = args[6]; | 296 | string lastName = null; |
297 | |||
298 | if (one) | ||
299 | { | ||
300 | firstName = args[5]; | ||
301 | lastName = args[6]; | ||
302 | } | ||
293 | 303 | ||
294 | m_udpServer.Scene.ForEachScenePresence(sp => | 304 | m_udpServer.Scene.ForEachScenePresence(sp => |
295 | { | 305 | { |
296 | if (sp.Firstname == firstName && sp.Lastname == lastName) | 306 | if (all || (sp.Firstname == firstName && sp.Lastname == lastName)) |
297 | { | 307 | { |
298 | MainConsole.Instance.OutputFormat( | 308 | MainConsole.Instance.OutputFormat( |
299 | "Throttle log level for {0} ({1}) set to {2} in {3}", | 309 | "Throttle log level for {0} ({1}) set to {2} in {3}", |
@@ -309,17 +319,27 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
309 | if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != m_udpServer.Scene) | 319 | if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != m_udpServer.Scene) |
310 | return; | 320 | return; |
311 | 321 | ||
312 | if (args.Length != 8) | 322 | bool all = args.Length == 6; |
323 | bool one = args.Length == 8; | ||
324 | |||
325 | if (!all && !one) | ||
313 | { | 326 | { |
314 | MainConsole.Instance.OutputFormat( | 327 | MainConsole.Instance.OutputFormat( |
315 | "Usage: debug lludp throttle set <param> <value> <avatar-first-name> <avatar-last-name>"); | 328 | "Usage: debug lludp throttle set <param> <value> [<avatar-first-name> <avatar-last-name>]"); |
316 | return; | 329 | return; |
317 | } | 330 | } |
318 | 331 | ||
319 | string param = args[4]; | 332 | string param = args[4]; |
320 | string rawValue = args[5]; | 333 | string rawValue = args[5]; |
321 | string firstName = args[6]; | 334 | |
322 | string lastName = args[7]; | 335 | string firstName = null; |
336 | string lastName = null; | ||
337 | |||
338 | if (one) | ||
339 | { | ||
340 | firstName = args[6]; | ||
341 | lastName = args[7]; | ||
342 | } | ||
323 | 343 | ||
324 | if (param == "adaptive") | 344 | if (param == "adaptive") |
325 | { | 345 | { |
@@ -328,8 +348,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
328 | return; | 348 | return; |
329 | 349 | ||
330 | m_udpServer.Scene.ForEachScenePresence(sp => | 350 | m_udpServer.Scene.ForEachScenePresence(sp => |
331 | { | 351 | { |
332 | if (sp.Firstname == firstName && sp.Lastname == lastName) | 352 | if (all || (sp.Firstname == firstName && sp.Lastname == lastName)) |
333 | { | 353 | { |
334 | MainConsole.Instance.OutputFormat( | 354 | MainConsole.Instance.OutputFormat( |
335 | "Setting param {0} to {1} for {2} ({3}) in {4}", | 355 | "Setting param {0} to {1} for {2} ({3}) in {4}", |
@@ -349,18 +369,28 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
349 | if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != m_udpServer.Scene) | 369 | if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != m_udpServer.Scene) |
350 | return; | 370 | return; |
351 | 371 | ||
352 | if (args.Length != 6) | 372 | bool all = args.Length == 4; |
373 | bool one = args.Length == 6; | ||
374 | |||
375 | if (!all && !one) | ||
353 | { | 376 | { |
354 | MainConsole.Instance.OutputFormat("Usage: debug lludp throttle get <avatar-first-name> <avatar-last-name>"); | 377 | MainConsole.Instance.OutputFormat( |
378 | "Usage: debug lludp throttle get [<avatar-first-name> <avatar-last-name>]"); | ||
355 | return; | 379 | return; |
356 | } | 380 | } |
357 | 381 | ||
358 | string firstName = args[4]; | 382 | string firstName = null; |
359 | string lastName = args[5]; | 383 | string lastName = null; |
384 | |||
385 | if (one) | ||
386 | { | ||
387 | firstName = args[4]; | ||
388 | lastName = args[5]; | ||
389 | } | ||
360 | 390 | ||
361 | m_udpServer.Scene.ForEachScenePresence(sp => | 391 | m_udpServer.Scene.ForEachScenePresence(sp => |
362 | { | 392 | { |
363 | if (sp.Firstname == firstName && sp.Lastname == lastName) | 393 | if (all || (sp.Firstname == firstName && sp.Lastname == lastName)) |
364 | { | 394 | { |
365 | MainConsole.Instance.OutputFormat( | 395 | MainConsole.Instance.OutputFormat( |
366 | "Status for {0} ({1}) in {2}", | 396 | "Status for {0} ({1}) in {2}", |