void-packages/srcpkgs/uucp/patches/zpipe-improved-pipe.patch

41 lines
1.4 KiB
Diff

Author: Rafael Diniz <rafael@rhizomatica.org>
Description:
remove ATTRIBUTE_UNUSED of the parameter uucp-org.patch uses
add the possibility to send the system name to be called in pipe command
(use \Z as place holder for the system name)
Index: uucp-1.07/unix/pipe.c
===================================================================
--- uucp-1.07.orig/unix/pipe.c 2019-08-17 23:06:47.774519770 +0200
+++ uucp-1.07/unix/pipe.c 2019-08-17 23:06:47.742519770 +0200
@@ -225,8 +225,8 @@
fspipe_dial (qconn, puuconf, qsys, zphone, qdialer, ptdialer)
struct sconnection *qconn;
pointer puuconf;
- const struct uuconf_system *qsys ATTRIBUTE_UNUSED;
- const char *zphone ATTRIBUTE_UNUSED;
+ const struct uuconf_system *qsys;
+ const char *zphone;
struct uuconf_dialer *qdialer;
enum tdialerfound *ptdialer;
{
@@ -246,12 +246,17 @@
ulog (LOG_ERROR, "No command for pipe connection");
return FALSE;
}
-
- /* Look for a string \H and replaced it by the address given for this system */
+
+ /* Look for a string \H and replace it by the address given for this system */
for (p=pzprog; *p; p++)
if (!strcmp(*p, "\\H"))
*p = zphone;
+ /* Look for a string \Z and replace by the system name to be called */
+ for (p=pzprog; *p; p++)
+ if (!strcmp(*p, "\\Z"))
+ *p = qsys->uuconf_zname;
+
aidescs[0] = SPAWN_WRITE_PIPE;
aidescs[1] = SPAWN_READ_PIPE;
aidescs[2] = SPAWN_NULL;