~ubuntu-branches/debian/squeeze/erlang/squeeze

« back to all changes in this revision

Viewing changes to lib/snmp/src/manager/snmpm.erl

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2009-08-05 20:54:29 UTC
  • mfrom: (6.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20090805205429-pm4pnwew8axraosl
Tags: 1:13.b.1-dfsg-5
* Fixed parentheses in Emacs mode (closes: #536891).
* Removed unnecessary conflicts with erlang-manpages package.
* Added workaround for #475459: disabled threads on sparc architecture.
  This breaks wxErlang, so it's only a temporary solution.

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
 
39
39
         load_mib/1, unload_mib/1, 
40
40
         which_mibs/0, 
41
 
         name_to_oid/1, oid_to_name/1, 
 
41
         name_to_oid/1, oid_to_name/1, oid_to_type/1, 
42
42
 
43
43
         register_user/3, register_user/4, 
44
44
         register_user_monitor/3, register_user_monitor/4, 
175
175
 
176
176
-define(NOTIFY_START_TICK_TIME, 500).
177
177
 
178
 
notify_started(To) when is_integer(To) and (To > 0) ->
 
178
notify_started(To) when is_integer(To) andalso (To > 0) ->
179
179
    spawn_link(?MODULE, snmpm_start_verify, [self(), To]).
180
180
 
181
181
cancel_notify_started(Pid) ->
249
249
oid_to_name(Oid) ->
250
250
    snmpm_config:oid_to_name(Oid).
251
251
 
 
252
%% Get the type for an oid
 
253
oid_to_type(Oid) ->
 
254
    snmpm_config:oid_to_type(Oid).
 
255
 
252
256
 
253
257
%% -- Info -- 
254
258
 
420
424
%% -- USM users --
421
425
 
422
426
register_usm_user(EngineID, UserName, Conf) 
423
 
  when list(EngineID), list(UserName), list(Conf) ->
 
427
  when is_list(EngineID) andalso is_list(UserName) andalso is_list(Conf) ->
424
428
    snmpm_config:register_usm_user(EngineID, UserName, Conf).
425
429
 
426
430
unregister_usm_user(EngineID, UserName) 
427
 
  when list(EngineID), list(UserName) ->
 
431
  when is_list(EngineID) andalso is_list(UserName) ->
428
432
    snmpm_config:unregister_usm_user(EngineID, UserName).
429
433
 
430
434
usm_user_info(EngineID, UserName, Item) 
431
 
  when list(EngineID), list(UserName), atom(Item) ->
 
435
  when is_list(EngineID) andalso is_list(UserName) andalso is_atom(Item) ->
432
436
    snmpm_config:usm_user_info(EngineID, UserName, Item).
433
437
 
434
438
update_usm_user_info(EngineID, UserName, Item, Val) 
435
 
  when list(EngineID), list(UserName), atom(Item) ->
 
439
  when is_list(EngineID) andalso is_list(UserName) andalso is_atom(Item) ->
436
440
    snmpm_config:update_usm_user_info(EngineID, UserName, Item, Val).
437
441
 
438
442
which_usm_users() ->
1447
1451
 
1448
1452
format_varbinds(Prefix, []) ->
1449
1453
    lists:flatten(io_lib:format("~sVarbinds:    []~n", [Prefix])); 
1450
 
format_varbinds(Prefix, VBs) when list(VBs) ->
 
1454
format_varbinds(Prefix, VBs) when is_list(VBs) ->
1451
1455
    lists:flatten(io_lib:format("~sVarbinds: ~n~s", 
1452
1456
                                [Prefix, format_vbs(Prefix ++ "   ", VBs)]));
1453
1457
format_varbinds(Prefix, VBs) ->