mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-14 08:05:37 +00:00
fix return value
This commit is contained in:
parent
7be60474ab
commit
aa15994c7f
@ -542,8 +542,10 @@ SWITCH_DECLARE(const char *) Stream::read(int *len)
|
|||||||
|
|
||||||
buff = stream_p->read_function(stream_p, len);
|
buff = stream_p->read_function(stream_p, len);
|
||||||
|
|
||||||
if (!buff) return NULL;
|
if (!buff || *len <= 0) {
|
||||||
if (len < 0) return NULL;
|
*len = 0;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return (const char *)buff;
|
return (const char *)buff;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user