diff --git a/cv6/a_station.c b/cv6/a_station.c index a1cea9f..8baf409 100644 --- a/cv6/a_station.c +++ b/cv6/a_station.c @@ -27,7 +27,12 @@ void destroy_station(struct station* station){ } int select_track(struct station* station, const char* target){ - return 0; + unsigned long hash = 5381; + int c; + while (c = *str++) + hash = ((hash << 5) + hash) + c; + + return hash; } void add_target_capacity(struct station* station,const char* target, int capacity){