summaryrefslogtreecommitdiff
path: root/ot_accesslist.c
diff options
context:
space:
mode:
Diffstat (limited to 'ot_accesslist.c')
-rw-r--r--ot_accesslist.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/ot_accesslist.c b/ot_accesslist.c
index cebb064..412c539 100644
--- a/ot_accesslist.c
+++ b/ot_accesslist.c
@@ -95,7 +95,6 @@ void accesslist_init( ) {
95 signal( SIGHUP, accesslist_readfile ); 95 signal( SIGHUP, accesslist_readfile );
96 } 96 }
97} 97}
98
99#endif 98#endif
100 99
101static uint32_t g_adminip_addresses[OT_ADMINIP_MAX]; 100static uint32_t g_adminip_addresses[OT_ADMINIP_MAX];
@@ -107,7 +106,14 @@ int accesslist_blessip( char *ip, ot_permissions permissions ) {
107 return -1; 106 return -1;
108 memmove( g_adminip_addresses + g_adminip_count, ip, 4 ); 107 memmove( g_adminip_addresses + g_adminip_count, ip, 4 );
109 g_adminip_permissions[ g_adminip_count++ ] = permissions; 108 g_adminip_permissions[ g_adminip_count++ ] = permissions;
110// fprintf( stderr, "Blessing ip address %d.%d.%d.%d with %02x\n", (uint8_t)ip[0], (uint8_t)ip[1], (uint8_t)ip[2], (uint8_t)ip[3], permissions ); 109#ifdef _DEBUG
110 fprintf( stderr, "Blessing ip address %d.%d.%d.%d with:", (uint8_t)ip[0], (uint8_t)ip[1], (uint8_t)ip[2], (uint8_t)ip[3]);
111 if( permissions & OT_PERMISSION_MAY_STAT ) fputs( " may_fetch_stats", stderr );
112 if( permissions & OT_PERMISSION_MAY_SYNC ) fputs( " may_sync_batch", stderr );
113 if( permissions & OT_PERMISSION_MAY_LIVESYNC ) fputs( " may_sync_live", stderr );
114 if( permissions & OT_PERMISSION_MAY_FULLSCRAPE ) fputs( " may_fetch_fullscrapes", stderr );
115 if( !permissions ) fputs(" nothing.\n", stderr); else fputs(".\n", stderr );
116#endif
111 return 0; 117 return 0;
112} 118}
113 119