Lines Matching refs:c
76 int getTimeoutFromObjectOrReply(client *c, robj *object, mstime_t *timeout, int unit) { in getTimeoutFromObjectOrReply() argument
79 if (getLongLongFromObjectOrReply(c,object,&tval, in getTimeoutFromObjectOrReply()
84 addReplyError(c,"timeout is negative"); in getTimeoutFromObjectOrReply()
100 void blockClient(client *c, int btype) { in blockClient() argument
101 c->flags |= CLIENT_BLOCKED; in blockClient()
102 c->btype = btype; in blockClient()
111 client *c; in processUnblockedClients() local
116 c = ln->value; in processUnblockedClients()
118 c->flags &= ~CLIENT_UNBLOCKED; in processUnblockedClients()
124 if (!(c->flags & CLIENT_BLOCKED)) { in processUnblockedClients()
125 if (c->querybuf && sdslen(c->querybuf) > 0) { in processUnblockedClients()
126 processInputBuffer(c); in processUnblockedClients()
134 void unblockClient(client *c) { in unblockClient() argument
135 if (c->btype == BLOCKED_LIST) { in unblockClient()
136 unblockClientWaitingData(c); in unblockClient()
137 } else if (c->btype == BLOCKED_WAIT) { in unblockClient()
138 unblockClientWaitingReplicas(c); in unblockClient()
144 c->flags &= ~CLIENT_BLOCKED; in unblockClient()
145 c->btype = BLOCKED_NONE; in unblockClient()
149 if (!(c->flags & CLIENT_UNBLOCKED)) { in unblockClient()
150 c->flags |= CLIENT_UNBLOCKED; in unblockClient()
151 listAddNodeTail(server.unblocked_clients,c); in unblockClient()
157 void replyToBlockedClientTimedOut(client *c) { in replyToBlockedClientTimedOut() argument
158 if (c->btype == BLOCKED_LIST) { in replyToBlockedClientTimedOut()
159 addReply(c,shared.nullmultibulk); in replyToBlockedClientTimedOut()
160 } else if (c->btype == BLOCKED_WAIT) { in replyToBlockedClientTimedOut()
161 addReplyLongLong(c,replicationCountAcksByOffset(c->bpop.reploffset)); in replyToBlockedClientTimedOut()
180 client *c = listNodeValue(ln); in disconnectAllBlockedClients() local
182 if (c->flags & CLIENT_BLOCKED) { in disconnectAllBlockedClients()
183 addReplySds(c,sdsnew( in disconnectAllBlockedClients()
186 unblockClient(c); in disconnectAllBlockedClients()
187 c->flags |= CLIENT_CLOSE_AFTER_REPLY; in disconnectAllBlockedClients()