function hosting_server_ip_allocate in Hosting 6.2
Same name and namespace in other branches
- 7.4 server/hosting.ip.inc \hosting_server_ip_allocate()
- 7.3 server/hosting.ip.inc \hosting_server_ip_allocate()
Allocate a single IP for a single server.
XXX: this should be in the 'server' class (which doesn't exist yet) or at least in the services class
1 call to hosting_server_ip_allocate()
- hosting_ip_allocate in server/hosting.ip.inc 
- Allocate an IP for a given site on a given server.
File
- server/hosting.ip.inc, line 159 
- General IP address CRUD routines.
Code
function hosting_server_ip_allocate($server) {
  // guess the next available IP
  return db_result(db_query("SELECT hosting_ip_addresses.id FROM {hosting_ip_addresses}\n                             LEFT JOIN {hosting_ssl_cert_ips} ON hosting_ip_addresses.id = hosting_ssl_cert_ips.ip_address\n                             WHERE hosting_ssl_cert_ips.ip_address IS NULL AND nid = %d LIMIT 1;", $server));
}