FACT++  1.0
void activate_services ( Widget  w,
SERVER servp,
unsigned long *  reason 
)

Definition at line 2718 of file didMarkus.c.

References create_str(), Curr_service_list_id, dic_info_service(), got_service_list(), id, kick_it(), MAX_NAME, DNS_SERVER_INFO::n_services, item::name, DNS_SERVER_INFO::node, ONCE_ONLY, DNS_SERVER_INFO::pid, item::pop_widget_id, put_popup(), item::server, set_something(), sprintf(), and str.

Referenced by create_button(), and put_popup().

2719 {
2720 DNS_SERVER_INFO *ptr;
2721 char str[MAX_NAME];
2722 Widget id,sel_id;
2723 void got_service_list();
2724 void kick_it();
2725 
2726  if(w){}
2727  if(reason){}
2728  if(servp->pop_widget_id[0])
2729  {
2730  XtDestroyWidget(servp->pop_widget_id[0]);
2731  servp->pop_widget_id[0] = 0;
2732  /*
2733  return;
2734  */
2735  }
2736  Curr_servp = servp;
2737  ptr = &servp->server;
2738 
2739  sel_id = put_popup(servp, 0,"Service Info");
2740 
2741  id = XmSelectionBoxGetChild(sel_id,XmDIALOG_OK_BUTTON);
2742  XtUnmanageChild(id);
2743 
2744  id = XmSelectionBoxGetChild(sel_id,XmDIALOG_LIST_LABEL);
2745  if (ptr->pid > 0x1000000)
2746  sprintf(str,"Server %s (pid = %X) on node %s\n\nprovides %d services :\n",
2747  servp->name, ptr->pid, ptr->node, ptr->n_services);
2748  else
2749  sprintf(str,"Server %s (pid = %d) on node %s\n\nprovides %d services :\n",
2750  servp->name, ptr->pid, ptr->node, ptr->n_services);
2751  set_something(sel_id,XmNlistLabelString,str);
2752 
2753  id = XmSelectionBoxGetChild(sel_id,XmDIALOG_LIST);
2755 
2756  XmListAddItem(id,create_str(
2757  "Ordering services alphabeticaly, please be patient..."),1);
2758 
2759  set_something(id,XmNlistItemCount,1);
2760  set_something(id,XmNlistVisibleItemCount,1);
2761 
2762  sprintf(str,"%s/SERVICE_LIST",/*ptr->task*/servp->name);
2763  dic_info_service(str,ONCE_ONLY,20,0,0,
2764  got_service_list,(long)servp,"None",5);
2765  /*
2766 #ifdef solaris
2767  */
2768  /*
2769  XtAppAddTimeOut(app_context, 1000, kick_it, 0);
2770  */
2771  /*
2772 #endif
2773  */
2774 }
#define MAX_NAME
Definition: dim.h:182
unsigned dic_info_service(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:601
void got_service_list(SERVER **servp_ptr, char *buffer, int *size)
Definition: didMarkus.c:2783
char str[80]
Definition: test_client.c:7
char node[MAX_NODE_NAME]
Definition: dim.h:338
char id[4]
Definition: FITS.h:71
char name[132]
Definition: did.h:46
Widget pop_widget_id[2]
Definition: did.h:48
void kick_it()
Definition: didMarkus.c:2776
Widget Curr_service_list_id
Definition: didMarkus.c:27
void set_something()
DNS_SERVER_INFO server
Definition: did.h:44
XmString create_str()
Widget put_popup(SERVER *servp, int type, char *title)
Definition: didMarkus.c:3028
int n_services
Definition: dim.h:341
#define ONCE_ONLY
Definition: dim_common.h:7
SERVER * Curr_servp
Definition: didMarkus.c:87
sprintf(name1,"NewService%d", i)

+ Here is the call graph for this function:

+ Here is the caller graph for this function: