Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
205c27a
)
don't clobber argv[0], so ps shows the right thing
author
Andrew Tridgell
<tridge@samba.org>
Thu, 19 Oct 2000 00:47:48 +0000
(
00:47
+0000)
committer
Andrew Tridgell
<tridge@samba.org>
Thu, 19 Oct 2000 00:47:48 +0000
(
00:47
+0000)
main.c
patch
|
blob
|
blame
|
history
diff --git
a/main.c
b/main.c
index
648c237
..
e54ae8b
100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-557,11
+557,12
@@
static int start_client(int argc, char *argv[])
extern int am_sender;
extern char *shell_cmd;
extern int rsync_port;
extern int am_sender;
extern char *shell_cmd;
extern int rsync_port;
+ char *argv0 = strdup(argv[0]);
- if (strncasecmp(URL_PREFIX, argv
[0]
, strlen(URL_PREFIX)) == 0) {
+ if (strncasecmp(URL_PREFIX, argv
0
, strlen(URL_PREFIX)) == 0) {
char *host, *path;
char *host, *path;
- host = argv
[0]
+ strlen(URL_PREFIX);
+ host = argv
0
+ strlen(URL_PREFIX);
p = strchr(host,'/');
if (p) {
*p = 0;
p = strchr(host,'/');
if (p) {
*p = 0;
@@
-577,12
+578,12
@@
static int start_client(int argc, char *argv[])
return start_socket_client(host, path, argc-1, argv+1);
}
return start_socket_client(host, path, argc-1, argv+1);
}
- p = find_colon(argv
[0]
);
+ p = find_colon(argv
0
);
if (p) {
if (p[1] == ':') {
*p = 0;
if (p) {
if (p[1] == ':') {
*p = 0;
- return start_socket_client(argv
[0]
, p+2, argc-1, argv+1);
+ return start_socket_client(argv
0
, p+2, argc-1, argv+1);
}
if (argc < 1) {
}
if (argc < 1) {