Changeset 4020
- Timestamp:
- 11/29/10 22:09:50 (13 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/module-newcamd.c
r3994 r4020 1106 1106 while(rc==-9) 1107 1107 { 1108 if (!client->pfd) break; 1108 1109 // process_input returns -9 on clienttimeout 1109 1110 while ((rc=process_input(mbuf, sizeof(mbuf), cfg->cmaxidle))>0) -
trunk/oscam-reader.c
r3965 r4020 283 283 void network_tcp_connection_close(struct s_client *cl, int fd) 284 284 { 285 if(!cl) return; 286 struct s_reader *reader = cl->reader; 287 cs_debug("tcp_conn_close(): fd=%d, cl->typ == 'c'=%d", fd, cl->typ == 'c'); 288 if (fd) { 289 close(fd); 290 if(reader) 291 clear_block_delay(reader); 292 } 293 cl->udp_fd = 0; 285 if(!cl) return; 286 struct s_reader *reader = cl->reader; 287 cs_debug("tcp_conn_close(): fd=%d, cl->typ == 'c'=%d", fd, cl->typ == 'c'); 288 289 if (fd) { 290 close(fd); 291 if (fd == cl->udp_fd) 292 cl->udp_fd = 0; 293 if (fd == cl->pfd) 294 cl->pfd = 0; 295 296 if(reader) 297 clear_block_delay(reader); 298 } 299 294 300 295 301 if (cl->typ != 'c') -
trunk/oscam.c
r4014 r4020 390 390 prev->next = cl2->next; //remove client from list 391 391 392 cs_sleepms(2000); //wait some time before cleanup to prevent segfaults 393 if(ph[cl->ctyp].cleanup) ph[cl->ctyp].cleanup(cl); 392 if(cl->typ == 'c' && ph[cl->ctyp].cleanup) 393 ph[cl->ctyp].cleanup(cl); 394 395 if(cl->pfd) nullclose(&cl->pfd); //Closing Network socket 396 if(cl->fd_m2c_c) nullclose(&cl->fd_m2c_c); //Closing client read fd 397 if(cl->fd_m2c) nullclose(&cl->fd_m2c); //Closing client read fd 398 399 cs_sleepms(1000); //wait some time before cleanup to prevent segfaults 394 400 NULLFREE(cl->ecmtask); 395 401 NULLFREE(cl->emmcache); 396 402 NULLFREE(cl->req); 397 403 NULLFREE(cl->cc); 398 if(cl->pfd) nullclose(&cl->pfd); //Closing Network socket399 if(cl->fd_m2c_c) nullclose(&cl->fd_m2c_c); //Closing client read fd400 if(cl->fd_m2c) nullclose(&cl->fd_m2c); //Closing client read fd401 404 402 405 NULLFREE (cl);
Note:
See TracChangeset
for help on using the changeset viewer.