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

Definition at line 1779 of file did.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.

1780 {
1781 Widget id, sel_id;
1782 char *str, *pstr;
1783 void recv_service_info();
1784 void did_prepare_command();
1785 void show_servers();
1786 
1787 /*
1788  if(tag == 5)
1789  {
1790  id = (Widget)XmSelectionBoxGetChild(w,XmDIALOG_TEXT);
1791  str = (char *)XmTextGetString(id);
1792  if(!str[0])
1793  {
1794  XtFree(str);
1795  return;
1796  }
1797  if( ( fptr = fopen( str, "w" ) ) == (FILE *)0 )
1798  {
1799  printf("Cannot open: %s for writing\n",str);
1800  return;
1801  }
1802  ptr = &Curr_servp->server;
1803  if (ptr->pid > 0x1000000)
1804  fprintf(fptr,"Server %s (pid = %X) on node %s\n provides %d services :\n",
1805  Curr_servp->name, ptr->pid, ptr->node, ptr->n_services);
1806  else
1807  fprintf(fptr,"Server %s (pid = %d) on node %s\n provides %d services :\n",
1808  Curr_servp->name, ptr->pid, ptr->node, ptr->n_services);
1809  service_ptr = Curr_servp->service_ptr;
1810  for(i=0;i<ptr->n_services; i++)
1811  {
1812  sprintf(str,service_ptr->name);
1813  fprintf(fptr," %s\n",service_ptr->name);
1814  service_ptr++;
1815  }
1816  fclose(fptr);
1817  XtFree(str);
1818  return;
1819  }
1820  if(tag == 4)
1821  {
1822  sel_id = put_selection(4, "Printing...");
1823  id = (Widget)XmSelectionBoxGetChild(sel_id,XmDIALOG_HELP_BUTTON);
1824  XtUnmanageChild(id);
1825 
1826  id = (Widget)XmSelectionBoxGetChild(sel_id,XmDIALOG_APPLY_BUTTON);
1827  XtUnmanageChild(id);
1828  id = (Widget)XmSelectionBoxGetChild(sel_id,XmDIALOG_TEXT);
1829  str = (char *)XmTextGetString(id);
1830  if(!str[0])
1831  {
1832  XtFree(str);
1833  return;
1834  }
1835  ptr = &Curr_servp->server;
1836  if(pstr = strrchr(str,']'))
1837  *(++pstr) = '\0';
1838  if(pstr = strrchr(str,'/'))
1839  *(++pstr) = '\0';
1840  sprintf(txt_str,"%s%s.TXT",str,Curr_servp->name);
1841  XtFree(str);
1842  XmTextSetString(id, txt_str);
1843  return;
1844  }
1845 */
1846  if(reason){}
1847  if(tag == DID_KILL_ALL)
1848  {
1849  dic_cmnd_service("DIS_DNS/KILL_SERVERS",0,0);
1850  return;
1851  }
1852  id = XmSelectionBoxGetChild(w,XmDIALOG_TEXT);
1853  str = XmTextGetString(id);
1854  if(!str[0])
1855  {
1856  XtFree(str);
1857  return;
1858  }
1859  if ((tag == DID_SEL_NODE) || (tag == DID_SEL_SERVICE))
1860  {
1861  strcpy(Curr_view_opt_par, str);
1862  show_servers();
1863  XtFree(str);
1864  }
1865  if(tag == DID_SERVICES)
1866  {
1867  pstr = strchr(str,' ');
1868  if(!pstr)
1869  {
1870  strcpy(Curr_service_name, str);
1871  strcpy(str,"SVC");
1872  }
1873  else
1874  {
1875  pstr++;
1876  strcpy(Curr_service_name, pstr);
1877  }
1878  if(Curr_service_id)
1879  {
1881  Curr_service_id = 0;
1882  }
1883  if(str[0] == 'S')
1884  {
1885  /*
1886  if((!strstr(pstr,"/SERVICE_LIST")) &&
1887  (!strstr(pstr,"/CLIENT_LIST")) &&
1888  (!strstr(pstr,"/SERVER_LIST")))
1889  {
1890  Curr_service_id = dic_info_service(Curr_service_name,
1891  MONITORED,5,0,0,
1892  recv_service_info,0,
1893  &no_link_int,4);
1894  }
1895  else
1896  {
1897  */
1899  ONCE_ONLY,10,0,0,
1901  &no_link_int,4);
1902  /*
1903  }
1904  */
1905  put_selection(DID_SERVICE,"Service Contents");
1906  }
1907  else
1908  {
1910  sel_id = put_selection(DID_COMMAND,"Send Command");
1911  id = XmSelectionBoxGetChild(sel_id,XmDIALOG_HELP_BUTTON);
1912  XtUnmanageChild(id);
1913  id = XmSelectionBoxGetChild(sel_id,XmDIALOG_APPLY_BUTTON);
1914  XtUnmanageChild(id);
1915  id = XmSelectionBoxGetChild(sel_id,XmDIALOG_LIST);
1916  /*
1917  XtUnmanageChild(id);
1918  */
1919  XtUnmapWidget(id);
1920  }
1921  XtFree(str);
1922  }
1923  if(tag == DID_COMMAND)
1924  {
1925  did_prepare_command(str);
1926  XtFree(str);
1927  }
1928 }
char Curr_service_name[132]
Definition: did.c:12
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
Widget put_selection(int tag, char *title)
Definition: did.c:3115
void get_service_format()
Definition: did.c:1133
char str[80]
Definition: test_client.c:7
void recv_service_info(int *tag, int *buffer, int *size)
Definition: did.c:1176
char id[4]
Definition: FITS.h:71
int dic_cmnd_service(char *serv_name, void *serv_address, int serv_size)
Definition: dic.c:694
char Curr_view_opt_par[80]
Definition: did.c:11
void did_prepare_command(char *str)
Definition: did.c:1964
int no_link_int
Definition: did.c:17
#define ONCE_ONLY
Definition: dim_common.h:7
void dic_release_service(unsigned service_id)
Definition: dic.c:1025
int Curr_service_id
Definition: did.c:25
void show_servers()
Definition: did.c:2441

+ Here is the call graph for this function: