MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / parse_xcap_root

Function parse_xcap_root

modules/rls/rls.c:493–523  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

491}
492
493int parse_xcap_root(void)
494{
495 char* sep;
496 sep= strchr(xcap_root, ':');
497
498 if(sep)
499 {
500 char* sep2= NULL;
501 str port_str;
502
503 sep2= strchr(sep+ 1, '/');
504 if(!sep2)
505 sep2 = xcap_root + strlen(xcap_root);
506
507 port_str.s= sep+ 1;
508 port_str.len= sep2- port_str.s;
509
510 if(str2int(&port_str, &xcap_port)< 0)
511 {
512 LM_ERR("converting string to int [port]= %.*s\n",port_str.len,
513 port_str.s);
514 return -1;
515 }
516 if(xcap_port> 65535)
517 {
518 LM_ERR("wrong xcap server port\n");
519 return -1;
520 }
521 }
522 return 0;
523}
524
525/**
526 * Initialize children

Callers 1

mod_initFunction · 0.85

Calls 1

str2intFunction · 0.85

Tested by

no test coverage detected