summaryrefslogtreecommitdiff
path: root/src/coordinator.c
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2015-06-11 20:59:00 +0200
committerAndreas Baumann <abaumann@yahoo.com>2015-06-11 20:59:00 +0200
commitc86834d40fa6b07828b10e2c6d8d2c6bd35fe116 (patch)
treeafca67b9f4287e07c12e076a96f359e0210edf6f /src/coordinator.c
parent365d5c59d76831b7ec0d6c3ebe49ef1e3793ac7c (diff)
downloadbiruda-c86834d40fa6b07828b10e2c6d8d2c6bd35fe116.tar.gz
biruda-c86834d40fa6b07828b10e2c6d8d2c6bd35fe116.tar.bz2
replaced gethostname on Windows with GetComputerNameEx
Diffstat (limited to 'src/coordinator.c')
-rw-r--r--src/coordinator.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/coordinator.c b/src/coordinator.c
index 356a402..c74c822 100644
--- a/src/coordinator.c
+++ b/src/coordinator.c
@@ -42,7 +42,7 @@ static char *create_worker_started_answer( const char *name, bool worker_found )
* or additionally the MAC of the first interface or hostid?)
*/
char hostname[100];
- gethostname( hostname, sizeof( hostname ) );
+ system_hostname( hostname, sizeof( hostname ) );
json_object *host = json_object_new_string( hostname );
json_object_object_add( obj, "host", host );
@@ -75,7 +75,7 @@ static char *create_worker_stopped_answer( const char *name, bool worker_found )
* or additionally the MAC of the first interface or hostid?)
*/
char hostname[100];
- gethostname( hostname, sizeof( hostname ) );
+ system_hostname( hostname, sizeof( hostname ) );
json_object *host = json_object_new_string( hostname );
json_object_object_add( obj, "host", host );
@@ -108,7 +108,7 @@ static char *create_register_answer( )
* or additionally the MAC of the first interface or hostid?)
*/
char hostname[100];
- gethostname( hostname, sizeof( hostname ) );
+ system_hostname( hostname, sizeof( hostname ) );
json_object *host = json_object_new_string( hostname );
json_object_object_add( obj, "host", host );