File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -190,6 +190,7 @@ bool ATParser::vsend(const char *command, va_list args)
190
190
191
191
bool ATParser::vrecv (const char *response, va_list args)
192
192
{
193
+ vrecv_start:
193
194
// Iterate through each line in the expected response
194
195
while (response[0 ]) {
195
196
// Since response is const, we need to copy it into our buffer to
@@ -245,8 +246,10 @@ bool ATParser::vrecv(const char *response, va_list args)
245
246
_oobs[k].cb ();
246
247
247
248
// oob may have corrupted non-reentrant buffer,
248
- // so we need to set it up again
249
- return vrecv (response, args);
249
+ // so we need to set it up again.
250
+ // Use goto to save stack usage rather than a
251
+ // recursive approach.
252
+ goto vrecv_start;
250
253
}
251
254
}
252
255
You can’t perform that action at this time.
0 commit comments