From: <col...@hi...> - 2001-03-31 09:57:02
|
Hi! Scott A. Herod "he...@in..." wrote: [...] > Is it by chance true that there needs to be a line at about line > 1153 in lirc_client.c that resets the config list pointer? If you > check the end of the lirc_code2char function on line 1168, the list > pointer is reset when nothing is found, but it is not reset if > the routine exits when if finds a line ( line 1154 in the code ). > > As a result, lirc_code2char() appears to only succeed every other > time when called with multiple, identical inputs. This is the defined behaviour. From the documentation: --- Schnipp --- int lirc_code2char(struct lirc_config *config,char *code,char **string); config is a pointer to the config file data structure that you can get with lirc_readconfig() and code is the code transmitted to your application on the lircd socket. If an action should be taken string will point to the config string the user has provided in the config file. ---> The user might want to take several actions on a button press so you have to execute this function until string is NULL, which means that no more actions shall be taken, or an error occurs. The function returns -1 if an error occurred, 0 otherwise. --- Schnipp --- HTH, Christoph |