Changeset 4354:ff37f8174ab1 in roaraudio


Ignore:
Timestamp:
09/14/10 03:35:10 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

test if server address is uniq

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/enumdev.c

    r4353 r4354  
    117117 char * servers[64]; 
    118118 size_t have = 1; 
    119  size_t i, cp; 
     119 size_t i, cp, unic; 
    120120 ssize_t r; 
    121121 int testflags = flags; 
     122 int is_uniq; 
    122123 
    123124 // load config: 
     
    149150  c->description = NULL; 
    150151  c->location = NULL; 
    151   if ( _test_server(c, flags) == 0 ) { 
     152 
     153  // uniq test: 
     154  is_uniq = 1; 
     155  for (unic = 0; unic < cp; unic++) 
     156   if ( !strcmp(ret[unic].server, servers[i]) ) 
     157    is_uniq = 0; 
     158 
     159  if ( is_uniq && _test_server(c, flags) == 0 ) { 
    152160   cp++; 
    153161  } else { 
Note: See TracChangeset for help on using the changeset viewer.