rem: fprintf(reply_file, "Invalid q format\n"); fclose(reply_file);
add: fifo_reply(response_file, "Invalid q format\n");
context: static int ul_add(FILE* pipe, char* response_file){	FILE* reply_file;	char table_s[MAX_TABLE];	char user_s[MAX_USER];	char contact_s[MAX_CONTACT];	char expires_s[MAX_EXPIRES];	char q_s[MAX_Q];	int tlen;	udomain_t* d;	float q_f;	int exp_i;	str table, user, contact, expires, q;	if (!read_line(table_s, MAX_TABLE, pipe, &tlen) || tlen == 0) {		fifo_reply(response_file,			"ERROR: ul_add: table name expected\n");		LOG(L_ERR, "ERROR: ul_add: table name expected\n");		return -1;	}		if (!read_line(user_s, MAX_USER, pipe, &tlen) || tlen == 0) {		fifo_reply(response_file,			"ERROR: ul_add: aor name expected\n");		LOG(L_ERR, "ERROR: ul_add: aor expected\n");		return -1;	}		if (!read_line(contact_s, MAX_CONTACT, pipe, &tlen) || tlen == 0) {		fifo_reply(response_file,			"ERROR: ul_add: contact expected\n");		LOG(L_ERR, "ERROR: ul_add: contact expected\n");		return -1;	}		if (!read_line(expires_s, MAX_EXPIRES, pipe, &tlen) || tlen == 0) {		fifo_reply(response_file,			"ERROR: ul_add: expires expected\n");		LOG(L_ERR, "ERROR: ul_add: expires expected\n");		return -1;	}		if (!read_line(q_s, MAX_Q, pipe, &tlen) || tlen == 0) {		fifo_reply(response_file,			"ERROR: ul_add: q expected\n");		LOG(L_ERR, "ERROR: ul_add: q expected\n");		return -1;	}		table.s = table_s;	table.len = strlen(table_s);	user.s = user_s;	user.len = strlen(user_s);		contact.s = contact_s;	contact.len = strlen(contact_s);	expires.s = expires_s;	expires.len = strlen(expires_s);	q.s = q_s;	q.len = strlen(q_s);		find_domain(&table, &d);	reply_file=open_reply_pipe(response_file);	if (reply_file==0) {		LOG(L_ERR, "ERROR: ul_add: file not opened\n");		return -1;	}	if (d) {		if (atoi(&expires, &exp_i) < 0) {			fprintf(reply_file, "Invalid expires format\n");			fclose(reply_file);			return -1;		}		if (atof(&q, &q_f) < 0) {			fprintf(reply_file, "Invalid q format\n");			fclose(reply_file);			return -1;		}		lock_udomain(d);		if (add_contact(d, &user, &contact, exp_i, q_f) < 0) {			LOG(L_ERR, "ul_add(): Error while adding contact (\'%.*s\',\'%.*s\') in table \'%.*s\'\n",			    user.len, user.s, contact.len, contact.s, table.len, table.s);			fprintf(reply_file, "Error while adding contact (\'%.*s\',\'%.*s\') in table \'%.*s\'\n",				user.len, user.s, contact.len, contact.s, table.len, table.s);			fclose(reply_file);			unlock_udomain(d);			return -1;		}		unlock_udomain(d);				fprintf(reply_file, "(\'%.*s\',\'%.*s\') Added to table \'%.*s\'\n",			user.len, user.s, contact.len, contact.s, table.len, table.s);		fclose(reply_file);		return 1;	} else {		fprintf(reply_file, "Table \'%.*s\' not found\n", table.len, table.s);		fclose(reply_file);		return -1;	}}