#include <string.h>
#include <stdarg.h>
#include "../core/nsmalloc.h"
+#include "../lib/version.h"
-int tgh_ext;
-int tgb_ext;
-int tgn_ext;
+MODULE_VERSION("");
+
+int tgh_ext = -1;
+int tgb_ext = -1;
+int tgn_ext = -1;
unsigned long trusts_lasttrustgroupid;
unsigned long trusts_lasttrusthostid;
trusts_hash_init();
tgh_ext = registernodeext("trusthost");
- if ( !tgh_ext ) {
+ if ( tgh_ext == -1 ) {
Error("trusts", ERR_FATAL, "Could not register a required node extension (trusthost)");
return;
}
tgb_ext = registernodeext("trustblock");
- if ( !tgb_ext ) {
+ if ( tgb_ext == -1 ) {
Error("trusts", ERR_FATAL, "Could not register a required node extension (trustblock)");
return;
}
tgn_ext = registernickext("trustnick");
- if ( !tgn_ext ) {
+ if ( tgn_ext == -1 ) {
Error("trusts", ERR_FATAL, "Could not register a required nick extension (trustnick)");
return;
}
}
} PATRICIA_WALK_CLEAR_END;
- if (tgh_ext)
+ if (tgh_ext != -1)
releasenodeext(tgh_ext);
- if (tgb_ext)
+ if (tgb_ext != -1)
releasenodeext(tgb_ext);
- if (tgn_ext)
- releasenodeext(tgn_ext);
+ if (tgn_ext != -1)
+ releasenickext(tgn_ext);
/* @@@ CLOSE DB */