Project

General

Profile

« Previous | Next » 

Revision 9859b2b5

Added by Darren Embry about 13 years ago

minor changes

- aggh hard tab in a string
- aggh brackets in case clauses

View differences:

etc/inc/vslb.inc
131 131
	$ret = "";
132 132
	$ret .=  "{$actions_a[$action]['direction']} {$actions_a[$action]['type']} {$actions_a[$action]['action']}";
133 133
	switch($actions_a[$action]['action']) {
134
	case 'append': {
134
	case 'append':
135 135
		$ret .= " \"{$actions_a[$action]['options']['value']}\" to \"{$actions_a[$action]['options']['akey']}\"";
136 136
		break;
137
	}
138
	case 'change': {
137
	case 'change':
139 138
		$ret .= " \"{$actions_a[$action]['options']['akey']}\" to \"{$actions_a[$action]['options']['value']}\"";
140 139
		break;
141
	}
142
	case 'expect': {
140
	case 'expect':
143 141
		$ret .= " \"{$actions_a[$action]['options']['value']}\" from \"{$actions_a[$action]['options']['akey']}\"";
144 142
		break;
145
	}
146
	case 'filter': {
143
	case 'filter':
147 144
		$ret .= " \"{$actions_a[$action]['options']['value']}\" from \"{$actions_a[$action]['options']['akey']}\"";
148 145
		break;
149
	}
150
	case 'hash': {
146
	case 'hash':
151 147
		$ret .= " \"{$actions_a[$action]['options']['akey']}\"";
152 148
		break;
153
	}
154
	case 'log': {
149
	case 'log':
155 150
		$ret .= " \"{$actions_a[$action]['options']['akey']}\"";
156 151
		break;
157 152
	}
158
	}
159 153
	return $ret;
160 154
}
161 155

  
......
171 165

  
172 166
	foreach ((array)$config['load_balancer']['monitor_type'] as $type) {
173 167
		switch($type['type']) {
174
		case 'icmp': {
168
		case 'icmp':
175 169
			$mon = new ICMPMonitor($type['options']);
176 170
			break;
177
		}
178
		case 'tcp': {
171
		case 'tcp':
179 172
			$mon = new TCPMonitor($type['options']);
180 173
			break;
181
		}
182
		case 'http': {
174
		case 'http':
183 175
			$mon = new HTTPMonitor($type['options']);
184 176
			break;
185
		}
186
		case 'https': {
177
		case 'https':
187 178
			$mon = new HTTPSMonitor($type['options']);
188 179
			break;
189
		}
190
		case 'send': {
180
		case 'send':
191 181
			$mon = new SendMonitor($type['options']);
192 182
			break;
193 183
		}
194
		}
195 184
		if($mon) {
196 185
			$check_a[$type['name']] = $mon->p();
197 186
		}
......
255 244
//  }
256 245

  
257 246
	$conf .= "dns protocol \"dnsproto\" {\n";
258
	$conf .= "	tcp { nodelay, sack, socket buffer 1024, backlog 1000 }\n";
247
	$conf .= "\ttcp { nodelay, sack, socket buffer 1024, backlog 1000 }\n";
259 248
	$conf .= "}\n";
260 249

  
261 250
	if(is_array($vs_a)) {
......
408 397
		switch (trim($t[1])) {
409 398
			case "table":
410 399
				$curpool=trim($t[2]);
411
			break;
400
				break;
412 401
			case "host":
413 402
				$curhost=trim($t[2]);
414 403
				$relay_hosts[$curpool][$curhost]['avail']=trim($t[3]);
415 404
				$relay_hosts[$curpool][$curhost]['state']=trim($t[4]);
416
			break;
405
				break;
417 406
		}
418 407
	}
419 408
	return $relay_hosts;

Also available in: Unified diff