Lines Matching refs:line
122 static void addIntermediate(const char *line) in addIntermediate() argument
128 p_new->line = strdup(line); in addIntermediate()
151 static int isFinalResponseError(const char *line) in isFinalResponseError() argument
156 if (strStartsWith(line, s_finalResponsesError[i])) { in isFinalResponseError()
173 static int isFinalResponseSuccess(const char *line) in isFinalResponseSuccess() argument
178 if (strStartsWith(line, s_finalResponsesSuccess[i])) { in isFinalResponseSuccess()
191 static int isFinalResponse(const char *line) in isFinalResponse() argument
193 return isFinalResponseSuccess(line) || isFinalResponseError(line); in isFinalResponse()
206 static int isSMSUnsolicited(const char *line) in isSMSUnsolicited() argument
211 if (strStartsWith(line, s_smsUnsoliciteds[i])) { in isSMSUnsolicited()
221 static void handleFinalResponse(const char *line) in handleFinalResponse() argument
223 sp_response->finalResponse = strdup(line); in handleFinalResponse()
228 static void handleUnsolicited(const char *line) in handleUnsolicited() argument
231 s_unsolHandler(line, NULL); in handleUnsolicited()
235 static void processLine(const char *line) in processLine() argument
241 handleUnsolicited(line); in processLine()
242 } else if (isFinalResponseSuccess(line)) { in processLine()
244 handleFinalResponse(line); in processLine()
245 } else if (isFinalResponseError(line)) { in processLine()
247 handleFinalResponse(line); in processLine()
248 } else if (s_smsPDU != NULL && 0 == strcmp(line, "> ")) { in processLine()
255 handleUnsolicited(line); in processLine()
259 && isdigit(line[0]) in processLine()
261 addIntermediate(line); in processLine()
265 handleUnsolicited(line); in processLine()
270 && strStartsWith (line, s_responsePrefix) in processLine()
272 addIntermediate(line); in processLine()
275 handleUnsolicited(line); in processLine()
279 if (strStartsWith (line, s_responsePrefix)) { in processLine()
280 addIntermediate(line); in processLine()
282 handleUnsolicited(line); in processLine()
288 handleUnsolicited(line); in processLine()
434 const char * line; in readerLoop() local
436 line = readline(); in readerLoop()
438 if (line == NULL) { in readerLoop()
442 if(isSMSUnsolicited(line)) { in readerLoop()
449 line1 = strdup(line); in readerLoop()
462 processLine(line); in readerLoop()
639 free(p_toFree->line); in at_response_free()