Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In gpiSaveDiskProfile we save client sex as follows: if(profile->cache->sex == GP_MALE) fprintf(fp, "sex=Male\n"); if(profile->cache->sex == GP_FEMALE) fprintf(fp, "sex=Female\n"); if(profile->cache->sex == GP_PAT) fprintf(fp, "sex=Pat\n"); So to load client sex correctly we should inspect values at zero index: if(strcmp(key, "sex") == 0) { if(toupper(value[0]) == 'M') infoCache.sex = GP_MALE; else if(toupper(value[0]) == 'F') infoCache.sex = GP_FEMALE; else // Assume Pat, not safe, but still. infoCache.sex = GP_PAT; }
- Loading branch information