-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
supports host name in addition to IP address
- Loading branch information
Showing
12 changed files
with
53 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,15 @@ | ||
#include <assert.h> | ||
#include "worker.h" | ||
#include "backend/pcmanager/priv.h" | ||
#include "errors.h" | ||
#include "sockaddr.h" | ||
|
||
static int updated_by_addr(worker_context_t *context, bool force); | ||
static int updated_by_host(worker_context_t *context, bool force); | ||
|
||
int worker_add_by_ip(worker_context_t *context) { | ||
return updated_by_addr(context, true); | ||
int worker_add_by_host(worker_context_t *context) { | ||
assert(context->arg1 != NULL); | ||
return updated_by_host(context, true); | ||
} | ||
|
||
int worker_host_discovered(worker_context_t *context) { | ||
return updated_by_addr(context, false); | ||
} | ||
|
||
int updated_by_addr(worker_context_t *context, bool force) { | ||
return pcmanager_update_by_addr(context, context->arg1, force); | ||
int updated_by_host(worker_context_t *context, bool force) { | ||
const host_t *host = context->arg1; | ||
return pcmanager_update_by_host(context, host_get_hostname(host), host_get_port(host), force); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule commons
updated
from a8c933 to c07290