Commit c3e5e585 authored by Wayne Davison's avatar Wayne Davison

New function: who_am_i() returns "sender", "receiver", or "generator".

parent 4337c8f8
...@@ -26,6 +26,9 @@ extern int verbose; ...@@ -26,6 +26,9 @@ extern int verbose;
extern int dry_run; extern int dry_run;
extern int preserve_times; extern int preserve_times;
extern int am_root; extern int am_root;
extern int am_server;
extern int am_sender;
extern int am_generator;
extern int preserve_uid; extern int preserve_uid;
extern int preserve_gid; extern int preserve_gid;
extern int preserve_perms; extern int preserve_perms;
...@@ -240,3 +243,8 @@ void finish_transfer(char *fname, char *fnametmp, struct file_struct *file) ...@@ -240,3 +243,8 @@ void finish_transfer(char *fname, char *fnametmp, struct file_struct *file)
set_perms(fname,file,NULL,0); set_perms(fname,file,NULL,0);
} }
} }
const char *who_am_i(void)
{
return am_sender ? "sender" : am_generator ? "generator" : "receiver";
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment