int __copy_of_crMothershipReadResponse( CRConnection *conn, void *buf ) { char codestr[4]; int code; crNetSingleRecv( conn, codestr, 4 ); crNetReadline( conn, buf ); code = crStrToInt( codestr ); return (code == 200); }
/** * Get response string from mothership. * \return 1 if OK, 0 if error */ int crMothershipReadResponse( CRConnection *conn, void *buf ) { /* The connection may be already broken if we're called via the * crMothershipExit() function. */ if (conn->type != CR_NO_CONNECTION) { char codestr[4]; int code; crNetSingleRecv( conn, codestr, 4 ); crNetReadline( conn, buf ); code = crStrToInt( codestr ); return (code == 200); } else { return 0; } }