Index: ChangeLog
===================================================================
--- ChangeLog	(revision 4868)
+++ ChangeLog	(revision 4870)
@@ -1,2 +1,5 @@
+v. 0.4beta6 - ?
+	* Added new error codes.
+
 v. 0.4beta5 - Tue Apr 26 2011 08:42 CEST
 	Prereleases: 0: Sun Apr 17 2011 20:40 CEST
Index: include/roaraudio/error.h
===================================================================
--- include/roaraudio/error.h	(revision 4708)
+++ include/roaraudio/error.h	(revision 4870)
@@ -45,4 +45,29 @@
 #define ROAR_ERROR_NOMEM       12 /* Not enough space */
 #define ROAR_ERROR_INVAL       13 /* Invalid argument */
+#define ROAR_ERROR_ALREADY     14 /* Connection already in progress */
+#define ROAR_ERROR_BADRQC      15 /* Invalid request code */
+#define ROAR_ERROR_DOM         16 /* Mathematics argument out of domain of function */
+#define ROAR_ERROR_EXIST       17 /* File or object exists */
+#define ROAR_ERROR_FAULT       18 /* Bad address */
+#define ROAR_ERROR_IO          19 /* I/O-Error */
+#define ROAR_ERROR_KEYEXPIRED  20 /* Key has expired */
+#define ROAR_ERROR_KEYREJECTED 21 /* Key was rejected by service */
+#define ROAR_ERROR_LOOP        22 /* Too many recursions */
+#define ROAR_ERROR_MFILE       23 /* Too many open files or objects */
+#define ROAR_ERROR_NAMETOOLONG 24 /* File or object name too long */
+#define ROAR_ERROR_NODATA      25 /* No message is available on the read queue */
+#define ROAR_ERROR_NODEV       26 /* No such device */
+#define ROAR_ERROR_NODRV       27 /* No such driver */
+#define ROAR_ERROR_NOSPC       38 /* No space left on device */
+#define ROAR_ERROR_TYPEMM      39 /* Type missmatch. Object of diffrent type required */
+#define ROAR_ERROR_NORSYS      40 /* Feature not implemented by remote end */
+#define ROAR_ERROR_NOTCONN     41 /* Socket or object not connected */
+#define ROAR_ERROR_PROTONOSUP  42 /* Protocol not supported */
+#define ROAR_ERROR_RIO         43 /* Remote I/O Error */
+#define ROAR_ERROR_RO          45 /* File or object is read only */
+#define ROAR_ERROR_TIMEDOUT    46 /* Connection timed out */
+#define ROAR_ERROR_AGAIN       47 /* Resource temporarily unavailable */
+#define ROAR_ERROR_NOISE       48 /* Line too noisy */
+#define ROAR_ERROR_LINKDOWN    49 /* Physical or logical link down */
 
 #endif
Index: libroar/error.c
===================================================================
--- libroar/error.c	(revision 4869)
+++ libroar/error.c	(revision 4870)
@@ -156,4 +156,64 @@
   case EINVAL:       _roar_errno = ROAR_ERROR_INVAL; break;
 #endif
+#ifdef EALREADY
+  case EALREADY:     _roar_errno = ROAR_ERROR_ALREADY; break;
+#endif
+#ifdef EBADRQC
+  case EBADRQC:      _roar_errno = ROAR_ERROR_BADRQC; break;
+#endif
+#ifdef EDOM
+  case EDOM:         _roar_errno = ROAR_ERROR_DOM; break;
+#endif
+#ifdef EEXIST
+  case EEXIST:       _roar_errno = ROAR_ERROR_EXIST; break;
+#endif
+#ifdef EFAULT
+  case EFAULT:       _roar_errno = ROAR_ERROR_FAULT; break;
+#endif
+#ifdef EIO
+  case EIO:          _roar_errno = ROAR_ERROR_IO; break;
+#endif
+#ifdef EKEYEXPIRED
+  case EKEYEXPIRED:  _roar_errno = ROAR_ERROR_KEYEXPIRED; break;
+#endif
+#ifdef EKEYREJECTED
+  case EKEYREJECTED: _roar_errno = ROAR_ERROR_KEYREJECTED; break;
+#endif
+#ifdef ELOOP
+  case ELOOP:        _roar_errno = ROAR_ERROR_LOOP; break;
+#endif
+#ifdef EMFILE
+  case EMFILE:       _roar_errno = ROAR_ERROR_MFILE; break;
+#endif
+#ifdef ENAMETOOLONG
+  case ENAMETOOLONG: _roar_errno = ROAR_ERROR_NAMETOOLONG; break;
+#endif
+#ifdef ENODATA
+  case ENODATA:      _roar_errno = ROAR_ERROR_NODATA; break;
+#endif
+#ifdef ENODEV
+  case ENODEV:       _roar_errno = ROAR_ERROR_NODEV; break;
+#endif
+#ifdef ENOSPC
+  case ENOSPC:       _roar_errno = ROAR_ERROR_NOSPC; break;
+#endif
+#ifdef ENOTCONN
+  case ENOTCONN:     _roar_errno = ROAR_ERROR_NOTCONN; break;
+#endif
+#ifdef EPROTONOSUPPORT
+  case EPROTONOSUPPORT: _roar_errno = ROAR_ERROR_PROTONOSUP; break;
+#endif
+#ifdef EROFS
+  case EROFS:        _roar_errno = ROAR_ERROR_RO; break;
+#endif
+#ifdef ETIMEDOUT
+  case ETIMEDOUT:    _roar_errno = ROAR_ERROR_TIMEDOUT; break;
+#endif
+#ifdef EAGAIN
+  case EAGAIN:       _roar_errno = ROAR_ERROR_AGAIN; break;
+#endif
+#ifdef ENETDOWN
+  case ENETDOWN:     _roar_errno = ROAR_ERROR_LINKDOWN; break;
+#endif
   default:
     _roar_errno = ROAR_ERROR_UNKNOWN;
