Skip to content

Commit

Permalink
bsock: changed host parameter from char* to const char*
Browse files Browse the repository at this point in the history
  • Loading branch information
franku committed Oct 25, 2018
1 parent 7d5eb3a commit 573514d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions core/src/lib/bsock.h
Expand Up @@ -99,7 +99,7 @@ class BareosSocket : public SmartAlloc {

virtual void FinInit(JobControlRecord * jcr, int sockfd, const char *who, const char *host, int port,
struct sockaddr *lclient_addr) = 0;
virtual bool open(JobControlRecord *jcr, const char *name, char *host, char *service,
virtual bool open(JobControlRecord *jcr, const char *name, const char *host, char *service,
int port, utime_t heart_beat, int *fatal) = 0;

private:
Expand Down Expand Up @@ -131,7 +131,7 @@ class BareosSocket : public SmartAlloc {
utime_t max_retry_time,
utime_t heart_beat,
const char *name,
char *host,
const char *host,
char *service,
int port,
bool verbose) = 0;
Expand Down
4 changes: 2 additions & 2 deletions core/src/lib/bsock_tcp.cc
Expand Up @@ -100,7 +100,7 @@ BareosSocket *BareosSocketTCP::clone()
* this routine.
*/
bool BareosSocketTCP::connect(JobControlRecord * jcr, int retry_interval, utime_t max_retry_time,
utime_t heart_beat, const char *name, char *host,
utime_t heart_beat, const char *name, const char *host,
char *service, int port, bool verbose)
{
bool ok = false;
Expand Down Expand Up @@ -169,7 +169,7 @@ void BareosSocketTCP::FinInit(JobControlRecord * jcr, int sockfd, const char *wh
* Returns NULL
* Returns BareosSocket * pointer on success
*/
bool BareosSocketTCP::open(JobControlRecord *jcr, const char *name, char *host, char *service,
bool BareosSocketTCP::open(JobControlRecord *jcr, const char *name, const char *host, char *service,
int port, utime_t heart_beat, int *fatal)
{
int sockfd = -1;
Expand Down
4 changes: 2 additions & 2 deletions core/src/lib/bsock_tcp.h
Expand Up @@ -43,7 +43,7 @@ class BareosSocketTCP : public BareosSocket {
/* methods -- in bsock_tcp.c */
void FinInit(JobControlRecord * jcr, int sockfd, const char *who, const char *host, int port,
struct sockaddr *lclient_addr);
bool open(JobControlRecord *jcr, const char *name, char *host, char *service,
bool open(JobControlRecord *jcr, const char *name, const char *host, char *service,
int port, utime_t heart_beat, int *fatal);
bool SetKeepalive(JobControlRecord *jcr, int sockfd, bool enable, int keepalive_start, int keepalive_interval);
bool SendPacket(int32_t *hdr, int32_t pktsiz);
Expand All @@ -55,7 +55,7 @@ class BareosSocketTCP : public BareosSocket {
/* methods -- in bsock_tcp.c */
BareosSocket *clone();
bool connect(JobControlRecord * jcr, int retry_interval, utime_t max_retry_time,
utime_t heart_beat, const char *name, char *host,
utime_t heart_beat, const char *name, const char *host,
char *service, int port, bool verbose);
int32_t recv();
bool send();
Expand Down

0 comments on commit 573514d

Please sign in to comment.