Plan 9 from Bell Labs’s /usr/web/sources/plan9/sys/src/cmd/upas/send/gateway.c

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#include "common.h"
#include "send.h"

#define isspace(c) ((c)==' ' || (c)=='\t' || (c)=='\n')

/*
 *  Translate the last component of the sender address.  If the translation
 *  yields the same address, replace the sender with its last component.
 */
extern void
gateway(message *mp)
{
	char *base;
	String *s;

	/* first remove all systems equivalent to us */
	base = skipequiv(s_to_c(mp->sender));
	if(base != s_to_c(mp->sender)){
		s = mp->sender;
		mp->sender = s_copy(base);
		s_free(s);
	}
}

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.