[Mplayer-cvslog] CVS: main/input lirc.c,1.1,1.2

Alban Bedel CVS albeu at mplayer.dev.hu
Mon Feb 4 16:03:21 CET 2002


Update of /cvsroot/mplayer/main/input
In directory mplayer:/var/tmp.root/cvs-serv8526

Modified Files:
	lirc.c 
Log Message:
Remove some unuseful stuff and don't try to kill an unexisting
child process on uninit


Index: lirc.c
===================================================================
RCS file: /cvsroot/mplayer/main/input/lirc.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- lirc.c	31 Jan 2002 09:39:11 -0000	1.1
+++ lirc.c	4 Feb 2002 15:03:18 -0000	1.2
@@ -33,7 +33,6 @@
 
 int 
 mp_input_lirc_init(void) {
-  int lirc_flags;
   int lirc_sock;
   int p[2];
 
@@ -43,19 +42,6 @@
     return -1;
   }
 
-#if 0
-  fcntl(lirc_sock,F_SETOWN,getpid());
-  lirc_flags=fcntl(lirc_sock,F_GETFL,0);
-  if(lirc_flags!=-1) {
-    fcntl(lirc_sock,F_SETFL,lirc_flags|O_NONBLOCK);
-  } else {
-    lirc_deinit();
-    mp_msg(MSGT_LIRC,MSGL_ERR,MSGTR_LIRCsocketerr MSGTR_LIRCdisabled,strerror(errno));
-    return -1;
-  }
-#endif
-
-
   if(lirc_readconfig( lirc_configfile,&lirc_config,NULL )!=0 ){
     mp_msg(MSGT_LIRC,MSGL_ERR,MSGTR_LIRCcfgerr MSGTR_LIRCdisabled,
 		    lirc_configfile == NULL ? "~/.lircrc" : lirc_configfile);
@@ -137,6 +123,8 @@
 
 void
 mp_input_lirc_uninit(void) {
+  if(child_pid <= 0)
+    return;
   if( kill(child_pid,SIGQUIT) != 0) {
     mp_msg(MSGT_LIRC,MSGL_V,"LIRC can't kill subprocess %d : %s\n",
 	   child_pid,strerror(errno));




More information about the MPlayer-cvslog mailing list