FACT++  1.0
void ok_pop_up ( Widget  w,
long  tag,
unsigned long *  reason 
)

Definition at line 1751 of file didMarkus.c.

References Curr_service_id, Curr_service_name, Curr_view_opt_par, dic_cmnd_service(), dic_info_service_stamped(), dic_release_service(), DID_COMMAND, DID_KILL_ALL, did_prepare_command(), DID_SEL_NODE, DID_SEL_SERVICE, DID_SERVICE, DID_SERVICES, get_service_format(), id, no_link_int, ONCE_ONLY, put_selection(), recv_service_info(), show_servers(), and str.

1752 {
1753 Widget id, sel_id;
1754 char *str, *pstr;
1755 void recv_service_info();
1756 void did_prepare_command();
1757 void show_servers();
1758 
1759 /*
1760  if(tag == 5)
1761  {
1762  id = (Widget)XmSelectionBoxGetChild(w,XmDIALOG_TEXT);
1763  str = (char *)XmTextGetString(id);
1764  if(!str[0])
1765  {
1766  XtFree(str);
1767  return;
1768  }
1769  if( ( fptr = fopen( str, "w" ) ) == (FILE *)0 )
1770  {
1771  printf("Cannot open: %s for writing\n",str);
1772  return;
1773  }
1774  ptr = &Curr_servp->server;
1775  if (ptr->pid > 0x1000000)
1776  fprintf(fptr,"Server %s (pid = %X) on node %s\n provides %d services :\n",
1777  Curr_servp->name, ptr->pid, ptr->node, ptr->n_services);
1778  else
1779  fprintf(fptr,"Server %s (pid = %d) on node %s\n provides %d services :\n",
1780  Curr_servp->name, ptr->pid, ptr->node, ptr->n_services);
1781  service_ptr = Curr_servp->service_ptr;
1782  for(i=0;i<ptr->n_services; i++)
1783  {
1784  sprintf(str,service_ptr->name);
1785  fprintf(fptr," %s\n",service_ptr->name);
1786  service_ptr++;
1787  }
1788  fclose(fptr);
1789  XtFree(str);
1790  return;
1791  }
1792  if(tag == 4)
1793  {
1794  sel_id = put_selection(4, "Printing...");
1795  id = (Widget)XmSelectionBoxGetChild(sel_id,XmDIALOG_HELP_BUTTON);
1796  XtUnmanageChild(id);
1797 
1798  id = (Widget)XmSelectionBoxGetChild(sel_id,XmDIALOG_APPLY_BUTTON);
1799  XtUnmanageChild(id);
1800  id = (Widget)XmSelectionBoxGetChild(sel_id,XmDIALOG_TEXT);
1801  str = (char *)XmTextGetString(id);
1802  if(!str[0])
1803  {
1804  XtFree(str);
1805  return;
1806  }
1807  ptr = &Curr_servp->server;
1808  if(pstr = strrchr(str,']'))
1809  *(++pstr) = '\0';
1810  if(pstr = strrchr(str,'/'))
1811  *(++pstr) = '\0';
1812  sprintf(txt_str,"%s%s.TXT",str,Curr_servp->name);
1813  XtFree(str);
1814  XmTextSetString(id, txt_str);
1815  return;
1816  }
1817 */
1818  if(reason){}
1819  if(tag == DID_KILL_ALL)
1820  {
1821  dic_cmnd_service("DIS_DNS/KILL_SERVERS",0,0);
1822  return;
1823  }
1824  id = XmSelectionBoxGetChild(w,XmDIALOG_TEXT);
1825  str = XmTextGetString(id);
1826  if(!str[0])
1827  {
1828  XtFree(str);
1829  return;
1830  }
1831  if ((tag == DID_SEL_NODE) || (tag == DID_SEL_SERVICE))
1832  {
1833  strcpy(Curr_view_opt_par, str);
1834  show_servers();
1835  XtFree(str);
1836  }
1837  if(tag == DID_SERVICES)
1838  {
1839  pstr = strchr(str,' ');
1840  if(!pstr)
1841  {
1842  strcpy(Curr_service_name, str);
1843  strcpy(str,"SVC");
1844  }
1845  else
1846  {
1847  pstr++;
1848  strcpy(Curr_service_name, pstr);
1849  }
1850  if(Curr_service_id)
1851  {
1853  Curr_service_id = 0;
1854  }
1855  if(str[0] == 'S')
1856  {
1857  /*
1858  if((!strstr(pstr,"/SERVICE_LIST")) &&
1859  (!strstr(pstr,"/CLIENT_LIST")) &&
1860  (!strstr(pstr,"/SERVER_LIST")))
1861  {
1862  Curr_service_id = dic_info_service(Curr_service_name,
1863  MONITORED,5,0,0,
1864  recv_service_info,0,
1865  &no_link_int,4);
1866  }
1867  else
1868  {
1869  */
1871  ONCE_ONLY,10,0,0,
1873  &no_link_int,4);
1874  /*
1875  }
1876  */
1877  put_selection(DID_SERVICE,"Service Contents");
1878  }
1879  else
1880  {
1882  sel_id = put_selection(DID_COMMAND,"Send Command");
1883  id = XmSelectionBoxGetChild(sel_id,XmDIALOG_HELP_BUTTON);
1884  XtUnmanageChild(id);
1885  id = XmSelectionBoxGetChild(sel_id,XmDIALOG_APPLY_BUTTON);
1886  XtUnmanageChild(id);
1887  id = XmSelectionBoxGetChild(sel_id,XmDIALOG_LIST);
1888  /*
1889  XtUnmanageChild(id);
1890  */
1891  XtUnmapWidget(id);
1892  }
1893  XtFree(str);
1894  }
1895  if(tag == DID_COMMAND)
1896  {
1897  did_prepare_command(str);
1898  XtFree(str);
1899  }
1900 }
unsigned dic_info_service_stamped(char *serv_name, int req_type, int req_timeout, void *serv_address, int serv_size, void(*usr_routine)(), dim_long tag, void *fill_addr, int fill_size)
Definition: dic.c:613
char Curr_view_opt_par[80]
Definition: didMarkus.c:11
void show_servers()
Definition: didMarkus.c:2402
int no_link_int
Definition: didMarkus.c:17
char str[80]
Definition: test_client.c:7
void did_prepare_command(char *str)
Definition: didMarkus.c:1936
char id[4]
Definition: FITS.h:71
void recv_service_info(int *tag, int *buffer, int *size)
Definition: didMarkus.c:1161
Widget put_selection(int tag, char *title)
Definition: didMarkus.c:3058
int dic_cmnd_service(char *serv_name, void *serv_address, int serv_size)
Definition: dic.c:694
int Curr_service_id
Definition: didMarkus.c:25
char Curr_service_name[132]
Definition: didMarkus.c:12
void get_service_format()
Definition: didMarkus.c:1118
#define ONCE_ONLY
Definition: dim_common.h:7
void dic_release_service(unsigned service_id)
Definition: dic.c:1025

+ Here is the call graph for this function: