Changeset 18920 for trunk/FACT++/dim/src/dna.c
- Timestamp:
- 10/18/17 13:54:41 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/dim/src/dna.c
r15282 r18920 16 16 #define DNA 17 17 #include <dim.h> 18 #include <time.h> 18 19 19 20 /* global definitions */ … … 353 354 tcpip_code = dna_write_bytes(conn_id, &test_pkt, READ_HEADER_SIZE,0); 354 355 if(tcpip_failure(tcpip_code)) { 355 /* Connection lost. Signal upper layer ? */ 356 /* Connection lost. Signal upper layer ? No -> creates a deadlock in the Timer Thread*/ 357 /* 356 358 if(dna_connp->read_ast) 357 359 dna_connp->read_ast(conn_id, NULL, 0, STA_DISC); 360 */ 358 361 return; 359 362 } … … 624 627 time_t oldest; 625 628 int oldesti = 0; 629 /* 626 630 extern time_t time(); 631 */ 627 632 628 633 if(type == 0) … … 822 827 if (tcpip_failure(tcpip_code)) 823 828 { 829 if(src_type == SRC_DIS) 830 strcpy(src_type_str,"Server"); 831 else if(src_type == SRC_DIC) 832 strcpy(src_type_str,"Client"); 833 else 834 strcpy(src_type_str,"Unknown type"); 824 835 dim_print_date_time(); 825 printf(" Client Establishing Connection: Couldn't write to Conn %3d : Server %s@%s\n",conn_id, 826 Net_conns[conn_id].task, Net_conns[conn_id].node); 827 fflush(stdout); 836 sprintf(str," %s Establishing Connection: Couldn't write to Conn %3d : Server %s@%s\n", 837 src_type_str, conn_id, Net_conns[conn_id].task, Net_conns[conn_id].node); 838 if (!strcmp(server_task, "DIM_DNS")) 839 dna_report_error(conn_id, tcpip_code, str, DIM_ERROR, DIMDNSCNERR); 840 else 841 dna_report_error(conn_id, tcpip_code, str, DIM_ERROR, DIMTCPCNERR); 828 842 dna_close(conn_id); 829 843 return(0); … … 841 855 dna_report_error(conn_id, -1, 842 856 "Write timeout, disconnecting from", DIM_ERROR, DIMTCPWRTMO); 843 if(!find_pend_conn(Net_conns[conn_id].node, Net_conns[conn_id].task, 0, 0, 1)) 857 if (!find_pend_conn(Net_conns[conn_id].node, Net_conns[conn_id].task, 0, 0, 1)) 858 { 844 859 ins_pend_conn(Net_conns[conn_id].node, Net_conns[conn_id].task, 0, 0, 1, time(NULL)); 860 } 845 861 } 846 862 release_conn(conn_id);
Note:
See TracChangeset
for help on using the changeset viewer.