FACT++  1.0
int findSmiModeObj ( DNS_SERVICE_INFO serviceptr,
int  n_services,
char *  name 
)

Definition at line 2123 of file webDid.c.

References i, bitem::n_services, DNS_SERVICE_INFO::name, bitem::servicep, and DNS_SERVICE_INFO::status.

Referenced by findSmiServices().

2124 {
2125  int i;
2126  DNS_SERVICE_INFO *servicep;
2127  char mode_name[256], *ptr, *ptr1, *ptr2;
2128 
2129  servicep = serviceptr;
2130  strcpy(mode_name, name);
2131  ptr1 = mode_name;
2132  if((ptr = strstr(mode_name,"::")))
2133  {
2134  *ptr = '\0';
2135  ptr2 = ptr1;
2136  while((ptr1 = strchr(ptr1,'/')))
2137  {
2138  ptr1++;
2139  ptr2 = ptr1;
2140  }
2141  if(strcmp(ptr2, ptr+2))
2142  *ptr = ':';
2143  }
2144  strcat(mode_name,"_FWM");
2145 printf("Find SMI Mode %s %s\n",name, mode_name);
2146  for(i = 0; i < n_services; i++)
2147  {
2148  if(servicep->status == 3)
2149  {
2150  if(!strcmp(servicep->name, mode_name))
2151  {
2152 printf("Find SMI Mode index %s %s %d\n",mode_name, servicep->name, i);
2153  return i;
2154  }
2155  }
2156  servicep++;
2157  }
2158  return 0;
2159 }
int i
Definition: db_dim_client.c:21
char name[MAX_NAME]
Definition: dim.h:331
int status
Definition: dim.h:333

+ Here is the caller graph for this function: