add: rpid_avp.len = strlen(rpid_avp.s);
context: static int mod_init(void){	load_tm_f  load_tm;	int ver, i;	unsigned int par;	DBG("lcr - initializing\n");	/* import the TM auto-loading function */	if (!(load_tm = (load_tm_f)find_export("load_tm", NO_SCRIPT, 0))) {	    LOG(L_ERR, "ERROR: lcr:mod_init(): cannot import load_tm\n");		goto err;	}	/* let the auto-loading function load all TM stuff */	if (load_tm(&tmb) == -1) goto err;	/* Bind database */	if (lcr_db_bind(db_url.s)) {		LOG(L_ERR, "ERROR: lcr:mod_init(): No database module found\n");		return -1;	}	/* Update length of module variables */	db_url.len = strlen(db_url.s);        gw_table.len = strlen(gw_table.s);	gw_name_col.len = strlen(gw_name_col.s);	ip_addr_col.len = strlen(ip_addr_col.s);	port_col.len = strlen(port_col.s);        grp_id_col.len = strlen(grp_id_col.s);        lcr_table.len = strlen(lcr_table.s);	prefix_col.len = strlen(prefix_col.s);	from_uri_col.len = strlen(from_uri_col.s);        priority_col.len = strlen(priority_col.s);	gw_addr_port_avp.len = strlen(gw_addr_port_avp.s);	contact_avp.len = strlen(contact_avp.s);	inv_timer_avp.len = strlen(inv_timer_avp.s);	/* Check table version */	ver = lcr_db_ver(db_url.s, &gw_table);	if (ver < 0) {		LOG(L_ERR, "ERROR: lcr:mod_init():"				" Error while querying table version\n");		goto err;	} else if (ver < GW_TABLE_VERSION) {		LOG(L_ERR, "ERROR: lcr:mod_init(): Invalid table version"				" of gw table\n");		goto err;	}			/* Check table version */	ver = lcr_db_ver(db_url.s, &lcr_table);	if (ver < 0) {		LOG(L_ERR, "ERROR: lcr:mod_init():"				" Error while querying table version\n");		goto err;	} else if (ver < LCR_TABLE_VERSION) {		LOG(L_ERR, "ERROR: lcr:mod_init(): Invalid table version of"				" lcr table (use ser_mysql.sh reinstall)\n");		goto err;	}				/* Initialize fifo interface */	(void)init_lcr_fifo();	/* Initializing gw tables and gw table pointer variable */	gws_1 = (struct gw_info *)shm_malloc(sizeof(struct gw_info) * (MAX_NO_OF_GWS + 1));	if (gws_1 == 0) {	    LOG(L_ERR, "ERROR: lcr: mod_init(): "		"No memory for gw table\n");	    goto err;	}	gws_2 = (struct gw_info *)shm_malloc(sizeof(struct gw_info) * (MAX_NO_OF_GWS + 1));	if (gws_2 == 0) {	    LOG(L_ERR, "ERROR: lcr: mod_init(): "		"No memory for gw table\n");	    goto err;	}	for (i = 0; i < MAX_NO_OF_GWS + 1; i++) {		gws_1[i].ip_addr = gws_2[i].ip_addr = 0;	}	gws = (struct gw_info **)shm_malloc(sizeof(struct gw_info *));	*gws = gws_1;	/* First reload */        if (reload_gws() == -1) {		LOG(L_CRIT, "ERROR: lcr:mod_init():"		    " failed to reload gateways\n");		goto err;	}	/* Assign parameter names */	if (str2int(&gw_addr_port_avp, &par) == 0) {	    addr_port_name.n = par;	    gw_ap_avp_name_str = 0;	} else {	    addr_port_name.s = &gw_addr_port_avp;	    gw_ap_avp_name_str = AVP_NAME_STR;	}	if (str2int(&contact_avp, &par) == 0) {	    contact_name.n = par;	    contact_avp_name_str = 0;	} else {	    contact_name.s = &contact_avp;	    contact_avp_name_str = AVP_NAME_STR;	}	inv_timer_name.s = &inv_timer_avp;	return 0;err:	return -1;}