@@ -233,4 +293,116 @@
   case ROAR_ERROR_INVAL:
     errno = EINVAL;
+   break;
+#endif
+#ifdef EALREADY
+  case ROAR_ERROR_ALREADY:
+    errno = EALREADY;
+   break;
+#endif
+#ifdef EBADRQC
+  case ROAR_ERROR_BADRQC:
+    errno = EBADRQC;
+   break;
+#endif
+#ifdef EDOM
+  case ROAR_ERROR_DOM:
+    errno = EDOM;
+   break;
+#endif
+#ifdef EEXIST
+  case ROAR_ERROR_EXIST:
+    errno = EEXIST;
+   break;
+#endif
+#ifdef EFAULT
+  case ROAR_ERROR_FAULT:
+    errno = EFAULT;
+   break;
+#endif
+#ifdef EIO
+  case ROAR_ERROR_IO:
+  case ROAR_ERROR_RIO:
+    errno = EIO;
+   break;
+#endif
+#ifdef EKEYEXPIRED
+  case ROAR_ERROR_KEYEXPIRED:
+    errno = EKEYEXPIRED;
+   break;
+#endif
+#ifdef EKEYREJECTED
+  case ROAR_ERROR_KEYREJECTED:
+    errno = EKEYREJECTED;
+   break;
+#endif
+#ifdef ELOOP
+  case ROAR_ERROR_LOOP:
+    errno = ELOOP;
+   break;
+#endif
+#ifdef EMFILE
+  case ROAR_ERROR_MFILE:
+    errno = EMFILE;
+   break;
+#endif
+#ifdef ENAMETOOLONG
+  case ROAR_ERROR_NAMETOOLONG:
+    errno = ENAMETOOLONG;
+   break;
+#endif
+#ifdef ENODATA
+  case ROAR_ERROR_NODATA:
+    errno = ENODATA;
+   break;
+#endif
+#ifdef ENODEV
+  case ROAR_ERROR_NODEV:
+  case ROAR_ERROR_NODRV:
+    errno = ENODEV;
+   break;
+#endif
+#ifdef ENOSPC
+  case ROAR_ERROR_NOSPC:
+    errno = ENOSPC;
+   break;
+#endif
+#ifdef EINVAL
+  case ROAR_ERROR_TYPEMM:
+    errno = EINVAL;
+   break;
+#endif
+#ifdef ENOSYS
+  case ROAR_ERROR_NORSYS:
+    errno = ENOSYS;
+   break;
+#endif
+#ifdef ENOTCONN
+  case ROAR_ERROR_NOTCONN:
+    errno = ENOTCONN;
+   break;
+#endif
+#ifdef EPROTONOSUPPORT
+  case ROAR_ERROR_PROTONOSUP:
+    errno = EPROTONOSUPPORT;
+   break;
+#endif
+#ifdef EROFS
+  case ROAR_ERROR_RO:
+    errno = EROFS;
+   break;
+#endif
+#ifdef ETIMEDOUT
+  case ROAR_ERROR_TIMEDOUT:
+    errno = ETIMEDOUT;
+   break;
+#endif
+#ifdef EAGAIN
+  case ROAR_ERROR_AGAIN:
+    errno = EAGAIN;
+   break;
+#endif
+#ifdef ENETDOWN
+  case ROAR_ERROR_LINKDOWN:
+    errno = ENETDOWN;
    break;
 #endif
@@ -265,4 +437,29 @@
   {ROAR_ERROR_NOMEM,       "Not enough space"},
   {ROAR_ERROR_INVAL,       "Invalid argument"},
+  {ROAR_ERROR_ALREADY,     "Connection already in progress"},
+  {ROAR_ERROR_BADRQC,      "Invalid request code"},
+  {ROAR_ERROR_DOM,         "Mathematics argument out of domain of function"},
+  {ROAR_ERROR_EXIST,       "File or object exists"},
+  {ROAR_ERROR_FAULT,       "Bad address"},
+  {ROAR_ERROR_IO,          "I/O-Error"},
+  {ROAR_ERROR_KEYEXPIRED,  "Key has expired"},
+  {ROAR_ERROR_KEYREJECTED, "Key was rejected by service"},
+  {ROAR_ERROR_LOOP,        "Too many recursions"},
+  {ROAR_ERROR_MFILE,       "Too many open files or objects"},
+  {ROAR_ERROR_NAMETOOLONG, "File or object name too long"},
+  {ROAR_ERROR_NODATA,      "No message is available on the read queue"},
+  {ROAR_ERROR_NODEV,       "No such device"},
+  {ROAR_ERROR_NODRV,       "No such driver"},
+  {ROAR_ERROR_NOSPC,       "No space left on device"},
+  {ROAR_ERROR_TYPEMM,      "Type missmatch. Object of diffrent type required"},
+  {ROAR_ERROR_NORSYS,      "Feature not implemented by remote end"},
+  {ROAR_ERROR_NOTCONN,     "Socket or object not connected"},
+  {ROAR_ERROR_PROTONOSUP,  "Protocol not supported"},
+  {ROAR_ERROR_RIO,         "Remote I/O Error"},
+  {ROAR_ERROR_RO,          "File or object is read only"},
+  {ROAR_ERROR_TIMEDOUT,    "Connection timed out"},
+  {ROAR_ERROR_AGAIN,       "Resource temporarily unavailable"},
+  {ROAR_ERROR_NOISE,       "Line too noisy"},
+  {ROAR_ERROR_LINKDOWN,    "Physical or logical link down"},
   {-1, NULL}
  };
