Audiovox P965 Ficha de datos Pagina 132

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 280
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 131
API In CPP
129
}
/********************************************************************
* Read Sentence Block from the socket...keeps reading sentences
* until it encounters !done, !trap or !fatal from the socket
********************************************************************/
void MikrotikAPI::ReadBlock(Block &block)
{
Sentence sentence;
block.Clear();
DEBUG ? printf("ReadBlock\n") : 0;
do {
ReadSentence(sentence);
DEBUG ? printf("ReadSentence succeeded.\n") : 0;
block.AddSentence(sentence);
DEBUG ? printf("AddSentenceToBlock succeeded\n") : 0;
} while (sentence.GetReturnType() == NONE);
DEBUG ? printf("ReadBlock completed successfully\n") : 0;
}
/********************************************************************
* MD5 helper function to convert an md5 hex char representation to
* binary representation.
********************************************************************/
string MikrotikAPI::MD5ToBinary(const string &strHex)
{
string strReturn;
// 32 bytes in szHex?
if (strHex.length() != 32) {
return strReturn;
}
char binWork[3];
for (int i = 0; i < 32; i += 2) {
binWork[0] = strHex[i];
binWork[1] = strHex[i + 1];
binWork[2] = 0;
DEBUG ? printf("binWork = %s\n", binWork) : 0;
strReturn[i / 2] = HexStringToChar(binWork);
Vista de pagina 131
1 2 ... 127 128 129 130 131 132 133 134 135 136 137 ... 279 280

Comentarios a estos manuales

Sin comentarios