Search:

Type: Posts; User: Salem

Search: Search took 0.72 seconds.

  1. > cs_sleepms(500); //just wait a bit that...

    > cs_sleepms(500); //just wait a bit that really really nobody is accessing client data
    Things like this almost always indicate broken design.
    When the dynamic behaviour of the system...
  2. > Backtrace stopped: frame did not save the PC ...

    > Backtrace stopped: frame did not save the PC
    This usually means one of two things.

    1. The code is compiled with this flag


    2. You've trashed the stack by buffer overruns on local variables.
  3. Now line 42 *data = (void*)hdr; is just plain...

    Now line 42 *data = (void*)hdr; is just plain wrong.
    You allocate locally, and then read into the buffer

    hdr is the relic from the old way.
  4. This is write (without error checks, and other...

    This is write (without error checks, and other data processing)


    int32_t write_to_pipe(int32_t fd, int32_t id, uchar *data, int32_t n)
    {
    write(fd, PIP_ID_TXT[id], 3); // the magic cookie
    ...
  5. Jeez, I hope that isn't as badly formatted in...

    Jeez, I hope that isn't as badly formatted in your source editor as it is posted here.


    int32_t read_from_pipe(struct s_client *client, uchar ** data)
    {
    if (!client)
    return PIP_ID_ERR;
    ...
  6. memcpy(buf+3, &d, sizeof(void*)); ...

    memcpy(buf+3, &d, sizeof(void*));

    n=3+sizeof(void*);

    return(write(fd, buf, n));

    This makes no sense at all.
    You're writing a POINTER down a pipe to some other process.
    That...
Results 1 to 6 of 6