The socket is not supposed to be NULL at that point.
BSOCK::recv (this=0x0) at bsock.c:795
in cram_md5_respond (bs=0x0, password=0x7f0961a939c8 "
336e56dd67724e551c983a1c50c1f51f", tls_remote_need=<value optimized out>, compatible=0x7f09a53e0a68) at cram-md5.c:155
in authenticate_storage_daemon (jcr=0x1469218, store=0x7f0961a93a28) at authenticate.c:98
in connect_to_storage_daemon (jcr=0x1469218, retry_interval=10, max_retry_time=1800, verbose=1) at msgchan.c:133
in do_backup (jcr=0x1469218) at backup.c:498
int compatible = true;
bool auth_success = false;
+ if (!sd) {
+ Dmsg0(dbglvl, "Invalid bsock\n");
+ return false;
+ }
+
/*
* Send my name to the Storage daemon then do authentication
*/
sd->set_source_address(director->DIRsrc_addr);
if (!sd->connect(jcr, retry_interval, max_retry_time, heart_beat, _("Storage daemon"),
store->address, NULL, store->SDport, verbose)) {
+
+ if (!jcr->store_bsock) { /* The bsock was locally created, so we free it here */
+ free_bsock(sd);
+ }
sd = NULL;
}
char host[MAXSTRING];
uint8_t hmac[20];
+ if (!bs) {
+ Dmsg0(dbglvl, "Invalid bsock\n");
+ return false;
+ }
+
gettimeofday(&t1, &tz);
for (i=0; i<4; i++) {
gettimeofday(&t2, &tz);
char chal[MAXSTRING];
uint8_t hmac[20];
+ if (!bs) {
+ Dmsg0(dbglvl, "Invalid bsock\n");
+ return false;
+ }
+
*compatible = false;
if (bs->recv() <= 0) {
bmicrosleep(5, 0);