>From 3f4cbdd119e4c7f574f006845c8645ac29cd85f7 Mon Sep 17 00:00:00 2001
From: Iain Hibbert <plu...@rya-online.net>
Date: Tue, 26 Oct 2010 14:10:41 +0100
Subject: [PATCH] always return a static string

OBEX_ResponseToString() documentation says that it returns a static
string or NULL on error. This is not quite correct as the code does
never return NULL, and moreover it will be easier to use if that is
part of the API. Make it so.
---
 lib/obex.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/obex.c b/lib/obex.c
index 29723ec..4704e5d 100644
--- a/lib/obex.c
+++ b/lib/obex.c
@@ -841,9 +841,11 @@ int CALLAPI OBEX_ObjectGetCommand(obex_t *self, 
obex_object_t *object)
 /**
        Return a human understandable string from a response-code.
        \param rsp Response code.
-       \return static response code string, NULL on error
+       \return static response code string
 
-       The returned char must not be freed. Returns NULL on error.
+       The returned string must not be freed.
+       If the response code is unknown, the string "Unknown response" will
+       be returned.
  */
 LIB_SYMBOL
 char * CALLAPI OBEX_ResponseToString(int rsp)
-- 
1.7.0.5


------------------------------------------------------------------------------
Achieve Improved Network Security with IP and DNS Reputation.
Defend against bad network traffic, including botnets, malware, 
phishing sites, and compromised hosts - saving your company time, 
money, and embarrassment.   Learn More! 
http://p.sf.net/sfu/hpdev2dev-nov
_______________________________________________
Openobex-users mailing list
Openobex-users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/openobex-users

Reply via email to