pike.git / lib / modules / Sql.pmod / tds.pike

version» Context lines:

pike.git/lib/modules/Sql.pmod/tds.pike:1:   /* -  * $Id: tds.pike,v 1.8 2006/02/10 16:28:31 grubba Exp $ +  * $Id: tds.pike,v 1.9 2006/02/10 16:33:48 grubba Exp $    *    * A Pike implementation of the TDS protocol.    *    * Henrik Grubbström 2006-02-08.    */      #define TDS_DEBUG      #ifdef TDS_DEBUG   #define TDS_WERROR(X...) werror("TDS:" + X)
pike.git/lib/modules/Sql.pmod/tds.pike:446:    return sprintf("%-4c%s", sizeof(res)+4, res);    }    }       InPacket send_packet(Packet p, int flag, int|void last)    {    if (busy) {    tds_error("Sending packet on busy connection!\n");    }    -  array(string) packets = ((string) p)/512.0; +  array(string) packets = ((string) p)/32768.0;    foreach(packets; int i; string raw) {    // NOTE: Network byteorder!!    raw = sprintf("%1c%1c%2c\0\0%1c\0%s",    flag, (i == (sizeof(packets)-1)) && last,    sizeof(raw) + 8,    1, /* TDS 7 or 8. */    raw);    TDS_WERROR("Wrapped packet: %O\n%s\n", raw, hex_dump(raw));    if (socket->write(raw) != sizeof(raw)) {    socket->close();