src/lib/gscphost/callbackregistries.c
gs_retval_t sidequeue_append(FTAID from, gs_sp_t buf, gs_int32_t length)
{
    struct sq * s;
    if ((s=malloc(sizeof(struct sq)))==0) {
        gslog(LOG_EMERG,"Could not allocate memory for sidequeue");
        return -1;
    }
    s->from=from;
    memcpy(&s->buf[0],buf,MAXMSGSZ);
    s->length=length;
    s->next=0;
    if (sqtail) {
        sqtail->next=s;
        sqtail=s;
    } else {
        sqtop = s;
        sqtail = s;
    }
    return 0;
}
/* adds a buffer to the end of the sidequeue*/
adds a buffer to the end of the sidequeue
adds a buffer to the end of the sidequeue
gs_retval_t sidequeue_append(FTAID from, gs_sp_t buf, gs_int32_t length)
{
    struct sq * s;
    if ((s=malloc(sizeof(struct sq)))==0) {
        gslog(LOG_EMERG,"Could not allocate memory for sidequeue");
        return -1;
    }
    s->from=from;
    memcpy(&s->buf[0],buf,MAXMSGSZ);
    s->length=length;
    s->next=0;
    if (sqtail) {
        sqtail->next=s;
        sqtail=s;
    } else {
        sqtop = s;
        sqtail = s;
    }
    return 0;
}
gs_retval_t sidequeue_append ( FTAID from , gs_sp_t buf , gs_int32_t length ) { struct sq * s ; if ( ( s = malloc ( sizeof ( struct sq ) ) ) == 0 ) { gslog ( LOG_EMERG , " " ) ; return -1 ; } s -> from = from ; memcpy ( & s -> buf [ 0 ] , buf , MAXMSGSZ ) ; s -> length = length ; s -> next = 0 ; if ( sqtail ) { sqtail -> next = s ; sqtail = s ; } else { sqtop = s ; sqtail = s ; } return 0 ; }
adds a buffer to the end of the sidequeue
adds a buffer to the end of the sidequeue