MCPcopy Create free account
hub / github.com/ashkulz/NppFTP / GetResponseCode

Method GetResponseCode

UTCP/src/ftp_c.cpp:2576–2596  ·  view source on GitHub ↗

GetResponseCode(CUT_WSClient *ws,LPSTR string,int maxlen) A reply (ResponseCode) is an acknowledgment (positive or negative) sent from server to user via the TELNET connections in response to FTP commands. The general form of a reply is a completion code (including error codes) followed by a text string. The codes are for use by programs and the text is usually intended

Source from the content-addressed store, hash-verified

2574 int - The Server reply code
2575****************************************/
2576int CUT_FTPClient::GetResponseCode(CUT_WSClient *ws, LPSTR string, int maxlen) {
2577
2578 if (m_cachedResponse) {
2579 m_cachedResponse = false;
2580
2581 //copy the rest of the data
2582 const char * pbuf = GetMultiLineResponse(0);
2583 if(string != NULL && pbuf != NULL) {
2584 maxlen--;
2585 strncpy(string, &pbuf[4], maxlen);
2586 string[maxlen - 1] =0;
2587 }
2588
2589 return m_lastResponseCode;
2590 }
2591
2592 int code = PeekResponseCode(ws, string, maxlen);
2593 m_cachedResponse = false;
2594
2595 return code;
2596}
2597
2598int CUT_FTPClient::PeekResponseCode(CUT_WSClient *ws, LPSTR string, int maxlen) {
2599 char c;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected