static int setbwlimit_client(UAContext *ua, CLIENT *client, char *Job, int64_t limit)
{
+ POOL_MEM buf;
CLIENT *old_client;
char ed1[50];
if (!client) {
/* Try to connect for 15 seconds */
ua->send_msg(_("Connecting to Client %s at %s:%d\n"),
- client->name(), client->address(), client->FDport);
+ client->name(), client->address(buf.addr()), client->FDport);
if (!connect_to_file_daemon(ua->jcr, 1, 15, 0)) {
ua->error_msg(_("Failed to connect to Client.\n"));
goto bail_out;
}
/* MA Bug 6 remove ifdef */
sockaddr_to_ascii(&(ua->UA_sock->client_addr),
- sizeof(ua->UA_sock->client_addr), addr, sizeof(addr));
- client->setAddress(bstrdup(addr));
+ sizeof(ua->UA_sock->client_addr), addr, sizeof(addr));
+ client->setAddress(addr);
ua->send_msg(_("Client \"%s\" address set to %s\n"),
client->name(), addr);
get_out:
int64_t level, int trace, int hangup, int blowup,
char *options, char *tags)
{
+ POOL_MEM buf;
CLIENT *old_client;
BSOCK *fd;
ua->jcr->client = client;
/* Try to connect for 15 seconds */
ua->send_msg(_("Connecting to Client %s at %s:%d\n"),
- client->name(), client->address(), client->FDport);
+ client->name(), client->address(buf.addr()), client->FDport);
+
if (!connect_to_file_daemon(ua->jcr, 1, 15, 0)) {
ua->error_msg(_("Failed to connect to Client.\n"));
ua->jcr->client = old_client;
{
STORE *store, **unique_store;
CLIENT *client, **unique_client;
+ POOL_MEM buf1, buf2;
int i, j, found;
int64_t t=0;
while ((client = (CLIENT *)GetNextRes(R_CLIENT, (RES *)client))) {
found = 0;
for (j=0; j<i; j++) {
- if (strcmp(unique_client[j]->address(), client->address()) == 0 &&
+ if (strcmp(unique_client[j]->address(buf1.addr()), client->address(buf2.addr())) == 0 &&
unique_client[j]->FDport == client->FDport) {
found = 1;
break;
}
if (!found) {
unique_client[i++] = client;
- Dmsg2(140, "Stuffing: %s:%d\n", client->address(), client->FDport);
+ Dmsg2(140, "Stuffing: %s:%d\n", client->address(buf1.addr()), client->FDport);
}
}
UnlockRes();
JOB *job = NULL;
CLIENT *client = NULL;
FILESET *fileset = NULL;
+ POOL_MEM buf;
int listing = 0;
char since[MAXSTRING];
JCR *jcr = ua->jcr;
get_level_since_time(ua->jcr, since, sizeof(since));
ua->send_msg(_("Connecting to Client %s at %s:%d\n"),
- jcr->client->name(), jcr->client->address(), jcr->client->FDport);
+ jcr->client->name(), jcr->client->address(buf.addr()), jcr->client->FDport);
if (!connect_to_file_daemon(jcr, 1, 15, 0)) {
ua->error_msg(_("Failed to connect to Client.\n"));
return 1;