mirror of
https://github.com/ksherlock/gopher.git
synced 2025-01-13 16:29:47 +00:00
smb scheme smb://....
This commit is contained in:
parent
fff9954b70
commit
8f0eb50d12
9
scheme.c
9
scheme.c
@ -33,6 +33,15 @@ void parse_scheme(const char *cp, unsigned size, URLComponents *c)
|
||||
c->portNumber = 2628;
|
||||
return;
|
||||
}
|
||||
// smb
|
||||
if (size == 3
|
||||
&& (wp[0] | 0x2020) == 0x6d73 // 'sm'
|
||||
&& (cp[2] | 0x20) == 0x62 // 'b'
|
||||
) {
|
||||
c->schemeType = SCHEME_SMB;
|
||||
c->portNumber = 445;
|
||||
return;
|
||||
}
|
||||
// ssh
|
||||
if (size == 3
|
||||
&& (wp[0] | 0x2020) == 0x7373 // 'ss'
|
||||
|
@ -104,3 +104,10 @@ void parse_scheme(const char *cp, unsigned size, URLComponents *c)
|
||||
c->portNumber = 2628;
|
||||
return;
|
||||
.
|
||||
|
||||
'smb' ->
|
||||
c->schemeType = SCHEME_SMB;
|
||||
c->portNumber = 445;
|
||||
return;
|
||||
.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user