FACT++  1.0
char* update_smi_objects ( char *  node,
char *  server,
int  pid,
int  browser 
)

Definition at line 487 of file webDid.c.

References create_browser(), dic_info_service(), find_browser(), find_node(), find_server(), got_update_smi_objects(), bitem::isSMI, MAX_NAME, ONCE_ONLY, prepareJSONSmiObjectList(), sprintf(), and str.

Referenced by sendSmiData().

488 {
489  char str[MAX_NAME];
490  NODE *nodep;
491  SERVER *servp;
492  char *ptr = 0;
493  BROWSER *browserp;
494  char *prepareJSONSmiObjectList();
496 
497  if(!(browserp = find_browser(browser)))
498  {
499  browserp = create_browser(browser);
500  browserp->isSMI = 1;
501  }
502  if(server){}
503  sprintf(str,"%s/SERVICE_LIST",server);
504  dic_info_service(str,ONCE_ONLY,20,0,0,
505  got_update_smi_objects,(dim_long)browserp,"None",5);
506  if((nodep = find_node(node)))
507  {
508  if((servp = find_server(nodep, pid)))
509  {
510  ptr = prepareJSONSmiObjectList(servp, node, pid, browserp);
511  }
512  }
513  return ptr;
514 }
#define MAX_NAME
Definition: dim.h:182
Definition: dns.c:26
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 * prepareJSONSmiObjectList(SERVER *servp, char *node, int pid, BROWSER *browserp)
Definition: webDid.c:1923
Definition: did.h:42
char str[80]
Definition: test_client.c:7
void got_update_smi_objects(BROWSER **tag, char *buffer, int *size)
Definition: webDid.c:475
BROWSER * find_browser(int id)
Definition: webDid.c:253
long dim_long
Definition: dim_common.h:57
BROWSER * create_browser(int id)
Definition: webDid.c:663
SERVER * find_server(NODE *nodep, int pid)
Definition: webDid.c:157
int isSMI
Definition: webDid.c:81
#define ONCE_ONLY
Definition: dim_common.h:7
NODE * find_node(char *node)
Definition: webDid.c:174
sprintf(name1,"NewService%d", i)
Definition: webDid.c:61

+ Here is the call graph for this function:

+ Here is the caller graph for this function: