Line 0
Link Here
|
|
|
1 |
--- src/bbcp_Protocol.C.orig 2015-01-14 20:04:31 UTC |
2 |
+++ src/bbcp_Protocol.C |
3 |
@@ -86,7 +86,7 @@ int bbcp_Protocol::Schedule(bbcp_Node *Fnode, bbcp_Fil |
4 |
|
5 |
// Start-up the first node |
6 |
// |
7 |
- if (retc = Fnode->Run(Ffs->username, Ffs->hostname, Fcmd, Ftype)) |
8 |
+ if ((retc = Fnode->Run(Ffs->username, Ffs->hostname, Fcmd, Ftype))) |
9 |
return retc; |
10 |
|
11 |
// Determine additional options |
12 |
@@ -101,15 +101,15 @@ int bbcp_Protocol::Schedule(bbcp_Node *Fnode, bbcp_Fil |
13 |
|
14 |
// Send the arguments |
15 |
// |
16 |
- if (retc = SendArgs(Fnode, Ffs, (char *)"none", 0, addOpt[0])) return retc; |
17 |
+ if ((retc = SendArgs(Fnode, Ffs, (char *)"none", 0, addOpt[0]))) return retc; |
18 |
|
19 |
// Get the callback port from the first host |
20 |
// |
21 |
- if (retc = getCBPort(Fnode)) return retc; |
22 |
+ if ((retc = getCBPort(Fnode))) return retc; |
23 |
|
24 |
// Start the second node |
25 |
// |
26 |
- if (retc = Lnode->Run(Lfs->username, Lfs->hostname, Lcmd, Ltype)) |
27 |
+ if ((retc = Lnode->Run(Lfs->username, Lfs->hostname, Lcmd, Ltype))) |
28 |
return retc; |
29 |
|
30 |
// Compute callback hostname and reset callback port |
31 |
@@ -152,7 +152,7 @@ int bbcp_Protocol::getCBPort(bbcp_Node *Node) |
32 |
|
33 |
// The remote program should hve started, get the call back port |
34 |
// |
35 |
- if (wp = Node->GetLine()) |
36 |
+ if ((wp = Node->GetLine())) |
37 |
{if ((wp = Node->GetToken()) && !strcmp(wp, "200") |
38 |
&& (wp = Node->GetToken()) && !strcmp(wp, "Port:") |
39 |
&& (wp = Node->GetToken()) |
40 |
@@ -408,7 +408,7 @@ int bbcp_Protocol::Process_get() |
41 |
|
42 |
// Get the optional offset |
43 |
// |
44 |
- if (wp = Remote->GetToken()) |
45 |
+ if ((wp = Remote->GetToken())) |
46 |
{if (bbcp_Config.a2ll("file offset", wp, foffset, 0, -1)) return 22; |
47 |
if (foffset > fp->Info.size) |
48 |
{char buff[128]; |
49 |
@@ -447,7 +447,7 @@ int bbcp_Protocol::Process_login(bbcp_Link *Net) |
50 |
// Get the first line of the login stream |
51 |
// |
52 |
if (!(np->GetLine())) |
53 |
- {if (retc = np->LastError()) |
54 |
+ {if ((retc = np->LastError())) |
55 |
return bbcp_Emsg("Process_Login", retc, "processing login from", |
56 |
Net->LinkName()); |
57 |
return bbcp_Fmsg("Process_Login", "Bad login from", Net->LinkName()); |
58 |
@@ -549,8 +549,8 @@ int bbcp_Protocol::Request(bbcp_Node *Node) |
59 |
if (texists && bbcp_Config.snkSpec->Info.Otype == 'd') |
60 |
tdir = bbcp_Config.snkSpec->pathname; |
61 |
else {int plen; |
62 |
- if (plen = bbcp_Config.snkSpec->filename - |
63 |
- bbcp_Config.snkSpec->pathname) |
64 |
+ if ((plen = bbcp_Config.snkSpec->filename - |
65 |
+ bbcp_Config.snkSpec->pathname)) |
66 |
strncpy(buff, bbcp_Config.snkSpec->pathname, plen-1); |
67 |
else {buff[0] = '.'; plen = 2;} |
68 |
tdir = buff; buff[plen-1] = '\0'; |
69 |
@@ -562,7 +562,7 @@ int bbcp_Protocol::Request(bbcp_Node *Node) |
70 |
tdir_id = bbcp_Config.snkSpec->Info.fileid; |
71 |
else {bbcp_FileInfo Tinfo; |
72 |
if (!fs_obj || (!(retc = fs_obj->Stat(tdir, &Tinfo)) |
73 |
- && Tinfo.Otype != 'd') && outDir) retc = ENOTDIR; |
74 |
+ && (Tinfo.Otype != 'd') && outDir)) retc = ENOTDIR; |
75 |
if (retc) {bbcp_Fmsg("Request","Target directory", |
76 |
bbcp_Config.snkSpec->pathname,"not found"); |
77 |
return Request_exit(2, dRM); |
78 |
@@ -925,7 +925,7 @@ void bbcp_Protocol::putCSV(char *Host, char *csFn, cha |
79 |
{ //1234567890123 |
80 |
struct iovec iov[] = {{(char *)"Checksum: ", 10}, |
81 |
{bbcp_Config.csName,strlen(bbcp_Config.csName)}, |
82 |
- {(char *)" ", 1}, {csVal, csVsz}, |
83 |
+ {(char *)" ", 1}, {csVal, (unsigned long)csVsz}, |
84 |
{(char *)" ", 1}, {Host, strlen(Host)}, |
85 |
{(char *)":", 1}, {csFn, strlen(csFn)}, |
86 |
{(char *)"\n",1}}; |