Changeset 5170
- Timestamp:
- 05/04/11 20:52:20 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/oscam-http.c
r5169 r5170 19 19 20 20 static int8_t running = 1; 21 static pthread_t httpthread; 21 22 pthread_mutex_t http_lock; 22 23 … … 2651 2652 cs_log("Shutdown requested by XMLApi from %s", cs_inet_ntoa(cur_client()->ip)); 2652 2653 } 2653 running = 0; 2654 running = 0; 2655 pthread_kill(httpthread, SIGPIPE); // send signal to master thread to wake up from accept() 2654 2656 cs_exit_oscam(); 2655 2657 … … 2676 2678 } 2677 2679 running = 0; 2680 pthread_kill(httpthread, SIGPIPE); // send signal to master thread to wake up from accept() 2678 2681 cs_restart_oscam(); 2679 2682 … … 3520 3523 struct s_client * cl = create_client(first_client->ip); 3521 3524 if (cl == NULL) return; 3522 cl->thread = pthread_self();3525 httpthread = cl->thread = pthread_self(); 3523 3526 pthread_setspecific(getclient, cl); 3524 3527 cl->typ = 'h'; … … 3586 3589 while (running) { 3587 3590 if((s = accept(sock, (struct sockaddr *) &remote, &len)) < 0) { 3588 if(errno != EAGAIN ){3591 if(errno != EAGAIN && errno != EINTR){ 3589 3592 cs_log("HTTP Server: Error calling accept() (errno=%d %s)", errno, strerror(errno)); 3590 3593 cs_sleepms(100); … … 3634 3637 } 3635 3638 } 3636 3639 // Wait a bit so that we don't close ressources while http threads are active 3640 cs_sleepms(300); 3637 3641 #ifdef WITH_SSL 3638 3642 if (ssl_active){
Note:
See TracChangeset
for help on using the changeset viewer.