IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 7, 2005, 3:33:56 PM (21 years ago)
Author:
jhoblitt
Message:

add nebFind() src

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Nebulous/nebclient/src/nebclient.c

    r4507 r4508  
    44 * Copyright (C) 2005  Joshua Hoblitt
    55 *
    6  * $Id: nebclient.c,v 1.13 2005-07-07 22:57:40 jhoblitt Exp $
     6 * $Id: nebclient.c,v 1.14 2005-07-08 01:33:56 jhoblitt Exp $
    77 */
    88
     
    213213}
    214214
    215 int nebFind(nebServer *server, const char *key)
    216 {
    217 
    218     return 0;
     215char *nebFind(nebServer *server, const char *key)
     216{
     217    char            **locations;
     218    char            *filename;
     219   
     220    if (nebFindInstances(server, (char *)key, NULL, &locations) < 0) {
     221        nebSetErr(server, "no instances found");
     222
     223        return NULL;
     224    }
     225
     226    if (!nebParseURI(locations[0], &filename)) {
     227        nebSetErr(server, "can not parse URI");
     228        nebFree(locations);
     229
     230        return NULL;
     231    }
     232
     233    nebFree(locations);
     234
     235    return filename;
    219236}
    220237
Note: See TracChangeset for help on using the changeset viewer.