projects
/
nbd.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
35d8653
)
r207: Fix compilation
author
yoe <yoe>
Wed, 25 Oct 2006 01:39:00 +0000
(
01:39
+0000)
committer
yoe <yoe>
Wed, 25 Oct 2006 01:39:00 +0000
(
01:39
+0000)
nbd-server.c
patch
|
blob
|
history
diff --git
a/nbd-server.c
b/nbd-server.c
index
0a4ceb1
..
c8b1126
100644
(file)
--- a/
nbd-server.c
+++ b/
nbd-server.c
@@
-239,7
+239,7
@@
typedef struct {
* @return 0 - authorization refused, 1 - OK
**/
int authorized_client(CLIENT *opts) {
* @return 0 - authorization refused, 1 - OK
**/
int authorized_client(CLIENT *opts) {
- const char ERRMSG="Invalid entry '%s' in authfile '%s', so, refusing all connections.";
+ const char *ERRMSG="Invalid entry '%s' in authfile '%s', so, refusing all connections.";
FILE *f ;
char line[LINELEN];
char *tmp;
FILE *f ;
char line[LINELEN];
char *tmp;
@@
-267,12
+267,12
@@
int authorized_client(CLIENT *opts) {
return 0;
}
len=strtol(tmp, NULL, 0);
return 0;
}
len=strtol(tmp, NULL, 0);
- addr.sin_addr.s_addr>>=32-len;
- addr.sin_addr.s_addr<<=32-len;
+ addr.s_addr>>=32-len;
+ addr.s_addr<<=32-len;
memcpy(&cltemp,&client,sizeof(client));
memcpy(&cltemp,&client,sizeof(client));
- cltemp.sin_addr.s_addr>>=32-len;
- cltemp.sin_addr.s_addr<<=32-len;
- if(addr.sin_addr.s_addr == cltemp.sin_addr.s_addr) {
+ cltemp.s_addr>>=32-len;
+ cltemp.s_addr<<=32-len;
+ if(addr.s_addr == cltemp.s_addr) {
return 1;
}
}
return 1;
}
}