summaryrefslogtreecommitdiff
path: root/comms/mgetty+sendfax/patches/patch-af
blob: c75be04e729120424a8e6e619d1e82d4e7df6e3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
$NetBSD: patch-af,v 1.3 2002/07/24 18:37:35 fredb Exp $

--- mgetty.c.orig	Mon Dec 17 16:31:52 2001
+++ mgetty.c
@@ -190,6 +190,14 @@
     lprintf( L_MESG, "stealing lock file from pid=%d", pid );
     if ( steal_lock( Device, pid ) == ERROR ) return St_dialout;
 
+    /* write a note to utmp/wtmp about dialout, including process args
+     * (don't do this on two-user-license systems!)
+     */
+#ifndef USER_LIMIT
+    pid = checklock( Device );		/* !! FIXME, ugly */
+    make_utmp_wtmp( Device, UT_USER, "dialout", get_ps_args(pid) );
+#endif
+
     /* signal user */
     printf( "...ok\r\n" );
 
@@ -217,14 +225,6 @@
     /* the line is locked, a parallel dialout is in process */
 
     virtual_ring = FALSE;			/* used to signal callback */
-
-    /* write a note to utmp/wtmp about dialout, including process args
-     * (don't do this on two-user-license systems!)
-     */
-#ifndef USER_LIMIT
-    pid = checklock( Device );		/* !! FIXME, ugly */
-    make_utmp_wtmp( Device, UT_USER, "dialout", get_ps_args(pid) );
-#endif
 
     /* close all file descriptors -> other processes can read port */
     close(0);