};
-int fr_tacacs_global_init(void)
-{
- if (instance_count > 0) {
- instance_count++;
- return 0;
- }
-
- instance_count++;
-
- if (fr_dict_autoload(libfreeradius_tacacs_dict) < 0) {
- fail:
- instance_count--;
- return -1;
- }
-
- if (fr_dict_attr_autoload(libfreeradius_tacacs_dict_attr) < 0) {
- fr_dict_autofree(libfreeradius_tacacs_dict);
- goto fail;
- }
-
- instantiated = true;
- return 0;
-}
-
-void fr_tacacs_global_free(void)
-{
- if (!instantiated) return;
-
- fr_assert(instance_count > 0);
-
- if (--instance_count > 0) return;
-
- fr_dict_autofree(libfreeradius_tacacs_dict);
- instantiated = false;
-}
-
/** XOR the body based on the secret key.
*
* This function encrypts (or decrypts) TACACS+ packets, and sets the "encrypted" flag.
fr_assert(p == end);
}
+
+int fr_tacacs_global_init(void)
+{
+ if (instance_count > 0) {
+ instance_count++;
+ return 0;
+ }
+
+ instance_count++;
+
+ if (fr_dict_autoload(libfreeradius_tacacs_dict) < 0) {
+ fail:
+ instance_count--;
+ return -1;
+ }
+
+ if (fr_dict_attr_autoload(libfreeradius_tacacs_dict_attr) < 0) {
+ fr_dict_autofree(libfreeradius_tacacs_dict);
+ goto fail;
+ }
+
+ instantiated = true;
+ return 0;
+}
+
+void fr_tacacs_global_free(void)
+{
+ if (!instantiated) return;
+
+ fr_assert(instance_count > 0);
+
+ if (--instance_count > 0) return;
+
+ fr_dict_autofree(libfreeradius_tacacs_dict);
+ instantiated = false;
+}
+