23 lines
743 B
Diff
23 lines
743 B
Diff
|
--- src/lib/liblow.c
|
||
|
+++ src/lib/liblow.c
|
||
|
@@ -199,7 +199,7 @@
|
||
|
Gpm_Stst *new = NULL;
|
||
|
char* sock_name = 0;
|
||
|
|
||
|
- option.consolename = NULL;
|
||
|
+ if (checked_con == 0) option.consolename = NULL;
|
||
|
|
||
|
gpm_report(GPM_PR_DEBUG,"VC: %d",flag);
|
||
|
|
||
|
@@ -259,6 +257,10 @@ int Gpm_Open(Gpm_Connect *conn, int flag
|
||
|
gpm_report(GPM_PR_ERR,"checking tty name failed");
|
||
|
goto err;
|
||
|
}
|
||
|
+ if (option.consolename == NULL) {
|
||
|
+ gpm_report(GPM_PR_ERR,"option.consolename not set");
|
||
|
+ goto err;
|
||
|
+ }
|
||
|
/* do we really need this check ? */
|
||
|
if(strncmp(tty,option.consolename,strlen(option.consolename)-1)
|
||
|
|| !isdigit(tty[strlen(option.consolename)-1])) {
|