Changeset 14698 for trunk/FACT++/dim/src
- Timestamp:
- 11/25/12 14:01:01 (12 years ago)
- Location:
- trunk/FACT++/dim/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/dim/src/did/did.c
r14286 r14698 1457 1457 { 1458 1458 int i,j; 1459 char * asc, *ptr, str[80], tmp[256];1459 char *ptr, str[80], tmp[256]; 1460 1460 int last[4]; 1461 1461 /* 1462 char *asc; 1462 1463 asc = (char *)buff; 1464 */ 1463 1465 ptr = Service_content_str; 1464 1466 ptr += strlen(Service_content_str); … … 1512 1514 } 1513 1515 strcat(tmp,"\n"); 1516 /* 1514 1517 asc = (char *)&buff[i+1]; 1518 */ 1515 1519 } 1516 1520 strcpy(ptr, tmp); … … 1524 1528 { 1525 1529 int i,j; 1526 char * asc, *ptr, str[80], tmp[256];1530 char *ptr, str[80], tmp[256]; 1527 1531 longlong last[4]; 1528 1532 /* 1533 char *asc; 1529 1534 asc = (char *)buff; 1535 */ 1530 1536 ptr = Service_content_str; 1531 1537 ptr += strlen(Service_content_str); … … 1558 1564 } 1559 1565 strcat(tmp,"\n"); 1566 /* 1560 1567 asc = (char *)&buff[i+1]; 1568 */ 1561 1569 } 1562 1570 strcpy(ptr, tmp); … … 1570 1578 { 1571 1579 int i,j; 1572 char * asc, *ptr, str[80], tmp[256];1580 char *ptr, str[80], tmp[256]; 1573 1581 short last[8]; 1574 1582 /* 1583 char *asc; 1575 1584 asc = (char *)buff; 1585 */ 1576 1586 ptr = Service_content_str; 1577 1587 ptr += strlen(Service_content_str); … … 1625 1635 } 1626 1636 strcat(tmp,"\n"); 1637 /* 1627 1638 asc = (char *)&buff[i+1]; 1639 */ 1628 1640 } 1629 1641 strcpy(ptr, tmp); … … 1638 1650 int i,j; 1639 1651 char *asc, *ptr, str[80], tmp[256]; 1652 /* 1640 1653 char last[16]; 1641 1654 */ 1642 1655 asc = (char *)buff; 1643 1656 ptr = Service_content_str; … … 1662 1675 strcat(tmp," "); 1663 1676 strcat(tmp,&str[strlen(str)-2]); 1677 /* 1664 1678 last[i%16] = buff[i]; 1665 /*1666 1679 if(i%4 == 3) 1667 1680 strcat(tmp," "); … … 2627 2640 { 2628 2641 Arg arglist[10]; 2629 int n, n_services = -1; 2642 int n; 2643 /* 2644 int n_services = -1; 2645 */ 2630 2646 Widget w, ww, w_id; 2631 2647 void activate_services(), activate_clients(); … … 2633 2649 2634 2650 w_name[0] = 0; 2651 /* 2635 2652 if(servp) 2636 2653 n_services = servp->server.n_services; 2654 */ 2637 2655 strcpy(w_name,name); 2638 2656 if(strlen(w_name) >= MAX_TASK_NAME - 4) … … 2912 2930 int i = 0; 2913 2931 char str[2048], *strp, *strp1; 2914 DNS_SERVER_INFO *ptr;2915 2932 XmString xstr; 2916 2933 void delete_str(); 2917 2934 2935 /* 2936 DNS_SERVER_INFO *ptr; 2918 2937 ptr = &servp->server; 2919 /*2920 2938 sel_id = servp->pop_widget_id[1]; 2921 2939 id = (Widget)XmSelectionBoxGetChild(sel_id,XmDIALOG_LIST_LABEL); 2922 */ 2940 */ 2941 if(servp){} 2923 2942 if(Curr_client_list[0] == -1) 2924 2943 { … … 2980 2999 void activate_clients(Widget w, SERVER *servp, unsigned long *reason) 2981 3000 { 3001 /* 2982 3002 DNS_SERVER_INFO *ptr; 3003 */ 2983 3004 char str[100]; 2984 3005 void show_clients(); … … 2989 3010 if(reason){} 2990 3011 Curr_servp = servp; 3012 /* 2991 3013 ptr = &servp->server; 3014 */ 2992 3015 if(servp->pop_widget_id[1]) 2993 3016 { … … 3108 3131 { 3109 3132 static int old_n_services = 0; 3133 /* 3110 3134 static int changing = 0; 3135 */ 3111 3136 void put_label(); 3112 3137 … … 3115 3140 { 3116 3141 put_label(); 3142 /* 3117 3143 if(N_services > old_n_services) 3118 3144 changing = 1; 3145 */ 3119 3146 old_n_services = N_services; 3120 3147 -
trunk/FACT++/dim/src/dim_thr.c
r14575 r14698 113 113 pthread_t t_id; 114 114 void ignore_sigpipe(); 115 int ret;116 115 extern int dna_init(); 117 116 /* … … 162 161 #endif 163 162 #ifndef darwin 164 ret =sem_wait(&DIM_INIT_Sema);165 #else 166 ret =sem_wait(DIM_INIT_Semap);163 sem_wait(&DIM_INIT_Sema); 164 #else 165 sem_wait(DIM_INIT_Semap); 167 166 #endif 168 167 #if defined (LYNXOS) && !defined (__Lynx__) … … 172 171 #endif 173 172 #ifndef darwin 174 ret =sem_wait(&DIM_INIT_Sema);175 #else 176 ret =sem_wait(DIM_INIT_Semap);173 sem_wait(&DIM_INIT_Sema); 174 #else 175 sem_wait(DIM_INIT_Semap); 177 176 #endif 178 177 INIT_thread = 0; -
trunk/FACT++/dim/src/dns.c
r14403 r14698 179 179 DNS_DIS_PACKET dis_packet; 180 180 int i, service_id; 181 int format;182 DNS_CONNECTION *connp;183 181 int n_services; 184 182 char *ptr, *ptr1, *ptrt; … … 192 190 #ifdef WIN32 193 191 extern int time(); 192 #endif 193 #ifdef VMS 194 int format; 194 195 #endif 195 196 int update_did = 0; … … 369 370 dis_packet.type = htovl(DNS_DIS_KILL); 370 371 dis_packet.size = htovl(DNS_DIS_HEADER); 372 #ifdef VMS 371 373 format = vtohl(packet->format); 372 #ifdef VMS373 374 if((format & MY_OS9) || (servp->state == -1)) 374 375 { … … 480 481 Curr_n_services--; 481 482 free(servp); 482 connp = &Dns_conns[conn_id];483 483 Dns_conns[conn_id].n_services--; 484 484 if( dll_empty((DLL *) Dns_conns[conn_id].service_head)) … … 943 943 int n_informed = 0; 944 944 static DNS_SERVICE *prev_servp = (DNS_SERVICE *)0; 945 static int n_times = 0;946 945 void inform_clients(); 947 946 … … 976 975 } 977 976 } 978 n_times = 0;979 977 prev_servp = (DNS_SERVICE *)0; 980 978 ENABLE_AST … … 1079 1077 DNS_SERVICE *servp, *old_servp; 1080 1078 NODE *nodep, *old_nodep; 1081 DNS_CONNECTION *connp;1082 1079 void service_remove(); 1083 1080 1084 connp = &Dns_conns[conn_id];1085 1081 if( Dns_conns[conn_id].src_type == SRC_DIS ) 1086 1082 { -
trunk/FACT++/dim/src/examples/test_client.cxx
r11881 r14698 45 45 } 46 46 public : 47 StrService() : DimInfo("TEST/STRVAL", "not available") {};47 StrService() : DimInfo("TEST/STRVAL",(char *)"not available") {}; 48 48 }; 49 49 -
trunk/FACT++/dim/src/examples/test_server.c
r14575 r14698 64 64 int main(int argc, char **argv) 65 65 { 66 int i, id , *ptr/*, big_ids[20]*/;66 int i, id/*, big_ids[20]*/; 67 67 char aux[80]; 68 68 char name[84]/*, name1[132]*/; … … 97 97 if(new_dns) 98 98 dnsid = dis_add_dns(extra_dns,0); 99 if(dnsid){} 99 100 /* 100 101 buf_sz = dim_get_write_buffer_size(); … … 120 121 t.c = 'a'; 121 122 t.f = (float)4.56; 122 ptr = (int *)&t;123 123 strcpy(t.str,"hello world"); 124 124 -
trunk/FACT++/dim/src/examples/test_server.cxx
r12757 r14698 57 57 public : 58 58 CmndServ() : DimCommand("TEST/CMND","C"), 59 servstr("TEST/STRVAL", "empty") {};59 servstr("TEST/STRVAL",(char *)"empty") {}; 60 60 /* 61 61 void handleIt() … … 88 88 89 89 abc = new DimService("TEST/INTVAL_CONST",(int &)ival); 90 if(abc){} 90 91 } 91 92 … … 95 96 96 97 abc = new DimService("TEST/STRINGVAL_CONST",(char *)s1.c_str()); 98 if(abc){} 97 99 } 98 100 … … 136 138 137 139 DimServer::start("TEST"); 138 extraDns = DimUtil::getEnvVar( "EXTRA_DNS_NODE");140 extraDns = DimUtil::getEnvVar((char *)"EXTRA_DNS_NODE"); 139 141 if(extraDns) 140 newDns = new DimServerDns(extraDns, 0, "new_TEST");142 newDns = new DimServerDns(extraDns, 0, (char *)"new_TEST"); 141 143 142 144 /* … … 163 165 CmndServ cmdsvr; 164 166 165 testServ = new ServWithHandler("MY_NEW_TEST_SERVICE_WITH_HANDLER"); 167 testServ = new ServWithHandler((char *)"MY_NEW_TEST_SERVICE_WITH_HANDLER"); 168 if(testServ){} 166 169 167 170 // farr[0] = 1.2; -
trunk/FACT++/dim/src/util/check_dim_servers.cxx
r11071 r14698 58 58 strcat(serviceName,"/VERSION_NUMBER"); 59 59 srvptr = new DimVersion(serviceName, index); 60 if(srvptr){} 60 61 // cout << "found " << server << " " << node << endl; 61 62 index++;
Note:
See TracChangeset
for help on using the changeset viewer.