Some more null pointer checks, fix #186
Signed-off-by: Sara Damiano <sdamiano@stroudcenter.org>
This commit is contained in:
@@ -445,6 +445,7 @@ class TinyGsmM95 : public TinyGsmModem<TinyGsmM95>,
|
||||
}
|
||||
|
||||
size_t modemRead(size_t size, uint8_t mux) {
|
||||
if (!sockets[mux]) return 0;
|
||||
// TODO(?): Does this work????
|
||||
// AT+QIRD=<id>,<sc>,<sid>,<len>
|
||||
// id = GPRS context number = 0, set in GPRS connect
|
||||
@@ -482,6 +483,7 @@ class TinyGsmM95 : public TinyGsmModem<TinyGsmM95>,
|
||||
}
|
||||
}
|
||||
|
||||
// Not possible to check the number of characters remaining in buffer
|
||||
size_t modemGetAvailable(uint8_t) {
|
||||
return 0;
|
||||
}
|
||||
@@ -618,6 +620,7 @@ class TinyGsmM95 : public TinyGsmModem<TinyGsmM95>,
|
||||
|
||||
public:
|
||||
Stream& stream;
|
||||
|
||||
protected:
|
||||
GsmClientM95* sockets[TINY_GSM_MUX_COUNT];
|
||||
const char* gsmNL = GSM_NL;
|
||||
|
||||
Reference in New Issue
Block a user