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

Definition at line 2770 of file did.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().

2771 {
2772 DNS_SERVER_INFO *ptr;
2773 char str[MAX_NAME];
2774 Widget id,sel_id;
2775 void got_service_list();
2776 void kick_it();
2777 
2778  if(w){}
2779  if(reason){}
2780  if(servp->pop_widget_id[0])
2781  {
2782  XtDestroyWidget(servp->pop_widget_id[0]);
2783  servp->pop_widget_id[0] = 0;
2784  /*
2785  return;
2786  */
2787  }
2788  Curr_servp = servp;
2789  ptr = &servp->server;
2790 
2791  sel_id = put_popup(servp, 0,"Service Info");
2792 
2793  id = XmSelectionBoxGetChild(sel_id,XmDIALOG_OK_BUTTON);
2794  XtUnmanageChild(id);
2795 
2796  id = XmSelectionBoxGetChild(sel_id,XmDIALOG_LIST_LABEL);
2797  if (ptr->pid > 0x1000000)
2798  sprintf(str,"Server %s (pid = %X) on node %s\n\nprovides %d services :\n",
2799  servp->name, ptr->pid, ptr->node, ptr->n_services);
2800  else
2801  sprintf(str,"Server %s (pid = %d) on node %s\n\nprovides %d services :\n",
2802  servp->name, ptr->pid, ptr->node, ptr->n_services);
2803  set_something(sel_id,XmNlistLabelString,str);
2804 
2805  id = XmSelectionBoxGetChild(sel_id,XmDIALOG_LIST);
2807 
2808  XmListAddItem(id,create_str(
2809  "Ordering services alphabeticaly, please be patient..."),1);
2810 
2811  set_something(id,XmNlistItemCount,1);
2812  set_something(id,XmNlistVisibleItemCount,1);
2813 
2814  sprintf(str,"%s/SERVICE_LIST",/*ptr->task*/servp->name);
2815  dic_info_service(str,ONCE_ONLY,20,0,0,
2816  got_service_list,(long)servp,"None",5);
2817  /*
2818 #ifdef solaris
2819  */
2820  /*
2821  XtAppAddTimeOut(app_context, 1000, kick_it, 0);
2822  */
2823  /*
2824 #endif
2825  */
2826 }
#define MAX_NAME
Definition: dim.h:182
SERVER * Curr_servp
Definition: did.c:87
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
char str[80]
Definition: test_client.c:7
char node[MAX_NODE_NAME]
Definition: dim.h:338
Widget Curr_service_list_id
Definition: did.c:27
void got_service_list(SERVER **servp_ptr, char *buffer, int *size)
Definition: did.c:2835
char id[4]
Definition: FITS.h:71
Widget put_popup(SERVER *servp, int type, char *title)
Definition: did.c:3085
char name[132]
Definition: did.h:46
Widget pop_widget_id[2]
Definition: did.h:48
void set_something()
DNS_SERVER_INFO server
Definition: did.h:44
XmString create_str()
int n_services
Definition: dim.h:341
#define ONCE_ONLY
Definition: dim_common.h:7
void kick_it()
Definition: did.c:2828
sprintf(name1,"NewService%d", i)

+ Here is the call graph for this function:

+ Here is the caller graph for this function: