git.openpandora.org
/
pandora-libraries.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a200617
)
log error paths
author
Grazvydas Ignotas
<notasas@gmail.com>
Fri, 12 Dec 2014 00:15:00 +0000
(
02:15
+0200)
committer
Grazvydas Ignotas
<notasas@gmail.com>
Fri, 12 Dec 2014 00:15:00 +0000
(
02:15
+0200)
lib/pnd_notify.c
patch
|
blob
|
history
diff --git
a/lib/pnd_notify.c
b/lib/pnd_notify.c
index
48593c2
..
33d9714
100644
(file)
--- a/
lib/pnd_notify.c
+++ b/
lib/pnd_notify.c
@@
-3,6
+3,7
@@
#include <stdio.h> // for stdio, NULL
#include <stdlib.h> // for malloc, etc
#include <unistd.h> // for close
#include <stdio.h> // for stdio, NULL
#include <stdlib.h> // for malloc, etc
#include <unistd.h> // for close
+#include <errno.h> // for errno
#include <time.h> // for time()
#define _XOPEN_SOURCE 500
#include <time.h> // for time()
#define _XOPEN_SOURCE 500
@@
-136,6
+137,7
@@
unsigned char pnd_notify_rediscover_p ( pnd_notify_handle h ) {
retcode = select ( (p->fd) + 1, &rfds, NULL, NULL, &t );
if ( retcode < 0 ) {
retcode = select ( (p->fd) + 1, &rfds, NULL, NULL, &t );
if ( retcode < 0 ) {
+ pnd_log ( 3, "ERROR: notify: select failed: %d\n", errno );
return ( 0 ); // hmm.. need a better error code handler
} else if ( retcode == 0 ) {
return ( 0 ); // timeout
return ( 0 ); // hmm.. need a better error code handler
} else if ( retcode == 0 ) {
return ( 0 ); // timeout
@@
-153,6
+155,7
@@
unsigned char pnd_notify_rediscover_p ( pnd_notify_handle h ) {
actuallen = read ( (p->fd), binbuf, BINBUFLEN );
if ( actuallen < 0 ) {
actuallen = read ( (p->fd), binbuf, BINBUFLEN );
if ( actuallen < 0 ) {
+ pnd_log ( 3, "ERROR: notify: read failed: %d\n", errno );
return ( 0 ); // error
} else if ( actuallen == 0 ) {
return ( 0 ); // nothing, or overflow, or .. whatever.
return ( 0 ); // error
} else if ( actuallen == 0 ) {
return ( 0 ); // nothing, or overflow, or .. whatever.