mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
publish p9dialparse
This commit is contained in:
parent
0c148046ed
commit
e42882dc96
3 changed files with 3 additions and 6 deletions
|
@ -55,7 +55,7 @@ parseip(char *host, u32int *pip)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
_p9dialparse(char *addr, char **pnet, char **punix, u32int *phost, int *pport)
|
p9dialparse(char *addr, char **pnet, char **punix, u32int *phost, int *pport)
|
||||||
{
|
{
|
||||||
char *net, *host, *port, *e;
|
char *net, *host, *port, *e;
|
||||||
int i;
|
int i;
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
|
|
||||||
#undef sun
|
#undef sun
|
||||||
#define sun sockun
|
#define sun sockun
|
||||||
extern int _p9dialparse(char*, char**, char**, u32int*, int*);
|
|
||||||
|
|
||||||
int
|
int
|
||||||
_p9netfd(char *dir)
|
_p9netfd(char *dir)
|
||||||
|
@ -50,7 +49,7 @@ p9announce(char *addr, char *dir)
|
||||||
if(buf == nil)
|
if(buf == nil)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if(_p9dialparse(buf, &net, &unix, &host, &port) < 0){
|
if(p9dialparse(buf, &net, &unix, &host, &port) < 0){
|
||||||
free(buf);
|
free(buf);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,8 +16,6 @@
|
||||||
#include <sys/un.h>
|
#include <sys/un.h>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
|
|
||||||
|
|
||||||
extern int _p9dialparse(char*, char**, char**, u32int*, int*);
|
|
||||||
#undef unix
|
#undef unix
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -41,7 +39,7 @@ p9dial(char *addr, char *dummy1, char *dummy2, int *dummy3)
|
||||||
if(buf == nil)
|
if(buf == nil)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if(_p9dialparse(buf, &net, &unix, &host, &port) < 0){
|
if(p9dialparse(buf, &net, &unix, &host, &port) < 0){
|
||||||
free(buf);
|
free(buf);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue