pike.git / lib / modules / Protocols.pmod / OBEX.pmod

version» Context lines:

pike.git/lib/modules/Protocols.pmod/OBEX.pmod:121:    if(sizeof(h)>=2)    v = h[1];    h = h[2..];    break;    case 3:    if(sizeof(h)>=5)    sscanf(h[1..4], "%4c", v);    h = h[5..];    break;    } -  if(zero_type(r[hi])) +  if(!has_index(r, hi))    r[hi] = v;    else if(arrayp(r[hi]))    r[hi] += ({ v });    else    r[hi] = ({ r[hi], v });    }    return r;   }      //! Given a set of headers in wire format, divide them into
pike.git/lib/modules/Protocols.pmod/OBEX.pmod:467:    if(rc != 200)    return 0;       connected = 0;      #ifdef OBEX_DEBUG    werror("OBEX disconnected.\n");   #endif    }    -  protected void destroy() +  protected void _destruct()    {    if(connected)    disconnect();    }       //! Initialize the client by establishing a connection to the    //! server at the other end of the provided transport stream    //!    //! @param _con    //! A stream for writing requests and reading back responses.    //! Typically this is some kind of serial port.    //!    protected void create(Stdio.Stream _con)    {    con = _con;    if(!connect())    error("Failed to establish OBEX connection\n");    } -  +    }         //! An extension of the @[client] which uses the AT*EOBEX modem command   //! to enter OBEX mode. Use together with Sony Ericsson data cables.   //!   class ATClient   {    inherit Client;