$OpenBSD: patch-src_libpiano_piano_h,v 1.8 2013/07/10 16:40:48 dcoppa Exp $

commit f6df7d7e510f2d8879ec54dce32fee2b691dc32d
Author: Lars-Dominik Braun <lars@6xq.net>
Date:   Tue Jul 2 17:13:47 2013 +0200

piano: Check for libgcrypt errors

Fixes mysterious segfaults from issue #369 and #293.

--- src/libpiano/piano.h.orig	Sun May 19 12:58:18 2013
+++ src/libpiano/piano.h	Wed Jul 10 18:20:12 2013
@@ -247,6 +247,7 @@ typedef enum {
 	PIANO_RET_OUT_OF_MEMORY = 4,
 	PIANO_RET_INVALID_LOGIN = 5,
 	PIANO_RET_QUALITY_UNAVAILABLE = 6,
+	PIANO_RET_GCRY_ERR = 7,
 
 	/* pandora error codes */
 	PIANO_RET_P_INTERNAL = PIANO_RET_OFFSET+0,
@@ -294,7 +295,7 @@ typedef enum {
 	PIANO_RET_P_RATE_LIMIT = PIANO_RET_OFFSET+1039,
 } PianoReturn_t;
 
-void PianoInit (PianoHandle_t *, const char *,
+PianoReturn_t PianoInit (PianoHandle_t *, const char *,
 		const char *, const char *, const char *,
 		const char *);
 void PianoDestroy (PianoHandle_t *);
