From: Wilfried Göesgens Date: Sat, 27 Feb 2010 12:46:22 +0000 (+0000) Subject: * Hail X-Macros! use typed enums instead of plain strings to generate our keys X-Git-Tag: v7.86~367 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=ab2d9f2ef2301ed0beea38aae35713921c0a2f38;p=citadel.git * Hail X-Macros! use typed enums instead of plain strings to generate our keys --- diff --git a/citadel/modules/network/serv_network.c b/citadel/modules/network/serv_network.c index db178a4b2..6e053c961 100644 --- a/citadel/modules/network/serv_network.c +++ b/citadel/modules/network/serv_network.c @@ -939,31 +939,31 @@ int read_spoolcontrol_file(SpoolControl **scc, char *filename) buf[strlen(buf)-1] = 0; extract_token(instr, buf, 0, '|', sizeof instr); - if (!strcasecmp(instr, "lastsent")) { + if (!strcasecmp(instr, strof(lastsent))) { sc->lastsent = extract_long(buf, 1); } - else if (!strcasecmp(instr, "listrecp")) { + else if (!strcasecmp(instr, strof(listrecp))) { nptr = (namelist *) malloc(sizeof(namelist)); nptr->next = sc->listrecps; extract_token(nptr->name, buf, 1, '|', sizeof nptr->name); sc->listrecps = nptr; } - else if (!strcasecmp(instr, "participate")) { + else if (!strcasecmp(instr, strof(participate))) { nptr = (namelist *) malloc(sizeof(namelist)); nptr->next = sc->participates; extract_token(nptr->name, buf, 1, '|', sizeof nptr->name); sc->participates = nptr; } - else if (!strcasecmp(instr, "digestrecp")) { + else if (!strcasecmp(instr, strof(digestrecp))) { nptr = (namelist *) malloc(sizeof(namelist)); nptr->next = sc->digestrecps; extract_token(nptr->name, buf, 1, '|', sizeof nptr->name); sc->digestrecps = nptr; } - else if (!strcasecmp(instr, "ignet_push_share")) { + else if (!strcasecmp(instr, strof(ignet_push_share))) { extract_token(nodename, buf, 1, '|', sizeof nodename); extract_token(roomname, buf, 2, '|', sizeof roomname); mptr = (maplist *) malloc(sizeof(maplist)); @@ -978,12 +978,12 @@ int read_spoolcontrol_file(SpoolControl **scc, char *filename) * timestamps. */ skipthisline = 0; - if (!strncasecmp(buf, "subpending|", 11)) { + if (!strncasecmp(buf, strof(subpending)"|", 11)) { if (time(NULL) - extract_long(buf, 4) > EXP) { skipthisline = 1; } } - if (!strncasecmp(buf, "unsubpending|", 13)) { + if (!strncasecmp(buf, strof(unsubpending)"|", 13)) { if (time(NULL) - extract_long(buf, 3) > EXP) { skipthisline = 1; }