- Timestamp:
- Nov 8, 2007, 10:35:23 PM (17 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/samhain.c
r144 r145 1723 1723 } 1724 1724 1725 if (sig_config_read_again == 1) /* SIGHUP */ 1725 if (sig_config_read_again == 1 && /* SIGHUP */ 1726 sh_global_suspend_flag == 0) 1726 1727 { 1727 1728 TPT((0, FIL__, __LINE__, _("msg=<Re-read configuration.>\n"))) -
trunk/src/sh_static.c
r134 r145 94 94 #define DO_GETXXKEY_R_PATHNAME _PATH_PASSWD 95 95 96 staticint GETXXKEY_R_FUNC(DO_GETXXKEY_R_KEYTYPE key,97 98 99 96 int GETXXKEY_R_FUNC(DO_GETXXKEY_R_KEYTYPE key, 97 GETXXKEY_R_ENTTYPE *__restrict resultbuf, 98 char *__restrict buffer, size_t buflen, 99 GETXXKEY_R_ENTTYPE **__restrict result) 100 100 { 101 101 FILE *stream; … … 142 142 #define DO_GETXXKEY_R_PATHNAME _PATH_GROUP 143 143 144 staticint GETXXKEY_R_FUNC(DO_GETXXKEY_R_KEYTYPE key,145 146 147 144 int GETXXKEY_R_FUNC(DO_GETXXKEY_R_KEYTYPE key, 145 GETXXKEY_R_ENTTYPE *__restrict resultbuf, 146 char *__restrict buffer, size_t buflen, 147 GETXXKEY_R_ENTTYPE **__restrict result) 148 148 { 149 149 FILE *stream; … … 190 190 #define DO_GETXXKEY_R_PATHNAME _PATH_PASSWD 191 191 192 staticint GETXXKEY_R_FUNC(DO_GETXXKEY_R_KEYTYPE key,193 194 195 192 int GETXXKEY_R_FUNC(DO_GETXXKEY_R_KEYTYPE key, 193 GETXXKEY_R_ENTTYPE *__restrict resultbuf, 194 char *__restrict buffer, size_t buflen, 195 GETXXKEY_R_ENTTYPE **__restrict result) 196 196 { 197 197 FILE *stream; … … 238 238 #define DO_GETXXKEY_R_PATHNAME _PATH_GROUP 239 239 240 staticint GETXXKEY_R_FUNC(DO_GETXXKEY_R_KEYTYPE key,241 242 243 240 int GETXXKEY_R_FUNC(DO_GETXXKEY_R_KEYTYPE key, 241 GETXXKEY_R_ENTTYPE *__restrict resultbuf, 242 char *__restrict buffer, size_t buflen, 243 GETXXKEY_R_ENTTYPE **__restrict result) 244 244 { 245 245 FILE *stream; … … 1168 1168 DPRINTF("Looking up type %d answer for '%s'\n", type, name); 1169 1169 1170 LOCK;1170 SH_MUTEX_LOCK_UNSAFE(resolv_lock); 1171 1171 ns %= nscount; 1172 UNLOCK;1172 SH_MUTEX_UNLOCK_UNSAFE(resolv_lock); 1173 1173 1174 1174 while (retries++ < MAX_RETRIES) { … … 1181 1181 1182 1182 /* Mess with globals while under lock */ 1183 LOCK;1183 SH_MUTEX_LOCK_UNSAFE(resolv_lock); 1184 1184 ++id; 1185 1185 id &= 0xffff; 1186 1186 h.id = id; 1187 1187 dns = nsip[ns]; 1188 UNLOCK;1188 SH_MUTEX_UNLOCK_UNSAFE(resolv_lock); 1189 1189 1190 1190 h.qdcount = 1; … … 1281 1281 DPRINTF("id = %d, qr = %d\n", h.id, h.qr); 1282 1282 1283 LOCK;1283 SH_MUTEX_LOCK_UNSAFE(resolv_lock); 1284 1284 if ((h.id != id) || (!h.qr)) { 1285 UNLOCK;1285 SH_MUTEX_UNLOCK_UNSAFE(resolv_lock); 1286 1286 /* unsolicited */ 1287 1287 goto again; 1288 1288 } 1289 UNLOCK;1289 SH_MUTEX_UNLOCK_UNSAFE(resolv_lock); 1290 1290 1291 1291 … … 1369 1369 } else { 1370 1370 /* next server, first search */ 1371 LOCK;1371 SH_MUTEX_LOCK_UNSAFE(resolv_lock); 1372 1372 ns = (ns + 1) % nscount; 1373 UNLOCK;1373 SH_MUTEX_UNLOCK_UNSAFE(resolv_lock); 1374 1374 variant = 0; 1375 1375 }
Note:
See TracChangeset
for help on using the changeset viewer.