Changeset 187
- Timestamp:
- 08/19/04 23:41:28 (9 years ago)
- Location:
- trunk/wifidog
- Files:
-
- 4 modified
-
ChangeLog (modified) (1 diff)
-
src/auth.c (modified) (1 diff)
-
src/gateway.c (modified) (3 diffs)
-
src/ping_thread.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wifidog/ChangeLog
r186 r187 1 1 # $Header$ 2 3 2004-08-19 Alexandre Carmel-Veilleux <acv@acv.ca> 4 * Sort of fixed the hanging thread (with an explicit thread kill) 5 * Fixed ping code 6 2 7 2004-08-13 Alexandre Carmel-Veilleux <acv@acv.ca> 3 8 * All Auth Server configuration now handled by the "AuthServer" -
trunk/wifidog/src/auth.c
r176 r187 120 120 /* No longer needs to be locked */ 121 121 pthread_mutex_unlock(&cond_mutex); 122 122 123 debug(LOG_DEBUG, "Running fw_counter()"); 124 123 125 fw_counter(); 124 126 } -
trunk/wifidog/src/gateway.c
r182 r187 57 57 extern int errno; 58 58 59 static pthread_t tid_fw_counter; /* XXX Ugly hack */ 60 59 61 /**@internal 60 62 * @brief Handles SIGCHLD signals to avoid zombie processes … … 79 81 static pthread_mutex_t sigterm_mutex = PTHREAD_MUTEX_INITIALIZER; 80 82 83 /* XXX stupid openwrt bug */ 84 pthread_kill(tid_fw_counter, SIGKILL); 85 81 86 /* Makes sure we only call fw_destroy() once. */ 82 87 if (pthread_mutex_trylock(&sigterm_mutex)) 83 return;88 pthread_exit(NULL); 84 89 85 90 fw_destroy(); … … 179 184 180 185 /* start clean up thread */ 181 pthread_create(&tid , NULL, (void *)thread_client_timeout_check, NULL);182 pthread_detach(tid );186 pthread_create(&tid_fw_counter, NULL, (void *)thread_client_timeout_check, NULL); 187 pthread_detach(tid_fw_counter); 183 188 184 189 /* start control thread */ -
trunk/wifidog/src/ping_thread.c
r186 r187 77 77 pthread_mutex_unlock(&cond_mutex); 78 78 79 fprintf(stderr, "BANG\n");80 81 79 ping(); 82 80 } … … 132 130 } 133 131 134 snprintf(request, sizeof(request) - 1, "GET %s/ping HTTP/1.0\r\n"135 "User-Agent: WiFiDog %s\ r\n"136 "Host: %s\ r\n"137 "\ r\n",132 snprintf(request, sizeof(request) - 1, "GET %s/ping/ HTTP/1.0\n" 133 "User-Agent: WiFiDog %s\n" 134 "Host: %s\n" 135 "\n", 138 136 auth_server->authserv_path, 139 137 VERSION, 140 138 auth_server->authserv_hostname); 139 140 send(sockfd, request, strlen(request), 0); 141 141 142 142 numbytes = totalbytes = 0;
