MCPcopy Create free account
hub / github.com/3proxy/3proxy / parseconnusername

Function parseconnusername

src/common.c:314–328  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

312}
313
314int parseconnusername(char *username, struct clientparam *param, int extpasswd, unsigned short port){
315 char *sb, *se;
316 if(!username || !*username) return 1;
317 if ((sb=strchr(username, conf.delimchar)) == NULL){
318 if(!param->hostname && param->remsock == INVALID_SOCKET) return 2;
319 if(param->hostname)parsehostname((char *)param->hostname, param, port);
320 return parseusername(username, param, extpasswd);
321 }
322 while ((se=strchr(sb+1, conf.delimchar)))sb=se;
323 *(sb) = 0;
324 if(parseusername(username, param, extpasswd)) return 3;
325 *(sb) = conf.delimchar;
326 if(parsehostname(sb+1, param, port)) return 4;
327 return 0;
328}
329
330void clearstat(struct clientparam * param) {
331

Callers 4

proxychildFunction · 0.85
smtppchildFunction · 0.85
ftpprchildFunction · 0.85
pop3pchildFunction · 0.85

Calls 2

parsehostnameFunction · 0.85
parseusernameFunction · 0.85

Tested by

no test coverage detected