Lines Matching refs:oco

684     ConnectionOutputPtr oco;  in WriteToClient()  local
697 oco = oc->output; in WriteToClient()
739 if (!oco) { in WriteToClient()
740 if ((oco = FreeOutputs)) { in WriteToClient()
741 FreeOutputs = oco->next; in WriteToClient()
743 else if (!(oco = AllocateOutputBuffer())) { in WriteToClient()
748 oc->output = oco; in WriteToClient()
793 if (oco->count == 0 || oco->count + count + padBytes > oco->size) { in WriteToClient()
805 memmove((char *) oco->buf + oco->count, buf, count); in WriteToClient()
806 oco->count += count; in WriteToClient()
808 memset(oco->buf + oco->count, '\0', padBytes); in WriteToClient()
809 oco->count += padBytes; in WriteToClient()
827 ConnectionOutputPtr oco = oc->output; in FlushClient() local
837 if (!oco) in FlushClient()
841 notWritten = oco->count + extraCount + padsize; in FlushClient()
882 InsertIOV((char *) oco->buf, oco->count) in FlushClient()
905 if (written < oco->count) { in FlushClient()
907 oco->count -= written; in FlushClient()
908 memmove((char *) oco->buf, in FlushClient()
909 (char *) oco->buf + written, oco->count); in FlushClient()
914 written -= oco->count; in FlushClient()
915 oco->count = 0; in FlushClient()
918 if (notWritten > oco->size) { in FlushClient()
922 obuf = realloc(oco->buf, notWritten + BUFSIZE); in FlushClient()
927 oco->count = 0; in FlushClient()
930 oco->size = notWritten + BUFSIZE; in FlushClient()
931 oco->buf = obuf; in FlushClient()
937 memmove((char *) oco->buf + oco->count, in FlushClient()
940 oco->count = notWritten; /* this will include the pad */ in FlushClient()
954 oco->count = 0; in FlushClient()
960 oco->count = 0; in FlushClient()
963 if (oco->size > BUFWATERMARK) { in FlushClient()
964 free(oco->buf); in FlushClient()
965 free(oco); in FlushClient()
968 oco->next = FreeOutputs; in FlushClient()
969 FreeOutputs = oco; in FlushClient()
999 ConnectionOutputPtr oco; in AllocateOutputBuffer() local
1001 oco = malloc(sizeof(ConnectionOutput)); in AllocateOutputBuffer()
1002 if (!oco) in AllocateOutputBuffer()
1004 oco->buf = calloc(1, BUFSIZE); in AllocateOutputBuffer()
1005 if (!oco->buf) { in AllocateOutputBuffer()
1006 free(oco); in AllocateOutputBuffer()
1009 oco->size = BUFSIZE; in AllocateOutputBuffer()
1010 oco->count = 0; in AllocateOutputBuffer()
1011 return oco; in AllocateOutputBuffer()
1018 ConnectionOutputPtr oco; in FreeOsBuffers() local
1036 if ((oco = oc->output)) { in FreeOsBuffers()
1038 free(oco->buf); in FreeOsBuffers()
1039 free(oco); in FreeOsBuffers()
1042 FreeOutputs = oco; in FreeOsBuffers()
1043 oco->next = (ConnectionOutputPtr) NULL; in FreeOsBuffers()
1044 oco->count = 0; in FreeOsBuffers()
1053 ConnectionOutputPtr oco; in ResetOsBuffers() local
1060 while ((oco = FreeOutputs)) { in ResetOsBuffers()
1061 FreeOutputs = oco->next; in ResetOsBuffers()
1062 free(oco->buf); in ResetOsBuffers()
1063 free(oco); in ResetOsBuffers()