Updated some binkp code to new specs
This commit is contained in:
parent
f2582e5669
commit
ca7a083e7d
@ -10,6 +10,9 @@ v0.37.5 12-Jul-2003
|
|||||||
common.a:
|
common.a:
|
||||||
Node locking tests for non-stale lockfiles older then 6 hours.
|
Node locking tests for non-stale lockfiles older then 6 hours.
|
||||||
|
|
||||||
|
mbcico:
|
||||||
|
Implemented CRAM rev.4 change in binkp driver.
|
||||||
|
|
||||||
|
|
||||||
v0.37.4 10-May-2003 - 12-Jul-2003
|
v0.37.4 10-May-2003 - 12-Jul-2003
|
||||||
|
|
||||||
|
@ -218,7 +218,7 @@ int resync(off_t off)
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Translate filename to binkp filename, unsafe characters are escaped.
|
* Translate string to binkp escaped string, unsafe characters are escaped.
|
||||||
*/
|
*/
|
||||||
char *unix2binkp(char *fn)
|
char *unix2binkp(char *fn)
|
||||||
{
|
{
|
||||||
@ -248,7 +248,7 @@ char *unix2binkp(char *fn)
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Translate escaped binkp filename to unix.
|
* Translate escaped binkp string to normal string.
|
||||||
*/
|
*/
|
||||||
char *binkp2unix(char *fn)
|
char *binkp2unix(char *fn)
|
||||||
{
|
{
|
||||||
@ -263,12 +263,28 @@ char *binkp2unix(char *fn)
|
|||||||
while (*p) {
|
while (*p) {
|
||||||
if (p[0] == '\\') {
|
if (p[0] == '\\') {
|
||||||
p++;
|
p++;
|
||||||
hex[0] = *p++;
|
if (*p == '\\') {
|
||||||
hex[1] = *p;
|
/*
|
||||||
hex[2] = '\0';
|
* A backslash is transmitted
|
||||||
sscanf(hex, "%2x", &c);
|
*/
|
||||||
*q++ = c;
|
*q++ = '\\';
|
||||||
*q = '\0';
|
*q = '\0';
|
||||||
|
} else {
|
||||||
|
/*
|
||||||
|
* If remote sends \x0a method instead of \0a, eat the x character
|
||||||
|
*/
|
||||||
|
if ((*p == 'x') || (*p == 'X'))
|
||||||
|
p++;
|
||||||
|
/*
|
||||||
|
* Decode hex characters
|
||||||
|
*/
|
||||||
|
hex[0] = *p++;
|
||||||
|
hex[1] = *p;
|
||||||
|
hex[2] = '\0';
|
||||||
|
sscanf(hex, "%2x", &c);
|
||||||
|
*q++ = c;
|
||||||
|
*q = '\0';
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
*q++ = *p;
|
*q++ = *p;
|
||||||
*q = '\0';
|
*q = '\0';
|
||||||
@ -880,7 +896,7 @@ SM_STATE(pwdack)
|
|||||||
if (inbound)
|
if (inbound)
|
||||||
free(inbound);
|
free(inbound);
|
||||||
inbound = xstrcpy(CFG.pinbound);
|
inbound = xstrcpy(CFG.pinbound);
|
||||||
binkp_send_control(MM_OK, "");
|
binkp_send_control(MM_OK, "secure");
|
||||||
SM_SUCCESS;
|
SM_SUCCESS;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user