add: *p=':'; p++;
context: int global_init(){	load_tm_f  load_tm;	int        i, net_pipe[2], foo;	char       *p;	/* import the TM auto-loading function */	if ( !(load_tm=(load_tm_f)find_export("load_tm", NO_SCRIPT, 0))) {		LOG(L_ERR, "ERROR: sms: global_init: cannot import load_tm\n");		goto error;	}	/* let the auto-loading function load all TM stuff */	if (load_tm( &tmb )==-1) 		goto error;	/*fix domain lenght*/	if (domain_str) {		domain.s = domain_str;		domain.len = strlen(domain_str);	} else {		/*do I have to add port?*/		i = (sock_info[0].port_no_str.len && sock_info[0].port_no!=5060);		domain.len = sock_info[0].name.len + i*sock_info[0].port_no_str.len;		domain.s = (char*)pkg_malloc(domain.len);		if (!domain.s) {			LOG(L_ERR,"ERROR:sms_init_child: no free pkg memory!\n");			goto error;		}		p = domain.s;		memcpy(p,sock_info[0].name.s,sock_info[0].name.len);		p += sock_info[0].name.len;		if (i) {			memcpy(p,sock_info[0].port_no_str.s,sock_info[0].port_no_str.len);			p += sock_info[0].port_no_str.len;		}	}	/* creats pipes for networks */	for(i=0;i<nr_of_networks;i++)	{		/* create the pipe*/		if (pipe(net_pipe)==-1) {			LOG(L_ERR,"ERROR: sms_global_init: cannot create pipe!\n");			goto error;		}		networks[i].pipe_out = net_pipe[0];		net_pipes_in[i] = net_pipe[1];		/* sets reading from pipe to non blocking */		if ((foo=fcntl(net_pipe[0],F_GETFL,0))<0) {			LOG(L_ERR,"ERROR: sms_global_init: cannot get flag for pipe"				" - fcntl\n");			goto error;		}		foo |= O_NONBLOCK;		if (fcntl(net_pipe[0],F_SETFL,foo)<0) {			LOG(L_ERR,"ERROR: sms_global_init: cannot set flag for pipe"				" - fcntl\n");			goto error;		}	}	/* if report will be used, init the report queue */	if (sms_report_type!=NO_REPORT && !init_report_queue()) {		LOG(L_ERR,"ERROR: sms_global_init: cannot get shm memory!\n");		goto error;	}	/* alloc in shm for queued_msgs */	queued_msgs = (int*)shm_malloc(sizeof(int));	if (!queued_msgs) {		LOG(L_ERR,"ERROR: sms_global_init: cannot get shm memory!\n");		goto error;	}	*queued_msgs = 0;	return 1;error:	return -1;}